nerdexam
Amazon

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.

Submitted by mike_84· Mar 6, 2026Security & Compliance

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)
  • A
    82% (18)
  • B
    5% (1)
  • C
    9% (2)
  • D
    5% (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.

AUse AWS CloudFormation StackSets to deploy the CloudFormation stacks in all AWS accounts.Correct

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.

BCreate an SCP that has a Deny statement for the ec2:* action with a condition of

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.

CAttach the SCP to the root of the organization.

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.

DCreate an AWS CloudFormation template that creates an EC2 instance role that has no IAM

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.

ECreate an AWS CloudFormation template that creates an EC2 instance role that has no IAMCorrect

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

#AWS Organizations#CloudFormation StackSets#EC2 instance isolation#IAM roles

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice