Root user and IAM basics · Question 5 of 12
What is the most secure way for an application on an EC2 instance to access an S3 bucket?
1 answer is correct. Easy Created with AI
Show answer
Answer
- A Through an IAM role attached to the instance via an instance profile
Explanation
An instance profile is the container that binds the role to the instance. The application fetches the temporary credentials from the Instance Metadata Service, and they are rotated automatically. Hard-coded keys can leak and have to be rotated by hand.