Security and Compliance

An application on Amazon EC2 must read objects from an S3 bucket without storing long-term credentials. Which approach should a DevOps engineer use?

Show the answer

Correct answerD. Attach an IAM role through an instance profile.

AWhy not this: IAM user access keys remain long-term credentials even when stored in Parameter Store.

BWhy not this: IAM groups contain IAM users, not EC2 instances.

CWhy not this: An SCP limits available permissions; it does not grant permissions or supply application credentials.

DWhy this is right: An instance profile makes role-based temporary credentials available to applications on the EC2 instance.

An EC2 instance profile supplies an IAM role whose temporary credentials the application can use. Storing IAM user access keys in Parameter Store protects their storage but does not eliminate long-term credentials.