AWS Certified SysOps Administrator – Associate (SOA-C03) — Question 21

An Amazon EC2 instance is running an application that uses Amazon Simple Queue Service (Amazon SQS) queues. A CloudOps engineer must ensure that the application can read write, and delete messages from the SQS queues.
Which solution will meet these requirements in the MOST secure manner?

Answer options

Correct answer: D

Explanation

The correct answer is D because using an IAM role is a more secure method than embedding IAM user credentials directly in the application or exporting them as environment variables. Options A and B expose sensitive information, while C grants broader permissions than necessary, which could violate the principle of least privilege.