Posted On: Sep 8, 2022
AWS CloudFormation announces the general availability of a new transform supporting extensions to the CloudFormation template language. AWS CloudFormation is an Infrastructure as Code (IaC) service that lets you model, provision, and manage AWS and third-party resources by authoring templates which are formatted text files in JSON or YAML. This release introduces a language transform called 'AWS::LanguageExtensions.' When declared in a template, the transform enables extensions to the template language. At launch, these include: new intrinsic functions for length (Fn::Length) and JSON string conversion (Fn::ToJsonString), and support for intrinsic functions and pseudo-parameter references in update and deletion policies.
These new language extensions are the result of open discussions with the larger CloudFormation community via our Language Discussion Github repository. This repository allows customers to request language features and leave feedback on Request for Comments (RFC) proposals for new language features. The Fn::Length intrinsic function returns the number of elements within an array or an intrinsic function that returns an array. The Fn::ToJsonString intrinsic function converts an object or array to its corresponding JSON string. Finally, you can use intrinsic functions to define the DeletionPolicy and UpdateReplacePolicy resource attributes. Please visit the Language Discussion repo to recommend or provide input on new language extensions.
The language extensions transform is generally available in the following regions: US East (Ohio, N. Virginia), US West (Oregon, N. California), Canada (Central), Europe (Ireland, Frankfurt, London, Stockholm, Paris, Milan), Asia Pacific (Hong Kong, Jakarta, Mumbai, Osaka, Seoul, Singapore, Sydney, Tokyo), South America (São Paulo), Middle East (Bahrain), and Africa (Cape Town). For more information, see the AWS Region table.
To learn more, refer to the CloudFormation documentation.