Bird
0
0

You need to allow an EC2 instance to access an S3 bucket securely without embedding credentials. What is the best practice?

hard📝 Application Q9 of 15
AWS - Identity and Access Management
You need to allow an EC2 instance to access an S3 bucket securely without embedding credentials. What is the best practice?
AUse root account credentials on the instance
BStore AWS access keys on the EC2 instance filesystem
CAttach an IAM role with S3 access permissions to the EC2 instance
DCreate an IAM user and hardcode credentials in the application
Step-by-Step Solution
Solution:
  1. Step 1: Identify secure credential management for EC2

    IAM roles attached to EC2 provide temporary credentials automatically.
  2. Step 2: Avoid hardcoding or storing permanent credentials

    Embedding keys or using root credentials is insecure and against best practices.
  3. Final Answer:

    Attach an IAM role with S3 access permissions to the EC2 instance -> Option C
  4. Quick Check:

    Use IAM roles for EC2 access = A [OK]
Quick Trick: Use IAM roles, never hardcode credentials on EC2 [OK]
Common Mistakes:
  • Hardcoding access keys in apps
  • Using root credentials on instances
  • Storing keys on instance disks

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes