- Newest
- Most votes
- Most comments
The error you're encountering is related to the size limitation of custom resource responses in AWS CloudFormation. The total size of the response body for a custom resource cannot exceed 4096 bytes. In this case, it appears that the Lambda function "CidExec" in the provided template is generating a response that exceeds this limit.
To resolve this issue, you have a few options:
-
Modify the Lambda function to reduce the size of its response. This could involve limiting the amount of data returned or restructuring the response to be more concise.
-
If possible, add an 'outputPaths' parameter to the custom resource in the CloudFormation template. This allows you to specify which parts of the response should be included, potentially reducing the overall size. For example, you might add something like:
outputPaths: ["keyData1", "keyData2", "keyData3"]
This would instruct CloudFormation to only include these specific keys from the Lambda function's response.
-
If the data being returned is essential and cannot be reduced, consider splitting the functionality across multiple custom resources. This way, you can distribute the data across several smaller responses rather than one large one.
-
Another approach could be to store the large response data in an external location (like an S3 bucket) and have the custom resource return only a reference to that location.
If these solutions don't work for your specific use case, you may need to reach out to AWS support or the maintainers of the CUDOS framework for further assistance. They may be able to provide an updated version of the template that addresses this issue or offer more specific guidance based on the exact requirements of the dashboard you're trying to deploy.
Sources
Custom resource response objects - AWS CloudFormation
Deploying Stack throws error at CreateKeysAndCertificate | AWS re:Post
Troubleshoot the processed template - AWS CloudFormation
'CidExcc' function is the that create the dashboards during the Cloud Formation creation. It used the Lambda-backed custom resource.
You should be able to check Cloudwatch log group of the lambda "/aws/lambda/CidCustomResourceDashboard" being ran and it will show you the Response object at the end of the log events area. That is what needs to be less than 4KB. From my research, the only thing that can affect the size of that is the title of the Cloud Formation template being built if any only if you are running the CFN with no changes and using this website Cloud Intelligence Dashboard Labs.
Relevant content
- asked a month ago
- asked 7 months ago
- asked 4 years ago
