AWS Certified Developer – Associate — Question 142

Two containerized microservices are hosted on Amazon EC2 ECS. The first microservice reads an Amazon RDS Aurora database instance, and the second microservice reads an Amazon DynamoDB table.

How can each microservice be granted the minimum privileges?

Answer options

Correct answer: C

Explanation

The correct answer is C because enabling ECS_ENABLE_TASK_IAM_ROLE allows each microservice to assume a specific IAM role with the least privileges necessary. Options A and B disable this feature and do not allow for granular permissions per microservice, while D grants broader access through the instance profile, which is not the minimum privilege approach.