简体   繁体   中英

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.

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

You can also use the AWS web console. Select your lambda and under the actions, you can see 'export function' option. 在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM