mirror of
https://github.com/floci-io/floci.git
synced 2026-11-25 23:00:59 -05:00
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.