Easy ReviewDOP-C02
Configuration Management and IaC25

AppConfig

Validate settings before deployment, release configuration gradually, and use alarms to roll back harmful changes.

Este conteúdo de estudo ainda não foi traduzido, então aparece em inglês. Ajude a traduzir

AWS AppConfig changes application behavior through settings and feature flags without redeploying code. Configuration profiles locate the data and attach validation checks. Deployment strategies control rollout, while applications retrieve released configuration and CloudWatch alarms can trigger rollback.

Configuration validation

AWS AppConfig validation checks application settings before they reach running applications. A configuration profileA record that identifies a configuration's type and storage location. is the record that tells AppConfig what kind of data to use and where to find it. ValidatorsA schema or function that checks configuration structure or meaning before deployment proceeds. check its structure or whether its values make sense for the application.

How it works

  1. Create an AppConfig application, a namespaceAn organizational grouping for related configuration resources. that groups related configuration resources. Choose a feature flagA configuration setting that enables or disables an application feature., a setting that enables or disables a feature, or a freeform configurationApplication settings that an AppConfig profile locates in a supported configuration store., a collection of application settings.
  2. Create a configuration profile with the data’s URIAn identifier AppConfig uses to locate configuration in its storage source., its storage address. Feature flags use hosted. For existing external data, point the profile to its store.
  3. Give AppConfig an IAM retrieval roleAn IAM role that gives AppConfig permission to read a profile's configuration source., a permission identityAn AWS identity with permissions that a trusted caller can assume. that can read that source. The hosted store and CodePipeline do not require this role.
  4. Attach optional validators. JSON_SCHEMA checks allowed properties; LAMBDA runs custom logic. AppConfig already applies a schemaA set of rules describing allowed properties in configuration data. to feature flags.
  5. Start a deployment. AppConfig runs the configured checks and stops on validation errors before changing targetsAn application or application component receiving configuration through an AppConfig environment., the applications receiving configuration. ValidateConfigurationActivity also invokes a configured validation Lambda.
Freeform source Profile setup
AppConfig hosted store Use hosted; no retrieval role required.
Amazon S3 Create the object first; supply a retrieval role.
CodePipeline Use the pipeline as the source; no retrieval role required.
Secrets Manager Create the secret first; supply a retrieval role.
Systems Manager Parameter Store Create the parameter first; supply a retrieval role.
Systems Manager document store Supply a retrieval role; the configuration requires an associated JSON Schema.

Exam cues

  • If the question says settings already live in S3 or Parameter Store, think a freeform profile pointing to that store, because AppConfig can use existing configuration sources.
  • If the question says reject a business-rule violation before release, think a Lambda validator, because it can check the meaning of values.
  • If the question says malformed settings must never reach targets, think profile validators, because failure stops deployment before targets change.

Remember

  • Profiles allow zero to two validators.
  • Inline schemas support JSON Schema 4.X. Use Lambda for another version.
  • A validation Lambda has 15 seconds including startup and must permit appconfig.amazonaws.com to invoke it.
  • Reject invalid data by throwing an exception in the validation Lambda.
  • SSM document configurations require a schema; Parameter Store validation is optional.

Trap: A syntactically valid configuration can still contain values that violate application rules. Use a Lambda check for those rules.

Trap: Feature flags already receive automatic schema validation. Custom JSON Schema validators apply to freeform profiles; Lambda validators support both profile types.

Da documentação da AWS (19)
  • An AppConfig configuration profile identifies the configuration type and the URI where its data is stored.
  • An AppConfig application is a namespace that groups configuration resources.
  • Feature flags enable or disable application features and use the AppConfig hosted configuration store with the URI hosted.
  • Freeform profiles support the AppConfig hosted store, Amazon S3, CodePipeline, Secrets Manager, Systems Manager Parameter Store, and Systems Manager document store.
  • Create the parameter, secret, or S3 object before creating its AppConfig freeform configuration profile.
  • A profile needs an IAM retrieval role for its configuration source, except for the AppConfig hosted store and CodePipeline.
  • An IAM role is an AWS permission identity that a service or other trusted caller can assume.
  • A configuration profile can specify zero to two validators.
  • AppConfig validator types are JSON_SCHEMA and LAMBDA, which check configuration structure or meaning before deployment can proceed.
  • AppConfig runs the configured validators when deployment starts and stops an invalid deployment before changing any targets.
  • A JSON Schema defines allowed properties for configuration settings.
  • Lambda validators support feature flags and freeform configurations; custom JSON Schema validators support freeform configurations, while AppConfig automatically checks feature flags against a JSON Schema.
  • Inline JSON Schema supports version 4.X; use a Lambda validator for another schema version.
  • StartDeployment and ValidateConfigurationActivity invoke a configured validation Lambda.
  • The validation Lambda must allow appconfig.amazonaws.com to invoke it.
  • A validation Lambda has 15 seconds, including startup latency.
  • A validation Lambda rejects configuration by throwing an exception, which sets the X-Amz-Function-Error response header.
  • Configuration stored in an SSM document must pass an associated JSON Schema before it can be added.
  • SSM parameters do not require a validation method, but AWS recommends a Lambda validation check for new or updated parameter configurations.

