Course menuDOP-C02

Exams / DOP-C02 / Study guide / Application configuration and feature flags (AppConfig)

Application configuration and feature flags (AppConfig): DOP-C02 study notes and practice questions

What to know about Application configuration and feature flags (AppConfig) for the DOP-C02 exam, from the Configuration Management and IaC domain (17% of the exam guide), then 1 free question to test it. Part of the DOP-C02 study guide.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

AppConfig questions ask how to turn features on gradually or change settings without redeploying, with automatic rollback.

Building blocks

  • Application and environment (such as prod).
  • Configuration profile: where the data lives (the AppConfig hosted store, Parameter Store, Secrets Manager, S3) and its type: freeform or feature flags.
  • Validators: JSON Schema or a Lambda function check a configuration before it deploys.
  • Deployment strategy: how fast to roll out.

Deployment strategies

Setting Means
Deployment time How long to reach 100%
Growth type Linear or exponential
Growth factor Percentage added each step
Final bake time How long to watch alarms after reaching 100%

Predefined strategies include AppConfig.Linear50PercentEvery30Seconds, AppConfig.Canary10Percent20Minutes and AppConfig.AllAtOnce.

  • CloudWatch alarms on the environment trigger automatic rollback if they fire during deployment or bake time.

Retrieving configuration

  • The AppConfig Agent (sidecar or Lambda extension) polls and caches configuration, so the app reads it locally with no API code.
  • Entity-based gradual deployment through the agent keeps a given user or entity on the same value throughout a rollout.
  • Multi-variant feature flags return different values based on context (such as user segment).

Why not just Parameter Store?

Parameter Store holds values, but AppConfig adds validation, gradual rollout, bake time and rollback, which questions about “safely enabling a feature for a small percentage first” need.

Common traps

  • Redeploying code to flip a feature.
  • Parameter Store alone when the ask is gradual rollout with rollback.
  • Polling the AppConfig API on every request instead of using the agent’s cache.
  • No validator, so a typo in JSON reaches every host before anyone notices.

Try the 1 practice question

A game studio is turning on a new matchmaking algorithm for its live players. The algorithm is controlled by a feature flag that the game service reads from AWS AppConfig.

The studio wants the new algorithm enabled gradually, starting with a small share of players and increasing over about 30 minutes. A player who has received the new algorithm should keep it for the rest of the rollout, whichever game server handles the request. If the service's error alarm goes into ALARM during the rollout, the flag should be rolled back automatically without a code deployment.

Which approach meets these requirements?

Choose one answer.

  1. A. Deploy the feature flag with an AppConfig entity-based gradual deployment keyed on player ID, and add a monitor on the error alarm so the rollout reverts when it fires.
  2. B. Store the flag in an environment variable in the game service's container definition, and redeploy the service with a new value whenever the studio wants to change the rollout.
  3. C. Write the flag to a Parameter Store parameter, and run a Lambda function on a schedule that increases a percentage in the parameter while a human checks the error dashboard.
  4. D. Change the feature flag in the game's launch configuration file and let each game server reload the file on its next restart, so that players move to the new algorithm over time.
Show the answer and explanation

Answer: A

  • A. Right: Correct. AppConfig deploys flag changes in stages under a deployment strategy, and an entity-based gradual deployment keeps each player on the same flag value during the rollout. A monitor based on the CloudWatch alarm rolls the deployment back automatically. Learn more: Working with deployment strategies (opens in a new tab)
  • B. Wrong: Each change would need a new deployment, so the rollout is not gradual and rollback is slow. The error alarm would also not reverse the change automatically.
  • C. Wrong: A scheduled function can change the value, but nothing reverts it automatically when the alarm fires. The rollback depends on a person checking the dashboard. Learn more: AWS Systems Manager Parameter Store (opens in a new tab)
  • D. Wrong: Restarts happen on their own schedule, so the rollout is uneven and hard to control. No alarm is connected to the change, so a bad algorithm would keep running until someone notices.

Explanation

AppConfig feature flags can be deployed with a strategy that adds the change in stages over a set time, and an entity-based gradual deployment through AppConfig Agent keeps each player on the value they first received. A monitor tied to a CloudWatch alarm rolls the deployment back when the alarm fires. Environment variables, scheduled scripts and restarts either need a redeployment or leave the rollback to people.

Study

Want more on Application configuration and feature flags (AppConfig)? The 5 full-length practice sets have 7 more Application configuration and feature flags (AppConfig) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets

Study Application configuration and feature flags (AppConfig)

More Configuration Management and IaC topics