Override controls for an operation
When a control in FAIL mode stops an operation that you intend to run, rerun
the operation with the DisableValidation parameter. The parameter is available on
CreateStack, UpdateStack, and CreateChangeSet.
What DisableValidation skips
DisableValidation skips the data protection and business continuity controls and
early validation for that operation. Hooks that you create still run. For more information about
early validation, see Validate
stack deployments in the CloudFormation User Guide.
By default, any principal that is allowed to call CreateStack,
UpdateStack, or CreateChangeSet can pass
DisableValidation.
The following example updates a stack with the --disable-validation
option.
aws cloudformation update-stack \ --stack-nameMyStack\ --template-bodyfile://template.yaml\ --disable-validation
Keep the decision to rerun with DisableValidation with a person, instead of an
automatic retry in a pipeline.
Control who can use DisableValidation
To control which principals can pass DisableValidation, use the
cloudformation:DisableValidation condition key. The key is a Boolean.
You can deny the actions when the key is true, or allow the actions only
when the key is false.
The following IAM policy denies cloudformation:CreateStack,
cloudformation:UpdateStack, and
cloudformation:CreateChangeSet when
cloudformation:DisableValidation is true.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "DenyProactiveControlOverride", "Effect": "Deny", "Action": [ "cloudformation:CreateStack", "cloudformation:UpdateStack", "cloudformation:CreateChangeSet" ], "Resource": "*", "Condition": { "Bool": { "cloudformation:DisableValidation": "true" } } } ] }
To use the equivalent allow statement, allow the same actions with the condition
value set to false.