CLF.II · AWS Cloud Practitioner practice question

An application running on an Amazon EC2 instance needs temporary permissions to read objects from an Amazon S3 bucket without storing long-term access keys on the server. What should be used?

Choose one answer
Check answer and explanation

Correct answer: An IAM role attached to the EC2 instance

Explanation

An IAM role provides temporary, automatically rotated credentials to AWS services like EC2 without hardcoding keys.

Common trap

Root credentials should never be used by applications. Hardcoded static keys are a major credential-leak risk. S3 Glacier vault lock enforces compliance retention, not EC2 authentication.

Source: clfc02-domain1-2
Checked against the cited text on 2026-11-27.

Report an error in this question