ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 159 - DVA-C02 discussion

Report
Export

A company has an application that is hosted on Amazon EC2 instances The application stores objects in an Amazon S3 bucket and allows users to download objects from the S3 bucket A developer turns on S3 Block Public Access for the S3 bucket After this change, users report errors when they attempt to download objects The developer needs to implement a solution so that only users who are signed in to the application can access objects in the S3 bucket.

Which combination of steps will meet these requirements in the MOST secure way? (Select TWO.)

A.
Create an EC2 instance profile and role with an appropriate policy Associate the role with the EC2 instances
Answers
A.
Create an EC2 instance profile and role with an appropriate policy Associate the role with the EC2 instances
B.
Create an 1AM user with an appropriate policy. Store the access key ID and secret access key on the EC2 instances
Answers
B.
Create an 1AM user with an appropriate policy. Store the access key ID and secret access key on the EC2 instances
C.
Modify the application to use the S3 GeneratePresignedUrl API call
Answers
C.
Modify the application to use the S3 GeneratePresignedUrl API call
D.
Modify the application to use the S3 GetObject API call and to return the object handle to the user
Answers
D.
Modify the application to use the S3 GetObject API call and to return the object handle to the user
E.
Modify the application to delegate requests to the S3 bucket.
Answers
E.
Modify the application to delegate requests to the S3 bucket.
Suggested answer: A, C

Explanation:

IAM Roles for EC2 (A):The most secure way to provide AWS permissions from EC2.

Create a role with a policy allowings3:GetObjecton the specific bucket.

Attach the role to an instance profile and associate that profile with your instances.

Pre-signed URLs (C):Temporary, authenticated URLs for specific S3 actions.

Modify the app to use the AWS SDK to callGeneratePresignedUrl.

Embed these URLs when a user is properly logged in, allowing download access.

IAM Roles for EC2:https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html

Generating Presigned URLs:https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.htm

asked 16/09/2024
Brian Lester
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first