AWS CLF-C02 Practice Question

An application running on EC2 needs to access an S3 bucket without long-term access keys stored in code. Which IAM feature should be used

Domain: Security & Compliance Question 23 of 60 Free practice

Question

An application running on EC2 needs to access an S3 bucket without long-term access keys stored in code. Which IAM feature should be used?

AAn IAM role ✓
BAn IAM user with a password
CAn access key pair
DAn MFA token
Correct Answer: A

An IAM role

Why this is the right answer

Explanation: An IAM role provides temporary credentials that EC2 instances can assume automatically, avoiding long-lived keys in code.

Every AWS Cloud Practitioner question on this site comes from the four official CLF-C02 exam domains. Practice the full domain set in our free timed mock exam and review every topic in the CLF-C02 study guide.

Try this question in the interactive practice test

Start free in seconds — no signup, no credit card. Practice questions, timed mock exams with the official 70% pass threshold, and flashcards.