DVA-C02 Question 134
Select 3Your company is building a mobile application that requires user authentication and authorization. You need to allow users to sign in using both email/password and social identity providers like Google, and also provide temporary AWS credentials to access S3 and DynamoDB. Which combination of Amazon Cognito features should you use to meet these requirements?
- A
Use Amazon Cognito User Pools for user authentication and federated identity management.
- B
Use Amazon Cognito Identity Pools to provide temporary AWS credentials for accessing AWS resources.
- C
Use Amazon Cognito Identity Pools for user authentication and authorization.
- D
Use Amazon Cognito User Pools for user authentication and to manage access to AWS services directly.
- E
Combine Amazon Cognito User Pools for authentication and Identity Pools for obtaining temporary AWS credentials.
Show answer and explanation
Correct answers: A, B, E
Explanation
Amazon Cognito provides two main features: User Pools and Identity Pools. User Pools handle user authentication and federated identity management, allowing users to sign in using traditional credentials or social identity providers. Identity Pools, on the other hand, are used to provide temporary AWS credentials to authenticated users so they can access AWS resources. In this scenario, both features are required: User Pools for authentication and Identity Pools for AWS resource access.
- A. Correct.
Correct: Amazon Cognito User Pools are designed for user authentication (sign-in/sign-up) and managing user profiles, including support for federated identity providers like Google.
- B. Correct.
Correct: Amazon Cognito Identity Pools enable you to provide temporary AWS credentials to users so they can access AWS resources like S3 and DynamoDB.
- C. Incorrect.
Incorrect: Cognito Identity Pools are not used for user authentication; they are used for federating identities and providing AWS credentials.
- D. Incorrect.
Incorrect: Amazon Cognito User Pools cannot directly manage access to AWS services like S3 or DynamoDB. You would need Identity Pools for that functionality.
- E. Correct.
Correct: Combining User Pools for authentication and Identity Pools for obtaining AWS credentials is the recommended approach when you need both user management and access to AWS resources.