Developing custom Hooks using the CloudFormation CLI
This section is for customers who want to develop custom Hooks and register them in the AWS CloudFormation Registry.
There are three major steps in developing a custom Hook:
-
Initiate
To develop custom Hooks, you must configure and use the CloudFormation CLI. To initiate a Hook's project and its required files, use the CloudFormation CLI init command and specify that you want to create a Hook. For more information, see Initiating a custom AWS CloudFormation Hooks project.
-
Model
To model, author, and validate your Hook schema, define the Hook, its properties, and their attributes.
The CloudFormation CLI creates empty handler functions which correspond to a specific Hook invocation point. Add your own logic to these handlers to control what happens during your Hook invocation at each stage of its target lifecycle. For more information, see Modeling custom AWS CloudFormation Hooks.
-
Register
To register a Hook, submit your Hook to be registered either as a private or a public third-party extension. Register your Hook with the
submit
operation. For more information, see Registering a custom Hook with AWS CloudFormation.The following tasks are associated with registering your Hook:
-
Publish – Hooks are published to the registry.
-
Configure – Hooks are configured when the type configuration invokes against stacks.
Note
Hooks time out after 30 seconds.
-
The following topics guide you through the process of developing, registering, and publishing custom Hooks with Python or Java.