Using Console
Using CLI
<stack-name>
with the name of the stack that you want to apply the policy to and <path-to-policy-file>
with the path to the policy file on your local machine.<stack-name>
with the name of the stack that you applied the policy to.Using Python
STACK_NAME
with the name of the stack for which you want to remediate the misconfiguration.This code will retrieve the stack policy for the specified stack, check if it contains a fail-safe mechanism (a deny statement with action ”*”), and remove it if found. Finally, it will update the stack policy with the new policy that includes the fail-safe mechanism.