AWS Developer DVA-C02 · Security · medium
A mobile fitness app needs: (1) a managed user directory supporting sign-up, sign-in, MFA, and social login (Sign in with Apple/Google) that issues OIDC JWT tokens to call an Amazon API Gateway endpoint, and (2) a way for signed-in premium users to obtain temporary, limited-privilege AWS STS credentials so the mobile app can upload workout videos directly to a user-specific prefix in an Amazon S3 bucket (s3://workouts-bucket/${cognito-identity.amazonaws.com:sub}/*). How should Amazon Cognito be configured?
Published · Last updated · checked before publication — how we verify questions
Options
Answer: B. Use a Cognito User Pool for sign-in/JWTs and a Cognito Identity Pool for STS S3 keys
Amazon Cognito User Pools act as the user directory/IdP that handles sign-up, sign-in, and MFA and issues JWTs for API Gateway (B), while Amazon Cognito Identity Pools (Federated Identities) exchange a User Pool JWT (or social IdP token) for temporary AWS STS credentials mapped to an IAM role for direct AWS service access like S3 (C).
Why the other options are wrong
- A. Use a Cognito Identity Pool alone for password sign-up and a User Pool for STS S3 keys — This reverses the two components: User Pools manage user sign-up/passwords, whereas Identity Pools vend temporary STS AWS credentials.
- C. Embed long-lived IAM User access keys inside the mobile app binary for S3 uploads — Embedding static IAM credentials in a client mobile binary is a critical security vulnerability.
- D. Use AWS KMS asymmetric key policies to issue OAuth 2.0 refresh tokens to mobile users — AWS KMS manages cryptographic keys, not user sign-up directories or federated STS sessions.
More Security questions
- A central platform security team allows application developers to create their own IAM execution roles for AWS Lambda…
- A regulated enterprise stores files in an Amazon S3 bucket encrypted with an AWS KMS Customer Managed Key (SSE-KMS)…
- A developer needs to encrypt a 50 MB sensitive PDF file locally on an application server before uploading it to an…
- An AWS Lambda function in Account A (111122223333) needs to read objects from an Amazon S3 bucket in Account B…
AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.