aws DOP-C02: AWS Certified DevOps Engineer – Professional · Practice questions

Domain 2: Configuration Management and IaC Practice Questions

Review 10 sample questions with their correct answers and explanations. Sign up free to continue with the full topic quiz.

Sign up free for the full quiz

Question 1

A company uses AWS Systems Manager to keep EC2 instances configured. A specific agent must always be installed and running, and drift must be corrected within 30 minutes. Which feature fits BEST?

  1. A one-time Run Command invocation that installs the agent on all instances
  2. A State Manager association that applies the configuration every 30 minutes — Correct
  3. An Automation runbook that the team starts manually each morning
  4. A Patch Manager baseline that includes the agent as an approved patch

Correct answer

A State Manager association that applies the configuration every 30 minutes

Explanation

State Manager reapplies desired state on a schedule. One-time commands and manual runbooks do not correct drift. Patch baselines manage OS patches, not arbitrary agent state.

Question 2

A company manages hundreds of EC2 instances and wants to apply OS patches in a controlled way: test environments first, then production a week later, during maintenance windows. Which approach fits BEST?

  1. Ask each application owner to patch their own instances whenever convenient
  2. Patch Manager with patch groups, maintenance windows, and baselines with approval delays — Correct
  3. Enable automatic updates on every instance so that patches install as soon as they are released
  4. Create a new AMI every day and replace all instances, including production, at the same time

Correct answer

Patch Manager with patch groups, maintenance windows, and baselines with approval delays

Explanation

Patch groups and maintenance windows stage patching, and approval delays control timing. Automatic updates are uncontrolled. Daily full replacement is disruptive. Owner-driven patching is inconsistent.

Question 3

A company needs consistent golden AMIs with security hardening and the latest patches every month, tested before use, and distributed to multiple accounts and Regions. Which approach fits BEST?

  1. A developer launches an instance each month, patches it by hand, and creates an AMI
  2. An EC2 Image Builder pipeline with hardening, test components, and multi-account distribution — Correct
  3. A CloudFormation stack that creates an instance and an AMI, deployed manually in each Region
  4. An S3 bucket that stores ISO images that teams download and install themselves

Correct answer

An EC2 Image Builder pipeline with hardening, test components, and multi-account distribution

Explanation

Image Builder automates build, test, and distribution. Manual or per-Region processes are slow and inconsistent. ISO downloads are not AMIs.

Question 4

A company runs a fleet of Windows and Linux EC2 instances. It needs an inventory of installed software across all accounts to find instances running an outdated library. Which approach fits BEST?

  1. A spreadsheet that each team updates with its installed software every quarter
  2. AWS Config advanced queries on EC2 instance types and tags only
  3. Systems Manager Inventory with resource data sync to S3 — Correct
  4. Amazon Inspector network reachability findings for each instance

Correct answer

Systems Manager Inventory with resource data sync to S3

Explanation

Inventory collects software data, and resource data sync centralizes it for queries. Spreadsheets are stale. Config queries on types and tags do not list software. Network reachability is unrelated.

Question 5

A company needs consistent EC2 instance configuration across Regions and wants instances to self-heal configuration drift. Which approach fits BEST?

  1. Manual configuration of each instance after launch
  2. Weekly reboots of all instances in every Region
  3. One-time user data scripts with no further enforcement
  4. Systems Manager State Manager associations deployed in each Region — Correct

Correct answer

Systems Manager State Manager associations deployed in each Region

Explanation

State Manager reapplies configuration regularly in every Region. Manual setup and one-time scripts do not correct drift. Reboots do not fix configuration.

Question 6

A company must store application configuration that changes often, roll it out gradually to production with validation, and roll back automatically if errors increase. Which service fits BEST?

  1. An S3 object that applications download once every 24 hours
  2. AWS AppConfig with validators, a gradual deployment strategy, and alarm-based rollback — Correct
  3. Environment variables baked into each container image
  4. Systems Manager Parameter Store standard parameters read once at application startup

Correct answer

AWS AppConfig with validators, a gradual deployment strategy, and alarm-based rollback

Explanation

AppConfig supports validation, gradual rollout, and automatic rollback. Parameter Store, S3 objects, and environment variables do not provide gradual rollout and rollback.

Question 7

A company uses AWS Organizations and wants to delegate administration of CloudFormation StackSets to a DevOps account instead of the management account. Which feature fits BEST?

  1. Run StackSets only from member accounts with self-managed permissions
  2. Register the DevOps account as a delegated administrator for StackSets — Correct
  3. Create IAM users in the management account for each DevOps engineer
  4. Share the management account's root credentials with the DevOps team

Correct answer

Register the DevOps account as a delegated administrator for StackSets

Explanation

StackSets supports delegated administrators for service-managed deployments. Sharing root credentials or creating management account users is poor practice. Self-managed StackSets lack automatic deployment to OUs.

Question 8

A company deploys an application in a single Region and wants to protect against accidental deletion of its CloudFormation-managed S3 buckets and databases. Which configurations help? (Choose TWO.)

  1. Larger instance types for the databases
  2. Disabled CloudTrail logging to reduce noise
  3. DeletionPolicy Retain or Snapshot on critical resources — Correct
  4. Termination protection on production stacks — Correct
  5. Short TTLs on Route 53 records

Correct answer

DeletionPolicy Retain or Snapshot on critical resources; Termination protection on production stacks

Explanation

Deletion policies keep resources or snapshots, and termination protection blocks stack deletion. TTLs, instance sizes, and disabled logging do not protect resources.

Question 9

A team must use the latest Amazon Linux AMI in its CloudFormation templates in every Region without editing templates when AWS releases a new AMI. Which approach fits BEST?

  1. An AWS::SSM::Parameter::Value<AWS::EC2::Image::Id> parameter for the public AMI — Correct
  2. A custom resource that searches the AWS Marketplace for the newest AMI
  3. A Mappings section with AMI IDs for each Region that is updated by a script every month
  4. A hard-coded AMI ID in the template that is valid in all Regions

Correct answer

An AWS::SSM::Parameter::Value<AWS::EC2::Image::Id> parameter for the public AMI

Explanation

Public SSM parameters resolve to the latest AMI ID per Region. Mappings need updates. AMI IDs are Regional. A custom resource adds unnecessary code.

Question 10

A team wants to reduce the risk of configuration drift in Kubernetes deployments and keep a full history of changes. Which approach fits BEST?

  1. Kubernetes resources created through the console without version control
  2. GitOps with manifests in Git, reconciled by Argo CD or Flux — Correct
  3. Helm releases installed manually from engineers' laptops
  4. kubectl edit in production whenever a change is needed

Correct answer

GitOps with manifests in Git, reconciled by Argo CD or Flux

Explanation

GitOps keeps desired state and history in Git with automatic reconciliation. Manual edits and installs cause drift.

Ready for the full quiz?

Create a free QuizAnalyst account to practice the complete question set and save your progress.

Sign up free for the full quiz