Quickly upload a #Lambda function on Windows #7z
If you have a lambda function above a certain size, (50 MB ish), then the inline code editor will no longer be available in AWS lambda. You then have to resort to uploading zipped files of your lambda function. This can be cumbersome on windows, if you haven’t got a quick script to run to zip and upload the lambda function.
You will need to have run AWS configure, and given this the correct credentials, and you will need to replace the function name below
@echo off
erase Lambda.zip
“C:\Program Files\7-Zip\7z” a Lambda.zip
aws lambda update-function-code –function-name xxxxxxx –zip-file “fileb://lambda.zip”
This ran in about 17 seconds for my lambda function, which would have taken easily a minute using the GUI. – plus, it’s less prone to human error.