aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

aws_cdk.aws_lambda.Code: from_inline method code size limit incorrect

Open ayankowsky opened this issue 7 months ago • 1 comments

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

ayankowsky avatar Jul 05 '24 16:07 ayankowsky