Posted On: Feb 10, 2022

AWS announces the general availability of AWS CloudFormation Hooks, a feature that allows customers to invoke custom logic to automate actions or inspect resource configurations prior to a create, update or delete CloudFormation stack operation. Over 1 million customers use AWS CloudFormation every week to model, provision, and manage their cloud applications and infrastructure in a safe, predictable, and repeatable way. With AWS CloudFormation Hooks, customers can now validate resource properties and send a warning, or prevent the provisioning operation, for non-compliant resources to reduce security and compliance risk, lower operational overhead, and optimize cost. 

Prior to this launch, customers that wanted proactive compliance enforcement for Infrastructure as Code built custom controls and enforcement mechanisms. With AWS CloudFormation Hooks, customers can now publish their policy and controls to the CloudFormation Registry and enforce them against all stack and resource operations in their AWS accounts. For example, customers can inspect their Amazon S3 bucket properties for encryption, public access and logging best practice policies to ensure that developers always create secure S3 buckets in the first place. 

To get started, you can explore sample hooks published to the CloudFormation Public Registry or author Hooks using the CloudFormation CLI and publish them to your CloudFormation Private Registry. The registry provides a central location where you can browse CloudFormation extensions, such as resources, modules, and hooks that are available for use in your account. We recommend exploring our sample Hooks to jumpstart your Hooks collection.

Hooks is generally available in the following AWS Regions: US East (Ohio, N. Virginia), US West (N. California, Oregon), Africa (Cape Town), Asia Pacific (Hong Kong, Mumbai, Osaka, Seoul, Singapore, Sydney, Tokyo), Canada (Central), Europe (Frankfurt, Ireland, London, Milan, Paris, Stockholm), Middle East (Bahrain), and South America (São Paulo). For more information, see the AWS Region table.

To learn more: