Exam DOP-C02 All QuestionsBrowse all questions from this exam
Question 225

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.)

    Correct Answer: A, B

    To meet the requirements of provisioning EC2 instances in an Auto Scaling group with least-privilege permissions and temporary security credentials, you should create an IAM role with the appropriate permissions for the S3 buckets and add it to an instance profile. This role will ensure that the instances have the necessary permissions to pull and process the files from the S3 buckets. Updating the launch template to include the IAM instance profile ensures that the EC2 instances launched by the Auto Scaling group will automatically utilize this role with the appropriate permissions, providing temporary security credentials dynamically.

Discussion
tgv

---> AB

trungtdOptions: AB

A. This step ensures that the EC2 instances have the necessary permissions to access the S3 buckets. The IAM role should have policies attached that allow it to pull files from one S3 bucket and put results into another S3 bucket. By using an instance profile, the role can be associated with the EC2 instances. B. This step ensures that the EC2 instances launched by the Auto Scaling group will automatically use the instance profile (and thus the IAM role) with the appropriate permissions. C. This approach uses long-term credentials D. The term "trust anchor" is more relevant to AWS IAM Identity Center (formerly AWS Single Sign-On) or AWS Organizations. It is not directly applicable to setting up permissions for EC2 instances via Auto Scaling. E. Storing and using secret keys and tokens in user data scripts is insecure and not recommended.