Posted On: Mar 22, 2023
Today, AWS CloudFormation has expanded the availability of language Transform called ‘AWS::LanguageExtensions' to Asia Pacific (Hyderabad), Asia Pacific (Melbourne), Europe (Spain), Europe (Zurich), and Middle East (UAE) Regions. When declared in a template, the transform enables extensions to the template language in AWS CloudFormation. The language extensions transform expands the functionality of the base CloudFormation JSON/YAML template language.
With this launch, you can use 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 in these 5 new Regions. You use intrinsic functions in your templates to assign property values to properties that are not available until runtime. For example, you can use the Fn::ToJsonString intrinsic function to convert an object or array to its corresponding JSON string. You can read our AWS blog post on language extensions transform for detailed use cases.
Additionally, the language extension transform supports default parameter values and additional intrinsic functions in Fn::FindInMap. You can use these features to minimize the size of your CloudFormation templates, and improve their readability. For example, you can combine intrinsic functions such as Fn::Select and Fn::Split to dynamically extract and return string from a given parameter. This returned string value can be used within Fn::FindInMap to map to the desired Mappings section. You can automate inputs to your Mapping logic with fewer lines of code, instead of declaring multiple conditions. To see other examples of Fn::FindInMap enhancements, refer to our user guide.
To learn more about language extension transform, refer to the CloudFormation documentation.