AWS Certified Solutions Architect – Associate (SAA-C03) — Question 571

A solutions architect is using an AWS CloudFormation template to deploy a three-tier web application. The web application consists of a web tier and an application tier that stores and retrieves user data in Amazon DynamoDB tables. The web and application tiers are hosted on Amazon EC2 instances, and the database tier is not publicly accessible. The application EC2 instances need to access the DynamoDB tables without exposing API credentials in the template.

What should the solutions architect do to meet these requirements?

Answer options

Correct answer: B

Explanation

Using an IAM role attached to an EC2 instance profile is the AWS best practice for granting applications on EC2 instances secure access to other AWS resources without managing credentials. Option B is correct because the application tier requires both read and write capabilities, which are granted by the role and associated with the instances via the instance profile. Options C and D are incorrect because they involve passing long-lived access keys, while Option A is incorrect because it only provides read access.