An enterprise is deploying an application on Amazon EC2 instances that needs to retrieve files from an Amazon S3 bucket. Which of the following configurations represent AWS Identity and Access Management (IAM) best practices for this scenario? (Select TWO.)
- AEmbed the AWS account root user's access keys in the application configuration to ensure uninterrupted access.
- Attach an IAM role with the necessary S3 access permissions directly to the Amazon EC2 instances.Answer
- CStore the long-term access keys of an IAM user directly within the application code.
- Configure a least-privilege IAM policy and attach it to the IAM role.Answer
- EContact AWS Support to configure the virtualization layer of the EC2 instances to allow S3 access.
Answer
Attach an IAM role with the necessary S3 access permissions directly to the Amazon EC2 instances, and configure a least-privilege IAM policy and attach it to the IAM role.
The correct configuration is to associate an IAM role with the Amazon EC2 instance and attach a least-privilege policy to that role. This follows AWS best practices by granting only the necessary permissions and using temporary credentials for programmatic access.
Step-by-Step Solution
Key Concept
AWS Identity and Access Management (IAM) roles and policy configurations for applications on Amazon EC2 instances
Estimated Time:1m 0s