Skill 2.1.2
Design application authentication and authorization solutions (for example, by using Amazon Cognito user pools, identity pools, OAuth 2.0, Amazon EKS Pod Identity).
Key Concepts
Amazon Cognito user pools are a user directory and OpenID Connect provider: they handle sign-up and sign-in, MFA, federation with social and SAML or OIDC identity providers, and issue ID, access and refresh tokens through OAuth 2.0 flows (authorisation code with PKCE for apps, client credentials for machine-to-machine). API Gateway and ALB validate the tokens directly. Identity pools exchange a token for temporary AWS credentials mapped to IAM roles, so mobile or web clients can call S3 or DynamoDB directly with least privilege. Amazon Verified Permissions evaluates fine-grained authorisation in the application with Cedar policies, using claims from the token.
Inside Kubernetes, Amazon EKS Pod Identity associates an IAM role with a Kubernetes service account through the EKS API; an agent on each node supplies temporary credentials to the pod, and the role can be reused across clusters without per-cluster OIDC trust. IRSA (IAM roles for service accounts) achieves the same with an OIDC provider per cluster. Either way, pods never use the node's instance role for application permissions.