1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Lambdaのコードを手元に持ってくるスニペット

Posted at

φ(・

AWS Lambdaを削除する前にコードだけ保管しておこうと思い、ざっくり書いたワンライナー。

hoge-hoge-functionというLambdaがap-northeast-1にあるとして、

curl -o lambda.zip $(aws lambda get-function --region=ap-northeast-1 --function-name hoge-hoge-function --query 'Code.Location' --output text)

みたいな。

レスポンスをCode.Locationのみに絞って、出力をテキスト形式にしてあげるとLambdaのコードを固めたzipの一時URL(10分有効)が取り出せるので、curlに直渡しする。

GetFunction - AWS Lambda

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?