Support Encode Properties for CloudFormation CustomResource #375
Labels
bar-raiser/needed
management/tracking
status/stale
The RFC did not get any significant enough progress or tracking and has become stale.
Description
When calling a CustomResource, CloudFormation turns all the JSON properties passed to the resource into strings. This makes it difficult to code a resource that processes non-string data, or to pass data to APIs that require non-string inputs.
The proposal is to add a flag to CustomResource, encodeProperties, that would encode all the properties in a custom resource other than the ServiceToken. If encodeProperties is false (the default), then the CustomResource creates a CfnResource as normal. If encodeProperties is true, the CustomResource instead creates a CfnEncodingResource:
All lambda languages have native support for decoding Base64, so it is not necessary to add direct support for encoded resources to lambda libraries to make this work for end users. Sample code should suffice.
Example Typescript Decoding:
Example Python Decoding:
This has become a common solution used by many custom resources. It should just be part of the CDK as an aid to CustomResource authors.
Roles
Workflow
status/proposed
)status/review
)api-approved
applied to pull request)status/final-comments-period
)status/approved
)status/planning
)status/implementing
)status/done
)The text was updated successfully, but these errors were encountered: