Courseiva
Configuration Management and IaChardMultiple ChoiceObjective-mapped

Troubleshooting State Manager Associations Not Applying to New Instances

A company runs a critical web application on AWS using an Auto Scaling group of EC2 instances behind an Application Load Balancer. The application is deployed using AWS CodeDeploy with a blue/green deployment configuration. The DevOps team is responsible for configuration management using AWS Systems Manager State Manager. They have set up a State Manager association to ensure that the instances have a specific security configuration (e.g., firewall rules). Recently, after a new deployment, the team noticed that the security configuration is missing on some new instances. The old instances still have the correct configuration. The association is configured to apply the configuration only at instance launch (using the AWS-RunShellScript document). The team suspects that the new instances are not being targeted by the association. Upon investigation, they find that the association is set to target instances based on tags, and the new instances do have the required tags. However, the association status shows 'Success' for the old instances but no status for the new instances. Which of the following is the MOST likely cause of this issue?

Quick Answer

The answer is that the State Manager association was created before the new instances were launched and is not configured to automatically apply to new instances, so it must be updated or scheduled to run periodically. This is because State Manager associations are point-in-time configurations that target only the instances that exist when the association is created, even when using tag-based targeting; new instances launched later are not automatically included unless the association has a recurring schedule or the "Apply only at next update" option is enabled. On the AWS Certified DevOps Engineer Professional DOP-C02 exam, this scenario tests your understanding that an association set to run "at launch" applies only to instances that are launched while the association is actively being applied, not to instances launched after the association was created—a common trap where candidates confuse tag-based targeting with dynamic instance discovery. Remember the memory tip: "Associations are snapshots, not filters; schedule them to catch the newcomers."

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

The State Manager association was created before the new instances were launched, and the association is not configured to automatically apply to new instances. The association needs to be updated or scheduled to run periodically.

State Manager associations are created at a specific time and target instances that exist at that time. New instances launched after the association creation will not automatically be targeted unless the association is configured with a schedule or the 'Apply only at next update' option. The association is set to run only at launch, but the association itself must be applied to the instance at launch time. If the association was created before the new instances, it won't apply to them unless it is updated. Option B is wrong because the association can target instances by tags; tagging is not the issue. Option C is wrong because the problem is not about the script failing; the association is not running on new instances. Option D is wrong because the S3 bucket policy would affect the ability to store logs, but the association status would show error, not missing status.

Answer analysis

Option-by-option breakdown

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

  • The State Manager association was created before the new instances were launched, and the association is not configured to automatically apply to new instances. The association needs to be updated or scheduled to run periodically.

    Why this is correct

    Associations only apply to instances that exist at the time of association creation unless configured otherwise.

  • The new instances have a different tag than the one specified in the association.

    Why it's wrong here

    The stem says the instances have the required tags.

  • The association is trying to download a script from an S3 bucket, but the bucket policy denies access to new instances.

    Why it's wrong here

    If access were denied, the association would show failure status.

  • The AWS-RunShellScript document failed to execute on the new instances due to a missing IAM role.

    Why it's wrong here

    The association status would show 'Failed', not missing.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

One of 251 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 runs a production e-commerce platform on AWS. The architecture includes an Application Load Balancer (ALB) distributing traffic across EC2 instances in an Auto Scaling group. The application uses a custom configuration stored in an S3 bucket. The DevOps team uses AWS CodeDeploy to deploy application updates. Recently, a deployment failed because new instances launched by the Auto Scaling group did not have the latest configuration from S3. The team had manually updated the configuration in S3 but the deployment did not pull the new version. The team wants to ensure that all instances always have the latest configuration at launch. Current setup: The Auto Scaling group uses a launch template that specifies an IAM instance profile with permissions to read from S3. The user data script runs at launch to download configuration from S3. However, the user data script is static and does not account for configuration updates. The team wants a solution that automatically applies configuration changes to both existing and new instances without manual intervention.

hard
  • A.Use AWS Config with a custom rule to detect instances that do not have the latest configuration and trigger a Lambda function to update them.
  • B.Update the launch template with a new user data script that always fetches the latest configuration from S3. Then, update the Auto Scaling group to use the new launch template version.
  • C.Configure AWS CodeDeploy to deploy the configuration to all instances whenever the S3 object is updated, using an S3 event notification.
  • D.Use AWS Systems Manager State Manager to associate a document that runs on all instances to fetch the latest configuration from S3 on a schedule and at instance startup.

Why D: AWS Systems Manager State Manager can enforce desired configuration on instances, pulling the latest config from S3 on a schedule and at instance startup, covering both existing and new instances. Option A is incorrect because AWS Config is for compliance monitoring, not for pushing configuration updates. Option B is incorrect because updating the launch template's user data only affects new instances launched after the change, not existing instances. Option C is incorrect because CodeDeploy is designed for application deployments and does not automatically trigger at instance launch without additional lifecycle hooks.

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.