aws-cdk
aws-cdk copied to clipboard
aws_cdk.aws_lambda.Code: from_inline method code size limit incorrect
Describe the issue
The CDK documentation for from_inline
states the code
parameter has a size limit of 4KiB. However, this limit is actually 4MB according to the CloudFormation documentation for ZipFile size, which is what from_inline
will synthesize to.
I tested this by providing a string that was larger than 4KB, and CDK successfully synthesized a template without error.
Links
https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_lambda/Code.html#aws_cdk.aws_lambda.Code.from_inline https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html