AWS Certified Developer – Associate (DVA-C02) — Question 224

A developer is working on an application that is deployed on an Amazon EC2 instance. The developer needs a solution that will securely transfer files from the application to an Amazon S3 bucket.

What should the developer do to meet these requirements in the MOST secure way?

Answer options

Correct answer: C

Explanation

The correct answer is C because assigning an IAM role to the EC2 instance allows it to securely access the S3 bucket without hardcoding access keys. Options A and B are less secure as they involve storing access keys, which can be compromised. Option D is not as secure because it relies on a bucket policy that may expose the S3 bucket to unintended access.