Bird
0
0

You want an EC2 instance to access S3 buckets securely without embedding credentials. Which IAM role setup is best?

hard📝 Application Q8 of 15
AWS - Identity and Access Management
You want an EC2 instance to access S3 buckets securely without embedding credentials. Which IAM role setup is best?
ACreate an IAM role with S3 access policy and attach it to the EC2 instance
BCreate an IAM user with S3 access and store its keys on the EC2 instance
CUse the root account credentials on the EC2 instance
DCreate an IAM group with S3 access and add the EC2 instance to it
Step-by-Step Solution
Solution:
  1. Step 1: Identify secure credential method for EC2

    IAM roles attached to EC2 provide temporary credentials automatically without storing keys.
  2. Step 2: Evaluate options

    Create an IAM role with S3 access policy and attach it to the EC2 instance uses roles correctly. Create an IAM user with S3 access and store its keys on the EC2 instance stores keys insecurely. Use the root account credentials on the EC2 instance uses root credentials (bad practice). Create an IAM group with S3 access and add the EC2 instance to it is invalid because EC2 instances cannot be added to IAM groups.
  3. Final Answer:

    Create an IAM role with S3 access policy and attach it to the EC2 instance -> Option A
  4. Quick Check:

    Use IAM roles for EC2 to access AWS securely [OK]
Quick Trick: Attach roles to EC2 for secure, temporary AWS access [OK]
Common Mistakes:
MISTAKES
  • Storing user keys on EC2
  • Using root credentials
  • Trying to add EC2 to IAM groups

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes