AWS AppConfig Specialized2019年〜
A service for safely deploying and managing application configuration
What It Does
AWS AppConfig is a service for safely deploying and managing application configuration values and feature flags. It lets you apply configuration changes in real time without redeploying your application, and includes gradual rollout and rollback capabilities. Its validation feature reduces the risk of deploying incorrect configurations. AppConfig is provided as a feature of AWS Systems Manager.
Use Cases
AppConfig is used for gradual feature releases via feature flags, dynamic changes to application behavior parameters (timeout values, retry counts, etc.), environment-specific configuration management (development, staging, production), and toggling maintenance mode.
Everyday Analogy
Think of it like a TV remote control. You don't need to take apart the TV (application) and replace components - the remote (AppConfig) lets you freely adjust volume and brightness (configuration values). You can also make changes gradually to see the effect (gradual rollout) and easily revert them (rollback).
What Is AppConfig?
AWS AppConfig is a service for safely managing and deploying application configuration. Normally, changing how an application behaves requires modifying code and redeploying. With AppConfig, you can change application behavior by updating configuration values alone - no redeployment needed. It has built-in mechanisms to minimize the risk associated with configuration changes.
Feature Flags
AppConfig's feature flag capability lets you toggle new features on and off without code changes. For example, you can release a new search feature to only 10% of users, then gradually expand to 100% if there are no issues. If a problem occurs, simply disabling the flag immediately turns off the feature.
Safe Deployment
AppConfig includes mechanisms for safely deploying configuration changes. You can choose a deployment strategy that gradually applies configuration over a set period. If a CloudWatch alarm triggers during deployment, it automatically rolls back. You can also set up configuration validation (via JSON schema or Lambda functions) to prevent incorrect values from being deployed. To gain a deeper understanding of safe deployment practices, books on Amazon are also worth checking out.
Getting Started
In the Systems Manager console, go to the AppConfig menu to create an application and define environments (development, production, etc.). Create a configuration profile, register your configuration values, select a deployment strategy, and deploy. On the application side, use the AppConfig agent or API to retrieve configuration values. For Lambda functions, integration is easy using the Lambda Extension.
Things to Watch Out For
- AppConfig pricing is based on the number of configuration retrievals, with a free tier of 1 million configuration retrievals per month
- Configuration retrieval requires setting a polling interval - too short increases costs, too long delays configuration updates
- For choosing between SSM Parameter Store and AppConfig: use AppConfig when you need gradual deployment or validation, and Parameter Store for simple key-value storage