AWS Certified Developer – Associate — Question 227

A company designs a mobile app to run on AWS. The app will run on Amazon EC2 instances behind an Application Load Balancer. The instances will run in an Amazon EC2 Auto Scaling group. The app must securely access data that the company stores in Amazon DynamoDB.

Which solution is MOST secure?

Answer options

Correct answer: D

Explanation

The correct answer is D because using an IAM role allows the EC2 instances to securely access DynamoDB without embedding credentials in the application. Option A is less secure as it exposes user permissions directly. Option B does not provide direct access to DynamoDB for the EC2 instances, and Option C is impractical due to the management overhead of individual IAM users.