AWS Certified Solutions Architect – Professional (SAP-C02) — Question 339
A company has a project that is launching Amazon EC2 instances that are larger than required. The project's account cannot be part of the company's organization in AWS Organizations due to policy restrictions to keep this activity outside of corporate IT. The company wants to allow only the launch of t3.small EC2 instances by developers in the project's account. These EC2 instances must be restricted to the us-east-2 Region.
What should a solutions architect do to meet these requirements?
Answer options
- A. Create a new developer account. Move all EC2 instances, users, and assets into us-east-2. Add the account to the company's organization in AWS Organizations. Enforce a tagging policy that denotes Region affinity.
- B. Create an SCP that denies the launch of all EC2 instances except t3.small EC2 instances in us-east-2. Attach the SCP to the project's account.
- C. Create and purchase a t3.small EC2 Reserved Instance for each developer in us-east-2. Assign each developer a specific EC2 instance with their name as the tag.
- D. Create an IAM policy than allows the launch of only t3.small EC2 instances in us-east-2. Attach the policy to the roles and groups that the developers use in the project's account.
Correct answer: D
Explanation
Because the project's account cannot be part of AWS Organizations, Service Control Policies (SCPs) cannot be applied, which rules out Option B. An IAM policy applied to the developers' roles and groups in the standalone account is the correct way to restrict ec2:RunInstances permissions based on instance type and Region. Option A violates the constraint to keep the account outside AWS Organizations, and Option C does not technically restrict users from launching larger on-demand instances.