Deployment strategies and alarm rollback

AWS AppConfig releases configuration changes separately from application code. A deployment strategyA plan specifying configuration rollout timing, growth, and final alarm monitoring. controls how quickly targetsAn application or application component receiving configuration through an AppConfig environment. receive a setting or feature flagA configuration setting that enables or disables an application feature.. CloudWatch alarmsA check that compares a measured value or expression with a threshold over time. can restore the previous version if the change causes problems.

How it works

  1. Define an environmentA logical group of application targets that receive a configuration deployment., a group of application targets receiving configuration. Associate CloudWatch health alarms, checks that compare a measured value with a threshold over time. Supply a monitoring roleAn AWS identity with permissions that a trusted caller can assume. that trusts appconfig.amazonaws.com and allows cloudwatch:DescribeAlarms.
  2. Start deployment with the application, environment, profileA record that identifies a configuration's type and storage location., configuration version, and strategy. Deployment time is the rollout window, not a timeout.
  3. The strategy releases configuration in stages. Its growth factorThe percentage of callers targeted at a configuration deployment step. is the percentage of callers targeted per step. LINEAR uses equal increments; EXPONENTIAL uses G*(2^N), with growth factor G and step number N starting at zero.
  4. Applications retrieve the available configuration. AWS recommends AppConfig Agent, which keeps a local copy and pollsRepeatedly asking the service whether configuration updates are available., meaning it repeatedly checks the service for changes. A direct client starts a session once and then calls GetLatestConfiguration periodically.
  5. Monitor environment alarms during rollout. ALARM or INSUFFICIENT_DATA triggers rollbackRestoring the previous configuration version when stopping a harmful deployment. to the previous configuration when monitoring permissions and alarm actions are enabled.
  6. After configuration reaches 100% of targets, continue monitoring for final bake timeThe alarm observation period after configuration reaches every target and before deployment completes., the observation period before completion. An alarm can still trigger rollback here.
Predefined strategy Rollout Final alarm monitoring
AppConfig.Linear20PercentEvery6Minutes 20% every six minutes over 30 minutes 30 minutes
AppConfig.Canary10Percent20Minutes Exponential, 10% growth factor over 20 minutes 10 minutes
AppConfig.AllAtOnce Immediately to every target 10 minutes
AppConfig.Linear50PercentEvery30Seconds Half every 30 seconds over one minute One minute; AWS recommends this strategy only for tests or demonstrations

For direct retrieval, StartConfigurationSession returns an initial token, a value tracking the retrieval session. Use it in the first GetLatestConfiguration call. Each response returns NextPollConfigurationToken and NextPollIntervalInSeconds: wait that interval and use the new token next. An empty configuration body can mean your client already has the latest version, so keep its current settings.

Exam cues

  • If the question says enable already deployed functionality gradually, think an AppConfig feature flag and deployment strategy, because configuration can change behavior without another code release.
  • If the question says restore settings when health degrades, think environment alarms plus a monitoring role, because alarm states drive rollback.
  • If the question says failure occurs after every target has received the change, think final bake time, because monitoring continues before completion.
  • If the question says applications need configuration updates with local reads, think AppConfig Agent, because it caches settings and polls for changes.
  • If the question says stop a bad release while it is progressing, think StopDeployment, because it supports manual rollback.
  • If the question says a completed release must be undone within 72 hours, think StopDeployment with AllowRevert, because it can revert a completed deployment.

Remember

  • Deployment time and final bake time are separate periods.
  • Automatic rollback responds to ALARM and INSUFFICIENT_DATA. Disabled alarm actions prevent it.
  • The monitoring role belongs to the current account. Alarms are in that account by default.
  • Retrieval tokens are single use, even though each is valid for up to 24 hours.
  • The direct polling interval defaults to 60 seconds unless a desired interval is supplied through RequiredMinimumPollIntervalInSeconds. Follow the returned interval.
  • A completed deployment can be reverted within 72 hours and receives status REVERTED.

Trap: A deployment at 100% can still roll back during final bake time. AppConfig.AllAtOnce also has an observation period.

Trap: Creating alarms alone does not configure rollback. Associate them with the environment, grant monitoring permissions, and keep alarm actions enabled.

Trap: Deploying configuration does not remove the need for application retrieval. Poll with the agent or a direct API client; do not create a new session for every poll.

