AWS 24 ::LanguageExtensions is an AWS-hosted macro that resolves the functions Fn::ForEach listed and returns plain CloudFormation 24 . Its rules are what trip people up:
Declare it at the top level; its functions work only in Resources, Conditions and Outputs, and only in long form (Fn::Length:), since YAML has no !Length tag.
With several transforms, use a list: custom macros first, then AWS's, with AWS::LanguageExtensions before AWS::Serverless-2016-10-31 so that SAM 24 sees the expanded resources.
Do not update with --use-previous-template: the stored template is the processed one, with parameter values baked in, so new values would be ignored.
It also allows functions where literals are required, such as a computed Fn::GetAtt target (ForEach and ToJsonString) or a DeletionPolicy from a parameter, which made LocalStack 4.13.1 63,725 's CreateChangeSet fail with InternalError. cfn-lint 2,641 expands Fn::ForEach first, so BillingMode: ON_DEMAND in a loop body is reported as E3030 at its line.