Configuration options for the AWS AppConfig extension in AWS Systems Manager Cloud Extensions
Configure the poll interval, the AWS Region, and the prefetch list of the AWS AppConfig extension in its profile entry. The AWS AppConfig extension has three settings. All three settings are optional. The extension checks the settings when it starts and on each update. If a value isn't valid, the extension doesn't start with it. For more information, see Errors that the AWS AppConfig extension in AWS Systems Manager Cloud Extensions returns.
Topics
Descriptions of settings
Poll interval (pollInterval)
-
Display name: Poll interval (seconds)
-
Type: Whole number of seconds
-
Default: 45 seconds
-
Range: 1 to 86,400 seconds
-
Description: How often, in seconds, the extension checks AWS AppConfig for a configuration update. The extension polls each configuration that it holds. Requests keep getting the cached configuration between polls and while a poll runs.
AWS region (region)
-
Display name: AWS region
-
Type: String, 1 to 64 characters
-
Default: The AWS Region of the runtime
-
Description: The AWS Region in which the extension calls AWS AppConfig. Every configuration that the profile entry reads comes from this Region.
Prefetch list (prefetchList)
-
Display name: Prefetch list
-
Type: List of up to 100 items. Each item has an
application(1 to 64 characters), anenvironment(1 to 64 characters), and aconfiguration(1 to 128 characters). Each is a name or an ID. -
Default: Empty
-
Description: Configurations that the extension retrieves from AWS AppConfig when it starts or receives a settings update. The first request for each one is then answered from the cache.
What each setting does in practice
-
Cache key – The extension keys each entry by the application, environment, and configuration exactly as you send them. The two operations share one entry and one poll for each configuration.
-
First request – A request for a configuration that isn't cached waits for the first retrieval from AWS AppConfig. The extension answers later requests from the cache.
-
Freshness – A new deployment reaches your application within about one Poll interval.
-
Change of the Poll interval – The extension schedules its polls with the new interval. It keeps the cached configurations.
-
Change of the AWS region – The extension empties its cache, and the next request for each configuration retrieves it from the new Region.
-
Change of the Prefetch list – The extension retrieves the configurations that you added.
-
New release – The new version of the extension takes over the cached configurations and the polls of the previous version.
Choosing values for the settings
| Goal | Suggested settings |
|---|---|
|
Default, balanced |
Poll interval 45 |
|
Changes must show up fast |
Poll interval 5 to 15 |
|
Fewer calls to AWS AppConfig |
A longer Poll interval, such as 300 |
|
Fast first request after a start |
List the configurations in Prefetch list |
|
Configurations in another Region |
AWS region set to that Region |
Changing the settings with the AWS CLI
To see the settings that the extension declares, with their IDs, types, default values, and constraints, run the following command:
aws cloudextensions get-extension \ --identifier aws:appconfig \ --query 'configuration.settings'
To set the values, use the --settings option when you create or update the profile entry. Use the setting IDs from the output of the previous command:
aws cloudextensions update-profile-entry \ --profile-identifier my-application \ --identifierprofile-entry-id\ --settings file://appconfig-settings.json
The following example file sets a poll interval of 15 seconds, the Region us-west-2, and one configuration to prefetch:
{ "pollInterval": 15, "region": "us-west-2", "prefetchList": [ { "application": "test-demo-app", "environment": "demo", "configuration": "checkout-flags" } ] }
The runtime validates the values against the setting definitions of the extension. To see the values that the extension uses, including default values, read the effectiveSettings field of the profile entry.