A developer is building a mobile game that needs to save user progress data directly to an Amazon DynamoDB table. Users must first authenticate, and the application must then obtain temporary, limited-privilege AWS credentials to authorize write operations to the DynamoDB table. Which Amazon Cognito feature should the developer use to obtain these temporary AWS credentials?
- Cognito Identity PoolsAnswer
- BCognito User Pools
- CCognito User Pools combined with an API Gateway Lambda Authorizer
- DCognito User Pools using hardcoded IAM Access Keys
Answer
Cognito Identity Pools
Cognito Identity Pools (Federated Identities) are specifically designed to authorize users by exchanging authentication tokens (from Cognito User Pools or social providers) for temporary, limited-privilege AWS credentials. This allows mobile applications to call AWS services directly, such as writing to DynamoDB, using the permissions defined in the assumed IAM role.
Step-by-Step Solution
Key Concept
Amazon Cognito Identity Pools vs User Pools for AWS resource access
Estimated Time:45s