Skill 2.1.5

Make authenticated calls to AWS services.

Key Concepts

Requests are signed with Signature Version 4 (SigV4), which uses the secret key to compute a signature over the request and adds it to the Authorization header, together with the session token when using temporary credentials. The SDKs and CLI do this automatically; you only sign manually when calling AWS APIs or IAM-protected API Gateway endpoints over raw HTTP.

Signed requests are only valid for a short time, so a large clock skew on the client causes signature errors. Presigned URLs, for example for S3, embed a SigV4 signature in the query string to grant time-limited access without sharing credentials.

Within AWS, each service should run with its own IAM role and call other services' APIs using SigV4, for example through API Gateway with IAM authorization or private APIs reachable only from a VPC endpoint. Resource-based policies on queues, topics, functions and buckets state exactly which service roles may use them.

For service-to-service calls using tokens, Cognito supports the OAuth 2.0 client credentials grant, where a service authenticates with a client ID and secret and receives an access token with specific scopes. Mutual TLS on API Gateway custom domains authenticates clients by certificate.