Response limit of 4k for CloudFormation Custom Resources
See original GitHub issueUsing the AwsCustomResource
construct to easily pass in SDK calls is very useful. Some service calls however have a large response body and lead to Response object is too long.
in their CloudFormation response.
It would be nice to have a conditional to check for that and truncate, or more ideally, have a property to control what output goes into the response body, similar to how physicalResourceIdPath
works.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Custom resource response objects - AWS CloudFormation
The total size of the response body can't exceed 4096 bytes. The status value sent by the custom resource provider in response to...
Read more >Custom resource response objects - Amazon CloudFormation
Learn about custom resource response objects in Amazon CloudFormation. ... The total size of the response body can't exceed 4096 bytes.
Read more >Advanced Custom Resources with AWS CDK - Medium
In Part 1, we learned what AWS CloudFormation custom resources are and how to create a custom resource using the AWS CDK's AWSCustomResource ......
Read more >@aws-cdk/custom-resources - npm
CloudFormation imposes a hard limit of 4096 bytes for custom resources response objects. If your API call returns an object that exceeds this ......
Read more >CFN Custom Resources backed by Step Functions
It waits until it receives a response on a callback URL specified in the payload. In your CloudFormation template a Custom Resource is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This shamefully took me 11 attempts to get right so here’s a working example to save others that come across this
It turned out I was assuming the response would be return like an API call
Reservations[0].Instances[0]...etc
. Double check the lambda logs if you run across the response limit error and see how the data Is outputedFYI, I ran into a similar error message but it was due to an error in my helm chart where the resulting error message was too big for Lambda to return. Looking at the Lambda logs showed the specific error message.