DVA-C02 Question 136
Select 2A development team is building a mobile application that requires user authentication and access to AWS resources. They want to allow users to sign in with social identity providers like Google and Facebook, and also enable temporary access to DynamoDB and S3 based on user roles. Which Cognito feature(s) should the team use to satisfy these requirements?
- A
Amazon Cognito User Pools
- B
Amazon Cognito Identity Pools
- C
Amazon Cognito Sync
- D
Amazon Cognito Custom Authentication
- E
Amazon Cognito Hosted UI
Show answer and explanation
Correct answers: A, B
Explanation
To allow users to authenticate using social identity providers and grant them temporary access to AWS resources, you need to use both Amazon Cognito User Pools and Identity Pools. User Pools handle the authentication process, including integration with social identity providers, while Identity Pools are responsible for granting temporary AWS credentials and access to resources based on user roles. The other options do not fully meet the requirements of the scenario.
- A. Correct.
Correct. Amazon Cognito User Pools provide a user directory and allow authentication using social identity providers like Google and Facebook. It is responsible for managing user sign-up and sign-in workflows.
- B. Correct.
Correct. Amazon Cognito Identity Pools (federated identities) allow you to grant temporary access to AWS resources like DynamoDB and S3 based on user roles and permissions. It integrates with user pools for authentication.
- C. Incorrect.
Incorrect. Amazon Cognito Sync is used for synchronizing user data across devices but does not handle authentication or access to AWS resources.
- D. Incorrect.
Incorrect. Amazon Cognito Custom Authentication is used to define custom authentication flows, but it does not directly handle integration with AWS resources or social identity providers.
- E. Incorrect.
Incorrect. Amazon Cognito Hosted UI provides a web-based sign-in experience but is a feature of user pools and does not enable access to AWS resources or manage roles.