There doesn't appear to be any way in the console or the CLI to enumerate macros that have get created. They can be referenced by name in any other stack template, so clearly, they're being stored in an account-global registry, but it doesn't look like it's exposed.
Having a library of macros is a powerful thing, but if they are going to be shared with others on team sharing an account then there needs to be a discovery process. Is the expectation that name/usage information is published externally?
Obviously enough, Macros are even more powerful when they can be shared across an entire organization. Stack sets can be used to do that, so I guess a master stack set could also create a documentation resource of some kind.
Seems irksome not to be able to enumerate Macros like lots of other things, including the more exotic extensions that can be registered. Am I missing something?
I've searched the AWS documentation and spent lots of time searching the web and can't find anybody talking about it. That either means I'm missing something easy and obvious, it's not particularly important to enough folks, or nobody wants to be the first to ask.
The
AWS::CloudFormation::Macroresource is effectively a wrapper around a lambda function as described in the documentation. And whileAWS::CloudFormation::Macrois a CloudFormation resource, there is no such thing as a macro resource in AWS.So in order to list all of the macro functions in your account you have two options:
AWS::CloudFormation::Macroexists