Courseiva
Configuration Management and IaCeasyMultiple ChoiceObjective-mapped

DOP-C02 Configuration Management and IaC Practice Question

A company uses AWS OpsWorks for configuration management. The DevOps team wants to automate the patching of operating system updates on a set of EC2 instances managed by OpsWorks. Which OpsWorks feature should be used?

⚠ Common exam trap

Candidates often confuse lifecycle events (which are powerful for custom automation) with the built-in patching feature, overlooking the simpler Weekly Auto Update option that directly addresses the patching requirement without custom recipes.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Weekly Auto Update

AWS OpsWorks Stacks provides a built-in 'Weekly Auto Update' feature that automatically installs operating system updates on managed EC2 instances. This feature is specifically designed to automate OS patching without requiring custom recipes or manual intervention, making it the correct choice for the DevOps team's requirement.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Weekly Auto Update

    Why this is correct

    Weekly Auto Update is a built-in OpsWorks Stacks feature that schedules automatic installation of operating system updates on a weekly basis. You configure a maintenance window per layer, and OpsWorks applies patches to existing instances using the OS package manager during that window. This directly addresses the company's requirement for automated patch management without the need for custom Chef recipes.

  • Auto Scaling

    Why it's wrong here

    Auto Scaling in OpsWorks Stacks dynamically adjusts the number of instances in a layer based on load or a schedule, but it performs no OS-level patching. Scaling out with a fresh AMI might introduce updated software if the AMI was rebuilt, but that is an infrastructure refresh strategy, not an automated patching feature within the stack. Regardless, Auto Scaling does not update packages on running instances and cannot fulfill a weekly patching requirement.

  • Chef Automate

    Why it's wrong here

    Chef Automate is a standalone Chef product that provides continuous automation, compliance, and workflow capabilities; it is not a feature of AWS OpsWorks Stacks. While OpsWorks can use Chef recipes and integrate with Chef servers, Chef Automate is neither required nor automatically connected to OpsWorks for patch management. Opting for Chef Automate would mean deploying a separate external platform, not leveraging a native OpsWorks functionality, making it an incorrect choice here.

  • Lifecycle events (Setup, Configure, Deploy, etc.)

    Why it's wrong here

    Lifecycle events in OpsWorks Stacks (Setup, Configure, Deploy, Undeploy, Shutdown) trigger custom Chef recipes at specific points in an instance's lifecycle, such as when an instance finishes booting or when a deploy occurs. These events can execute update commands, but they are not a scheduled patching feature; they fire only when the corresponding lifecycle state is reached. To achieve weekly patching via lifecycle events, you would need to implement your own cron or timer logic in recipes, which is not the built-in, automated weekly update mechanism. Thus, lifecycle events do not meet the requirement as a native patching solution.

About these practice questions

This DOP-C02 question is part of Courseiva's 1,013-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DOP-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company wants to use AWS OpsWorks for configuration management of their EC2 instances. They need to ensure that the instances are automatically configured with the latest security patches upon boot. Which OpsWorks feature should they use?

easy
  • A.Create a custom Chef recipe that installs security patches and assign it to the setup lifecycle event.
  • B.Configure the instances to run a user data script that updates packages.
  • C.Use AWS Systems Manager Patch Manager with an OpsWorks lifecycle event.
  • D.Use a CloudFormation template to apply patches during stack creation.

Why A: AWS OpsWorks uses Chef recipes to manage instance configuration. By creating a custom Chef recipe that installs the latest security patches and assigning it to the 'setup' lifecycle event, the recipe runs automatically on every new instance boot, ensuring patches are applied before the instance enters service. This is the native OpsWorks mechanism for configuration management during instance provisioning.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.