
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A company is hosting a web application from an Amazon S3 bucket. The application uses Amazon Cognito as an identity provider to authenticate users and return a JSON Web Token (JWT) that provides access to protected resources that are stored in another S3 bucket.
Upon deployment of the application, users report errors and are unable to access the protected content. A solutions architect must resolve this issue by providing proper permissions so that users can access the protected content.
Which solution meets these requirements?
A
Update the Amazon Cognito identity pool to assume the proper IAM role for access to the protected content.
B
Update the S3 ACL to allow the application to access the protected content.
C
Redeploy the application to Amazon S3 to prevent eventually consistent reads in the S3 bucket from affecting the ability of users to access the protected content.
D
Update the Amazon Cognito pool to use custom attribute mappings within the identity pool and grant users the proper permissions to access the protected content.
Explanation:
Correct Answer: A
Why Option A is correct:
Amazon Cognito Identity Pools (now called Amazon Cognito Federated Identities) are used to provide temporary AWS credentials to authenticated users. These credentials allow users to access AWS resources like S3 buckets.
When users authenticate with Amazon Cognito User Pools, they receive a JWT token. However, to access AWS resources (like the protected S3 bucket), they need temporary AWS credentials, which are provided by the Identity Pool.
The Identity Pool assumes an IAM role to provide these temporary credentials to authenticated users. If the IAM role doesn't have proper permissions to access the protected S3 bucket, users will get access denied errors.
By updating the Amazon Cognito identity pool to assume the proper IAM role with appropriate S3 permissions, users will receive credentials that allow them to access the protected content.
Why other options are incorrect:
Option B: S3 ACLs are legacy access control mechanisms that are generally not recommended for new applications. More importantly, the issue is about authenticated users accessing protected content, which requires proper IAM permissions through the Identity Pool, not just S3 ACLs.
Option C: Redeploying the application to prevent eventually consistent reads doesn't address the permission issue. Eventually consistent reads are about data consistency, not authentication/authorization problems.
Option D: Custom attribute mappings in the identity pool are used to map user attributes from the identity provider to IAM session tags, but this doesn't directly grant permissions. The core issue is that the IAM role assumed by the identity pool lacks proper S3 permissions.
Key AWS Concepts:
Solution Architecture: