Search code examples
aws-cloudformationaws-ssm

CloudFormation create initial SSM parameter but allow future updates from UI console


I'm trying to figure the proper way of managing CloudFormation templates when SSM parameters are updated from AWS Console/UI and not always ported back to CloudFormation templates in Value attributes.

Perhaps those parameters should be created manually instead and referenced via resolve dynamic references? Or should this be "import existing AWS resources" into stack instead?

The reason why I went with SSM & CF is because I wanted to version control parameter names and not necessarily parameter values.


Solution

  • CloudFormation will resolve the parameter values when it is creating or updating the stack. Any changes to the parameters that you are referencing, will not signal the CloudFormation stacks to be updated. As is stated in the documentation as follows:

    When you use a dynamic reference, CloudFormation retrieves the value of the specified reference when necessary during stack and change set operations.

    So any time you update the parameter value, you have to update the stack. You can either do this manually or create some kind of automation e.g., using CloudTrail and Lambda.