Reach every target, then finish the bake period
123AppConfigGradual rolloutiTargets100% reachedCloudWatchFinal bake periodiComplete
  1. Release configuration according to the strategy while monitoring alarms.

  2. After reaching every target, continue alarm monitoring for the final bake time.

  3. Complete when the bake period finishes without triggering rollback.

Detalhes das caixas (2)
AppConfig

The deployment strategy controls how configuration becomes available to targets.

CloudWatch

Continue monitoring configured alarms. ALARM or INSUFFICIENT_DATA can trigger rollback during deployment, including bake time, when alarm actions are enabled.

Direct configuration retrieval uses a session and fresh tokens
StartConfigurationSession1InitialConfigurationToken2GetLatestConfiguration3Next token and interval4GetLatestConfiguration5ClientStart sessionAppConfigInitial tokenClientGet configurationAppConfigData and next tokeniClientWait, then poll againAppConfigSame session, new token
  1. Establish the session for the application, environment, and profile.

  2. Use the initial token for the first configuration request.

  3. Receive configuration, a fresh token, and the next polling interval.

  4. Keep the returned token and wait for the returned polling interval.

  5. Repeat GetLatestConfiguration with the fresh token in the same session.

Detalhes das caixas (1)
AppConfig

The response includes the next token and polling interval. Configuration data can be empty when unchanged.

Da documentação da AWS (27)
  • AppConfig changes application behavior through feature flags and dynamic configuration without redeploying application code.
  • An AppConfig environment groups deployment targets and can have CloudWatch alarms associated with it.
  • A CloudWatch metric alarm compares a metric or expression with a threshold over time.
  • StartDeployment identifies the application, environment, configuration profile, configuration version, and deployment strategy.
  • LINEAR deployments add the configured growth-factor percentage of targets at evenly spaced intervals.
  • EXPONENTIAL deployments grow according to G*(2^N), where G is the growth factor and N is the step number starting at zero.
  • Growth factor, also called step percentage, specifies the percentage of callers targeted at a deployment step.
  • Deployment time is the window over which configuration rolls out in intervals, not a timeout.
  • Final bake time monitors configured CloudWatch alarms after configuration reaches 100% of targets and before deployment completes; an alarm can cause rollback during this period.
  • AppConfig.Linear20PercentEvery6Minutes releases 20% every six minutes over 30 minutes, followed by 30 minutes of alarm monitoring.
  • AppConfig.Canary10Percent20Minutes uses exponential growth with a 10% growth factor over 20 minutes, followed by 10 minutes of alarm monitoring.
  • AppConfig.AllAtOnce releases to all targets immediately, followed by 10 minutes of alarm monitoring.
  • AppConfig.Linear50PercentEvery30Seconds releases half the targets every 30 seconds over one minute, followed by one minute of alarm monitoring, and AWS recommends it only for tests or demonstrations.
  • A configured CloudWatch alarm entering ALARM or INSUFFICIENT_DATA during deployment causes automatic rollback to the previous configuration version.
  • Disabling actions on an associated CloudWatch alarm prevents automatic AppConfig rollback for that alarm.
  • The alarm-monitoring IAM role must allow cloudwatch:DescribeAlarms and trust appconfig.amazonaws.com.
  • The alarm-monitoring role must be in the current account, and AppConfig monitors only alarms in that account by default.
  • StopDeployment can manually roll back an in-progress AppConfig deployment.
  • StopDeployment with AllowRevert can revert a completed deployment within 72 hours of completion and sets its status to REVERTED.
  • AWS recommends AppConfig Agent for retrieval; it caches configuration locally and polls the data plane asynchronously for updates.
  • A direct client starts a configuration session using application, environment, and profile identifiers, then periodically calls GetLatestConfiguration.
  • StartConfigurationSession is called once per application, environment, profile, and client to establish a retrieval session.
  • StartConfigurationSession returns InitialConfigurationToken for the first GetLatestConfiguration request.
  • Each GetLatestConfiguration request consumes a single-use token, and its response supplies NextPollConfigurationToken for the next request.
  • Configuration retrieval tokens remain valid for up to 24 hours but may each be used only once.
  • Clients must wait the returned NextPollIntervalInSeconds before polling again; its default is 60 seconds unless RequiredMinimumPollIntervalInSeconds specifies a desired interval.
  • GetLatestConfiguration can return an empty configuration body when the client already has the latest version.

Flashcards

toque para virar
Resposta

·

Todos os 25 flashcards em lista

What does an AWS AppConfig configuration profile identify?

The configuration type and its storage URI, the address AppConfig uses to find the data.

An application already keeps settings in S3. How can a team add AWS AppConfig validation without moving those settings?

Create a freeform profile pointing to the S3 object, grant a retrieval role access, and attach validators. Invalid configuration stops before targets change.

