nerdexam
Amazon

DOP-C02 · Question #310

A company has a single AWS account that runs hundreds of Amazon EC2 instances in a single AWS Region. The company launches and terminates new EC2 instances every hour. The account includes existing EC

The correct answer is B. Configure AWS Config. Deploy an AWS Config ec2-instance-profile-attached managed rule.. AWS Config is designed to continuously monitor and evaluate the configurations of AWS resources. By using an AWS Config managed rule like ec2- instance-profile-attached, you can automatically detect any EC2 instances that do not have an instance profile attached. AWS Config allow

Submitted by lars.no· Mar 6, 2026Security and Compliance

Question

A company has a single AWS account that runs hundreds of Amazon EC2 instances in a single AWS Region. The company launches and terminates new EC2 instances every hour. The account includes existing EC2 instances that have been running for longer than a week. The company's security policy requires all running EC2 instances to have an EC2 instance profile attached. The company has created a default EC2 instance profile. The default EC2 instance profile must be attached to any EC2 instances that do not have a profile attached. Which solution will meet these requirements?

Options

  • AConfigure an Amazon EventBridge rule that matches the Amazon EC2 RunInstances API calls.
  • BConfigure AWS Config. Deploy an AWS Config ec2-instance-profile-attached managed rule.
  • CConfigure an Amazon EventBridge rule that matches the Amazon EC2 StartInstances API calls.
  • DConfigure AWS Config. Deploy an AWS Config iam-role-managed-policy-check managed rule.

How the community answered

(35 responses)
  • A
    3% (1)
  • B
    71% (25)
  • C
    9% (3)
  • D
    17% (6)

Explanation

AWS Config is designed to continuously monitor and evaluate the configurations of AWS resources. By using an AWS Config managed rule like ec2- instance-profile-attached, you can automatically detect any EC2 instances that do not have an instance profile attached. AWS Config allows you to configure automatic remediation actions. In this case, you can set up AWS Config to trigger an AWS Systems Manager Automation runbook to attach the default instance profile when the rule detects noncompliance (i.e., an EC2 instance without an attached instance profile). The ec2-instance-profile-attached managed rule directly checks whether EC2 instances have an instance profile attached. This simplifies the setup and ensures that any running instances that do not comply with the security policy are detected and remediated automatically.

Topics

#AWS Config#EC2 instance profiles#Compliance monitoring#Automated remediation#Security best practices

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice