AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 261
A company wants to deploy a workload on several hundred Amazon EC2 instances. The company will provision the EC2 instances in an Auto Scaling group by using a launch template.
The workload will pull files from an Amazon S3 bucket, process the data, and put the results into a different S3 bucket. The EC2 instances must have least-privilege permissions and must use temporary security credentials.
Which combination of steps will meet these requirements? (Choose two.)
Answer options
- A. Create an IAM role that has the appropriate permissions for S3 buckets Add the IAM role to an instance profile.
- B. Update the launch template to include the IAM instance profile.
- C. Create an IAM user that has the appropriate permissions for Amazon S3 Generate a secret key and token.
- D. Create a trust anchor and profile Attach the IAM role to the profile.
- E. Update the launch template Modify the user data to use the new secret key and token.
Correct answer: A, B
Explanation
The correct actions are A and B because creating an IAM role with the right permissions and attaching it to an instance profile ensures that the EC2 instances can access S3 buckets with least privilege using temporary credentials. Options C, D, and E are incorrect because they involve using IAM users or static credentials, which do not align with the requirement for least-privilege permissions and temporary security credentials.