Design Secure Architectures

An application on Amazon EC2 stores an IAM user's access keys in a configuration file to call Amazon DynamoDB. Which change removes stored long-term credentials while preserving unattended access?

Show the answer

Correct answerA. Attach an IAM role through an instance profile

AWhy this is right: An instance profile makes automatically rotated role credentials available to the application.

BWhy not this: Encrypting the AMI does not remove the long-term access keys or their rotation requirements.

CWhy not this: An IAM console password cannot replace access keys for signed DynamoDB API requests.

DWhy not this: Console sign-in MFA does not replace the application's stored API credentials.

An EC2 instance profile supplies an IAM role's temporary credentials, which AWS rotates automatically. Encrypting an AMI may protect stored keys at rest but does not eliminate long-term credentials.