1 Answer
- Newest
- Most votes
- Most comments
0
Using the Feature Flags configuration type means you need to use the new AppConfigData API instead of the original AppConfig API. The new API works in a slightly different way to the old one:
- You must call
startConfigurationSession
before you do anything else with the service. This API call takes the application, environment and profile ids, and returns aninitialConfigurationToken
, which your application should store. - To receive the configuration initially, you call
getLatestConfiguration
, to which you should pass the stored configuration token. The response to this includes anextPollConfigurationToken
which your application should store. It also includesnextPollIntervalInSeconds
, which is the number of seconds your application should wait before requesting the configuration again. - You can now call
getLatestConfiguration
to check for configuration updates. You should supply the most recentnextPollConfigurationToken
you received, and store the new one you get in the response to this call. Note that if the configuration has not changed since you last received it, theconfiguration
in the response will be blank. You will also receive a newnextPollIntervalInSeconds
(which may be the same value as before), so you should track the new value.
I don't have a Java code sample I'm afraid, but the AppConfig docs show the API call flow using the CLI: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-retrieving-the-configuration.html
There's also a sample Python AppConfig helper library which implements this API version, which you may find useful to see how it interacts with it: https://github.com/aws-samples/sample-python-helper-aws-appconfig/blob/main/appconfig_helper/appconfig_helper.py
Relevant content
- asked 2 months ago
- asked a year ago
- asked 2 years ago
- asked 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago