Using AppConfig feature flags in CDK application

0

I want to use AppConfig feature flags in an application that is completely defined with CDK. Deployment is automated using CodePipeline that is triggered by changes in github repo. I would like to be able to deploy the AppConfig and the initial state of the flags as a part of the application deployment. I am trying to figure out a way to be able to make use of toggling the feature flags in AWS console without redeploying the whole application. My problem is, how does one deal with the values in the code falling out of sync with the flags that are toggled from console (For example when the branch is first deployed my_flag is False, and later I toggle it to True. Then I make some code change and push it and now there is a clash between the state of the flag in code and in reality, that was changed via console.) What is the best practice for reconciling use of IaC and AWS console here?

1 Answer
0

My recommendation would be to use AWS AppConfig extensions - either use an existing AWS authored extension or author your own that will invoke the AWS AppConfig ON_DEPLOYMENT_COMPLETE action to push the update to your code repo in Github. You would likely need to handle ON_DEPLOYMENT_ROLLED_BACK should a rollback occur as well.

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions