An organization is deploying a new containerized application on Amazon EC2 instances that must periodically write application state data to an Amazon DynamoDB table. Additionally, an external compliance auditor requires temporary read-only access to the DynamoDB table to verify data integrity. Which two configurations represent the most secure AWS-recommended practices for managing these access requirements? (Select two.)
- Attach an IAM role with DynamoDB write permissions to the EC2 instance profile.Answer
- Create an IAM role with a trust policy that allows the external auditor to assume it for read-only access.Answer
- CGenerate long-term IAM access keys for a dedicated IAM user and embed them in the application configuration on the EC2 instances.
- DShare the AWS account root user credentials with the auditor while ensuring multi-factor authentication (MFA) is active on the account.
- ESubmit an AWS support ticket requesting a service-level exception to disable IAM authorization for the EC2 instance's public IP address.
Answer
The correct configurations are attaching an IAM role with DynamoDB write permissions to the EC2 instance profile, and creating an IAM role with a trust policy that allows the external auditor to assume it for read-only access.
Attaching an IAM role to the EC2 instance profile ensures the application automatically receives temporary security credentials to write to DynamoDB without hardcoding keys. Creating an IAM role with a trust policy allows the external auditor to assume the role and obtain temporary, read-only permissions without requiring permanent credentials.
Step-by-Step Solution
Key Concept
Applying the principle of least privilege and using temporary security credentials via IAM roles instead of long-term access keys or sharing root account credentials.