Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get a existent aws lambda source code using aws cli

I have several aws lambda functions and I want to download all the source code, in separated zip files(preferably, this is the way I uploaded them).

I was able to list the functions and configurations but not to get the source code.

like image 741
Jorge Valvert Avatar asked Sep 05 '26 03:09

Jorge Valvert


1 Answers

You can do this via get-function:

aws lambda get-function --function-name foo --query 'Code.Location'

This returns a pre-signed URL you can use to download the function's .zip file that you previously uploaded. The URL is valid for up to 10 minutes.

See: get-function — AWS CLI Command Reference

like image 153
John Rotenstein Avatar answered Sep 07 '26 10:09

John Rotenstein



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!