Files
floci/docs/services
Olamide Kosile a235b76835 feat(cloudformation): implement GetTemplateSummary (#2148)
* feat(cloudformation): implement GetTemplateSummary (#1964)

Adds the missing action to the CloudFormation Query allowlist and
computes Parameters, ResourceTypes, Version, DeclaredTransforms and an
informational Capabilities/CapabilitiesReason (derived from AWS::IAM::
resource types) from a stack's existing template, an inline
TemplateBody, or a TemplateURL. Without this, tools like sam deploy
that call GetTemplateSummary before UpdateStack failed with
UnsupportedOperation.

* fix(cloudformation): correct GetTemplateSummary for SAM stacks and named IAM resources

Addresses two review findings:

- StackName lookups summarized the persisted post-transform template,
  so an existing SAM stack lost its Transform declaration and reported
  expanded resource types (AWS::Lambda::Function) instead of the
  original submitted ones (AWS::Serverless::Function). Stack now keeps
  the pre-transform template body alongside the existing post-transform
  one, and GetTemplateSummary prefers it.
- Capabilities always reported CAPABILITY_IAM for any IAM resource,
  even ones with an explicit name (e.g. RoleName). CloudFormation
  requires CAPABILITY_NAMED_IAM for those; GetTemplateSummary now
  checks the relevant name property per IAM resource type.

* fix(cloudformation): detect named IAM resources set via intrinsic functions

The CAPABILITY_NAMED_IAM check only looked for a literal string value
on the name property, so a real-world RoleName/UserName/etc. set via
Ref, Fn::Sub, Fn::Join or another intrinsic (the common shape in SAM
and CDK output) was missed entirely, misclassifying the template as
only needing CAPABILITY_IAM. CloudFormation requires NAMED_IAM whenever
the property is present at all, regardless of how its value resolves,
so the check now looks for presence instead of a textual value.

* docs(cloudformation): clarify GetTemplateSummary's originalTemplateBody fallback

Spells out why the fallback to the post-transform templateBody exists
(originalTemplateBody has no data for stacks persisted before this
field was added) and that it self-heals on the stack's next
CreateChangeSet/UpdateStack call, in response to review feedback.
2026-08-13 00:29:11 -05:00
..
2026-05-10 11:53:31 -05:00
2026-05-10 11:53:31 -05:00
2026-05-10 11:53:31 -05:00
2026-05-10 11:53:31 -05:00
2026-05-10 11:53:31 -05:00
2026-05-10 11:53:31 -05:00