Files
floci/src/main/java/io
MAN$I VERMA c12f3fae7d fix(cloudformation): don't double-encode string-form SNS RedrivePolicy and FilterPolicy (#2325)
CDK emits AWS::SNS::Subscription RedrivePolicy/FilterPolicy and Step Functions
definitions as an already-serialized JSON string via Fn::Join. resolveNode
collapses the Fn::Join to a TextNode, and toString() on that node re-quotes and
re-escapes the JSON a second time, so the stored policy is double-encoded and
SNS can no longer parse it (dead-lettering silently fails).

Add CloudFormationTemplateEngine#resolveJsonAttribute, which unwraps textual
results while keeping normal serialization for plain object/array nodes, and
use it at every site that stores a resolved node as a JSON document:
SNS FilterPolicy/RedrivePolicy, Step Functions Definition, IAM inline policy
documents, and the SQS RedrivePolicy already fixed in #1939.

Verified: GetSubscriptionAttributes returns the literal policy JSON and
regression tests mirror the SQS pattern from #1939.
2026-08-15 12:17:06 -04:00
..