Does the compression method matter when uploading lambda zips to s3?

Viewed 179

Is there any performance benefits (as in time to start and execute the lambda) when storing lambda zip packages on s3 which have been compressed to a greater degree?

E.g. will the startup time be different if the compressed file is e.g. 10 MB instead of 2 MB in size (with the exact same file content)

2 Answers

Different compression algorithms can affect compression ratios but not to the order that you have mentioned. The difference might be 2.0x versus 2.4x. The speed of decompression is what matters when loading a compressed resource into memory or disk. Some compression algorithms have very high decompression speeds and this will make more of a difference than the small differences between compression ratios.

However, AWS Lambda packages are small (in the scope of compressed data files) and the compression algorithm will make little to no practical difference to the launch time of your Lambda function.

Related