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

A developer is using AWS CodeDeploy to launch an application onto Amazon EC2 instances. The application deployment fails during testing. The developer notices an IAM_ROLE_PERMISSIONS error code in Amazon CloudWatch logs.

What should the developer do to resolve the error?

Answer options

Correct answer: C

Explanation

The IAM_ROLE_PERMISSIONS error indicates that the service role used by AWS CodeDeploy does not have the required permissions to interact with Amazon EC2 resources. Attaching the AWSCodeDeployRole managed policy grants the service role the necessary permissions for EC2 deployments. The AWSCodeDeployRoleECS policy is intended for ECS-based deployments and would not resolve this EC2-specific error.