How many validators can an AWS AppConfig configuration profile have, and what are their API types?

Zero to two. The types are JSON_SCHEMA and LAMBDA.

A team needs AWS AppConfig to reject settings that violate an application business rule. Which validator fits?

A Lambda validator. It can check the meaning of values with custom logic and reject invalid data by throwing an exception.

An AWS AppConfig freeform configuration requires a newer JSON Schema version than 4.X. How should the team validate it?

Use a Lambda validator. Inline JSON Schema supports version 4.X.

What permission and runtime constraint apply to an AWS AppConfig validation Lambda?

Allow appconfig.amazonaws.com to invoke the function. Validation has 15 seconds including startup.

Which AWS AppConfig operations invoke a configured validation Lambda?

StartDeployment and ValidateConfigurationActivity.

Where does AWS AppConfig store feature flags, and how are they validated?

In the hosted configuration store, using the URI hosted. AppConfig applies a JSON Schema automatically; a Lambda validator can add custom checks.

Does AWS AppConfig require the same validation setup for SSM documents and Parameter Store parameters?

No. An SSM document requires its associated JSON Schema. Parameter validation is optional, although AWS recommends a Lambda check.

Which freeform configuration sources can an AWS AppConfig profile use?

AppConfig hosted store, S3, CodePipeline, Secrets Manager, Systems Manager Parameter Store, and Systems Manager document store.

A team has deployed application code and needs to enable its feature gradually without another code deployment. Which AWS service fits?

AWS AppConfig. Release a feature flag gradually with a deployment strategy and configure CloudWatch alarms for rollback.

Which AWS service gradually releases changed settings without redeploying code and restores the previous configuration if health alarms trigger?

AWS AppConfig. Choose a deployment strategy, associate environment alarms, and grant monitoring permissions. Alarm monitoring continues through final bake time.

How do AWS AppConfig LINEAR and EXPONENTIAL deployment strategies differ?

LINEAR adds equal growth-factor increments at evenly spaced intervals. EXPONENTIAL grows according to G*(2^N), starting with N equal to zero.

An AWS AppConfig deployment has reached every target. Why can an alarm still roll it back before completion?

Final bake time continues alarm monitoring after 100% of targets have configuration. Reaching every target does not end deployment monitoring.

Which CloudWatch alarm states cause automatic rollback during an AWS AppConfig deployment when monitoring is configured?

ALARM or INSUFFICIENT_DATA. AppConfig restores the previous configuration version.

An AWS AppConfig environment has a configured alarm and monitoring permissions, but someone disabled the alarm's actions. Will that alarm trigger automatic rollback?

No. Automatic rollback does not occur for an associated alarm with disabled actions.

What IAM setup does AWS AppConfig require to monitor CloudWatch alarms for rollback?

An environment monitoring role with cloudwatch:DescribeAlarms that trusts appconfig.amazonaws.com. The role must belong to the current account.

What rollout and bake times does AppConfig.Linear20PercentEvery6Minutes use in AWS AppConfig?

Release 20% every six minutes over 30 minutes, then monitor alarms for another 30 minutes.

Does AWS AppConfig's AppConfig.AllAtOnce strategy finish immediately after releasing configuration to every target?

No. It releases immediately but continues monitoring alarms for 10 minutes before completion.

An AWS AppConfig deployment completed an hour ago and the team must restore its previous configuration. Which API option supports this?

StopDeployment with AllowRevert. Completed deployments can be reverted within 72 hours, changing their status to REVERTED.

How should an application retrieve AWS AppConfig settings while avoiding a remote request for every local configuration read?

Use AppConfig Agent. It caches configuration locally and polls asynchronously for updates.

A team must change application behavior without releasing new application code. Which configuration service fits?

Use AWS AppConfig feature flags or dynamic configuration.

A team needs a gradual configuration rollout with automatic recovery when a CloudWatch alarm triggers. Which service fits?

Use AWS AppConfig with a deployment strategy and an alarm associated with the environment. An alarm in ALARM or INSUFFICIENT_DATA causes rollback.

A team needs to release a configuration to all targets immediately but monitor alarms before completion. Which AWS AppConfig strategy fits?

Use AppConfig.AllAtOnce. It releases immediately and then monitors alarms for 10 minutes.

A team wants AWS AppConfig to roll out a configuration in equal increments and monitor alarms after reaching all targets. What should it configure?

Use a LINEAR deployment strategy and configure final bake time for alarm monitoring.

Você concluiu todos os tópicos da DOP-C02!

Seu badge ficou dourado. Próximo passo: agendar a prova na AWS. Depois de passar, adicione-se ao Quem passou.

Compartilhar

Conte que você concluiu esta certificação

Concluí todos os tópicos da AWS Certified DevOps Engineer - Professional (DOP-C02) no Easy Review. Venha estudar também!