A developer is building a mobile application that allows employees to sign in using either their corporate SAML Identity Provider (IdP) or a local email-based account. Once authenticated, the application must download customized settings files directly from a private Amazon S3 bucket.
Which combination of Cognito resources and configurations is required to support this architecture? (Select TWO.)
- Configure an Amazon Cognito User Pool to manage user directories, local email authentication, and integration with the corporate SAML Identity Provider.Answer
- Configure an Amazon Cognito Identity Pool, register the User Pool as an authentication provider, and associate it with an IAM role that allows read access to the S3 bucket.Answer
- CConfigure an Amazon Cognito Identity Pool to maintain the user directory, handle password verification, and store custom user attributes.
- DConfigure an Amazon API Gateway Lambda Authorizer to validate the user credentials and exchange Cognito tokens for AWS credentials to allow direct S3 API calls.
- EModify the trust policy of the S3-access IAM role to set the Principal to the Cognito User Pool's regional endpoint domain so that authenticated users can assume the role directly.
Answer
Configure an Amazon Cognito User Pool to manage user directories, local email authentication, and integration with the corporate SAML Identity Provider; and configure an Amazon Cognito Identity Pool, register the User Pool as an authentication provider, and associate it with an IAM role that allows read access to the S3 bucket.
The correct solution involves configuring an Amazon Cognito User Pool to handle authentication, user profile storage, and integration with the SAML Identity Provider, while using an Amazon Cognito Identity Pool to swap the resulting tokens for temporary, fine-grained AWS credentials that grant access to S3. This separation of duties utilizes User Pools for identity directory and Identity Pools for AWS resource authorization.
Step-by-Step Solution
Key Concept
Separating authentication (User Pools) from authorization for AWS resources (Identity Pools) in Amazon Cognito.
Estimated Time:1m 30s