💾 Archived View for cfdocs.wetterberg.nu › stackinstances-override.gemini captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Override parameters on stack instances

Search

In certain cases, you might want stack instances in certain Regions or accounts to have different property values than those specified in the stack set itself. For example, you might want to specify a different value for a given parameter based on whether an account is used for development or production. For these situations, AWS CloudFormation allows you to override parameter values in stack instances by account and Region. You can override template parameter values when you first create the stack instances, and you can override parameter values for existing stack instances. You can only set parameters you've previously overridden in stack instances back to the values specified in the stack set.

Parameter value overrides apply to stack instances in the accounts and Regions you select. During stack set updates, any parameter values overridden for a stack instance are not updated, but retain their overridden value.

You can only override parameter *values* that are specified in the stack set; to add or delete a parameter itself, you need to update the stack set template. If you add a parameter to a stack set template, then before you can override that parameter value in a stack instance you must first update all stack instances with the new parameter and value specified in the stack set. Once all stack instances have been updated with the new parameter, you can then override the parameter value in individual stack instances as desired.

To learn how to override stack set parameter values when you create stack instances, see Add stacks to a stack set.

Add stacks to a stack set

Override parameters on stack instances using the AWS Management Console

https://console.aws.amazon.com/cloudformation

Create a stack set

Create a stack set

Create a stack set

Create a stack set

Acknowledging IAM resources in AWS CloudFormation templates

Override parameters on stack instances using the AWS CLI

Run the `update-stack-instances` AWS CLI command, specifying `--parameter-overrides`. For more information about specifying `--parameter-overrides`, see Parameter in the AWS CloudFormation API Reference, and https://docs.aws.amazon.com/cli/latest/reference/cloudformation/update-stack-instances.html in the *AWS CLI Command Reference*.

Parameter

https://docs.aws.amazon.com/cli/latest/reference/cloudformation/update-stack-instances.html

In the example command shown here, we change the default snapshot delivery frequency for delivery channel configuration from *TwentyFour\_Hours* to *Twelve\_Hours* for the specified stack instances.