ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 694 - SAA-C03 discussion

Report
Export

A company hosts an application in a private subnet. The company has already integrated the application with Amazon Cognito. The company uses an Amazon Cognito user pool to authenticate users.

The company needs to modify the application so the application can securely store user documents in an Amazon S3 bucket.

Which combination of steps will securely integrate Amazon S3 with the application? (Select TWO.)

A.
Create an Ama2on Cognito identity pool to generate secure Amazon S3 access tokens for users when they successfully log in.
Answers
A.
Create an Ama2on Cognito identity pool to generate secure Amazon S3 access tokens for users when they successfully log in.
B.
Use the existing Amazon Cognito user pool to generate Amazon S3 access tokens for users when they successfully log in.
Answers
B.
Use the existing Amazon Cognito user pool to generate Amazon S3 access tokens for users when they successfully log in.
C.
Create an Amazon S3 VPC endpoint in the same VPC where the company hosts the application.
Answers
C.
Create an Amazon S3 VPC endpoint in the same VPC where the company hosts the application.
D.
Create a NAT gateway in the VPC where the company hosts the application. Assign a policy to the S3 bucket to deny any request that is not initiated from Amazon Cognito.
Answers
D.
Create a NAT gateway in the VPC where the company hosts the application. Assign a policy to the S3 bucket to deny any request that is not initiated from Amazon Cognito.
E.
Attach a policy to the S3 bucket that allows access only from the users' IP addresses.
Answers
E.
Attach a policy to the S3 bucket that allows access only from the users' IP addresses.
Suggested answer: A, C

Explanation:

To securely integrate Amazon S3 with an application that uses Amazon Cognito for user authentication, the following two steps are essential:

Detailed Explanation:

Step 1: Create an Amazon Cognito Identity Pool (Option A)

Amazon Cognito Identity Pools allow users to obtain temporary AWS credentials to access AWS resources, such as Amazon S3, after successfully authenticating with the Cognito user pool. The identity pool bridges the gap between user authentication and AWS service access by generating temporary credentials using AWS Identity and Access Management (IAM).

Once a user logs in using the Cognito User Pool, the identity pool provides IAM roles with specific permissions that the application can use to access S3 securely. This ensures that each user has appropriate access controls while accessing the S3 bucket.

This is a secure way to ensure that users only have temporary and least-privilege access to the S3 bucket for their documents.

Step 2: Create an Amazon S3 VPC Endpoint (Option C)

By creating an Amazon S3 VPC endpoint, the company ensures that communication between the application (which is hosted in a private subnet) and the S3 bucket occurs over the AWS private network, without the need to traverse the internet. This enhances security and prevents exposure of data to public networks.

The VPC endpoint allows the application to access the S3 bucket privately and securely within the VPC. It also ensures that traffic stays within the AWS network, reducing attack surface and improving overall security.

Why the Other Options Are Incorrect:

Option B: This is incorrect because Amazon Cognito User Pools are used for user authentication, not for generating S3 access tokens. To provide S3 access, you need to use Amazon Cognito Identity Pools, which offer AWS credentials.

Option D: A NAT gateway is unnecessary in this scenario. Using a VPC endpoint for S3 access provides a more secure and cost-effective solution by keeping traffic within AWS.

Option E: Attaching a policy to restrict access based on IP addresses is not scalable or efficient. It would require managing users' dynamic IP addresses, which is not an effective security measure for this use case.

AWS

Reference:

Amazon Cognito Identity Pools

Amazon VPC Endpoints for S3

asked 16/09/2024
Francisco Jesús Cano Hinarejos
53 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first