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 個回答
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
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南