Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Hook configuration schema syntax reference

Focus mode
Hook configuration schema syntax reference - AWS CloudFormation

This section outlines the schema syntax used to configure Hooks. CloudFormation uses this configuration schema at runtime when invoking a Hook in an AWS account.

To enable your Hook to proactively inspect the configuration of your stack, set the HookInvocationStatus to ENABLED after the Hook has been registered and activated in your account.

Note

The maximum amount of data that a Hook’s configuration can store is 300 KB. This is in addition to all the constraints imposed on Configuration request parameter of SetTypeConfiguration operation.

Hook configuration schema properties

The following schema is the structure for a Hook configuration schema.

{ "CloudFormationConfiguration": { "HookConfiguration": { "HookInvocationStatus": "ENABLED", "TargetOperations": ["STACK"], "FailureMode": "FAIL", "Properties": { ... } } } }
HookConfiguration

Hook configuration supports activating or deactivating Hooks at stack level, failure modes, and Hook properties values.

The Hook configuration supports the following properties.

HookInvocationStatus

Specifies if the Hook is ENABLED or DISABLED.

Valid values: ENABLED | DISABLED

TargetOperations

Specifies the list of operations the Hook is run against. For more information, see Hook targets.

Valid values: STACK | RESOURCE | CHANGE_SET | CLOUD_CONTROL

TargetStacks

Available for backward compatibility. Use HookInvocationStatus instead.

If the mode is set to ALL, the Hook applies to all stacks in your account during a CREATE, UPDATE, or DELETE resource operation.

If the mode is set to NONE, the Hook won't apply to stacks in your account.

Valid values: ALL | NONE

FailureMode

This field tells the service how to treat Hook failures.

  • If the mode is set to FAIL, and the Hook fails, then the fail configuration stops provisioning resources and rolls back the stack.

  • If the mode is set to WARN and the Hook fails, then the warn configuration allows provisioning to continue with a warning message.

Valid values: FAIL | WARN

Properties

Specifies Hook runtime properties. These should match the shape of the properties supported by Hooks schema.

Hook configuration examples

For examples of configuring Hooks from the AWS CLI, see the following sections:

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.