



aws cloudformation package \
--template-file template.yml \
--s3-bucket cf-macro-iterate \
--output-template-file packaged.yaml

export AWS_PROFILE=<profile>
aws cloudformation deploy \
--template-file packaged.yaml \
--stack-name Iterate \
}
Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state: For expression “Status” we matched expected path: “FAILED” Status: FAILED. Reason: Requires capabilities : [CAPABILITY_IAM]
export AWS_PROFILE=wilmer
aws cloudformation deploy \
--template-file packaged.yaml \
--stack-name Iterate \
--capabilities CAPABILITY_IAM
}


No transform named 225491667295::Count found.

but the stack that was using the macros was in



make sure that s3 bucket does’nt have more than 1 object in there. delete the older ones if so
Macros for one snippet, not entire template

https://github.com/aws/aws-cli/issues/5619
Please disregard. The example code in the aws-cloudformation macro sample repository is in error. Upon closer inspection the string_example.yaml defines the ‘Fn::Transform’ as a list containing a single object with Name
and Parameter
fields. This is invalid and inconsistent with the documentation which clearly states to have a single object defining Fn::Transform
not a list
of object. I will submit a PR to the aws-cloudformation repository.
https://docs.amazonaws.cn/en_us/AWSCloudFormation/latest/UserGuide/template-macros.html

When I was passing domains like this





now it works

this is from the lambda logs




