1. Home
  2. Computer Science MCQs
  3. Cloud Computing
  4. Why is an IAM role preferred over an IAM user with access…

Added 30 Nov -0001

Why is an IAM role preferred over an IAM user with access keys for code running on an EC2 instance?

  1. The role issues an encrypted access key that is written to the instance's root volume at boot
  2. The role removes the need for any permission policy at all, since the instance identity is trusted by default
  3. The role lets the instance share one access key with other accounts without extra configuration
  4. The role issues short-lived credentials through instance metadata, so no long-term secret is stored Correct answer

Correct answer

D. The role issues short-lived credentials through instance metadata, so no long-term secret is stored

16 views

MCQSEXAM

Explanation

IAM roles are assumed through the instance metadata service, which issues temporary credentials that rotate automatically, so no long-lived secret sits on disk to leak. The role's trust policy lets EC2 assume it, and its permission policy still governs what those credentials may do. Long-term access keys remain a leading cause of leaked cloud credentials, which is why keyless workloads are preferred.

Reference

Asked in: NTS, PPSC IT, Campus Interviews

Preparing for an exam?

Doubts & discussion

Not sure why the answer is D? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Cloud Computing MCQs

Practise all Cloud Computing MCQs

Similar MCQs