DOP-C02 · Question #235
A company uses an organization in AWS Organizations to manage multiple AWS accounts. The company needs an automated process across all AWS accounts to isolate any compromised Amazon EC2 instances…
The correct answer is A. Use AWS CloudFormation StackSets to deploy the CloudFormation stacks in all AWS accounts. E. Create an AWS CloudFormation template that creates an EC2 instance role that has no IAM. To automate the isolation of compromised EC2 instances across all AWS accounts, an AWS CloudFormation StackSet should be used to deploy a template that defines a lockdown IAM instance role, which can then be assigned to tagged compromised instances.
Question
A company uses an organization in AWS Organizations to manage multiple AWS accounts. The company needs an automated process across all AWS accounts to isolate any compromised Amazon EC2 instances when the instances receive a specific tag. Which combination of steps will meet these requirements? (Choose two.)
Options
- AUse AWS CloudFormation StackSets to deploy the CloudFormation stacks in all AWS accounts.
- BCreate an SCP that has a Deny statement for the ec2:* action with a condition of
- CAttach the SCP to the root of the organization.
- DCreate an AWS CloudFormation template that creates an EC2 instance role that has no IAM
- ECreate an AWS CloudFormation template that creates an EC2 instance role that has no IAM
How the community answered
(22 responses)- A82% (18)
- B5% (1)
- C9% (2)
- D5% (1)
Why each option
To automate the isolation of compromised EC2 instances across all AWS accounts, an AWS CloudFormation StackSet should be used to deploy a template that defines a lockdown IAM instance role, which can then be assigned to tagged compromised instances.
AWS CloudFormation StackSets enable the centralized deployment of identical CloudFormation templates across all target accounts within an AWS Organization, ensuring the automated isolation mechanism is consistently available everywhere.
An SCP with a `Deny` statement for all `ec2:*` actions based on a tag is overly restrictive and could prevent legitimate management actions on the instance itself, rather than just isolating its interaction with other services.
Attaching an overly broad SCP (like the one in B) to the root of the organization can impact all accounts, including the management account, and is not a granular way to isolate specific compromised instances.
This option is truncated but similar to E; creating an EC2 instance role that effectively revokes permissions is a valid isolation step, but the phrasing is incomplete.
An AWS CloudFormation template that creates an EC2 instance role with minimal or no IAM permissions provides a 'quarantine' role. This role can be programmatically assigned to a compromised instance (e.g., via a Lambda triggered by a tag event), effectively revoking its access to other AWS services as an isolation measure.
Concept tested: AWS CloudFormation StackSets for multi-account deployment and IAM roles for EC2 isolation
Source: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html
Topics
Community Discussion
No community discussion yet for this question.