0
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?

More than 3 years have passed since last update.

Lambda Functionの一覧をランタイムバージョンと共に表示する

Last updated at Posted at 2019-12-20

古いランタイムバージョンのLambda Functionが残ってると、使ってなくてもAWSからEOL通知のメールが来るので、一覧を表示するスクリプトを書いた。備忘録代わりに投稿します。

#!/bin/bash
regions=$(aws ec2 describe-regions | jq -r '.Regions[].RegionName')
for region in $regions
do
    aws --region $region lambda list-functions --function-version ALL | jq -r '.Functions[] | [.Runtime, .FunctionArn] | @csv' | sort -V
done

あとは、消したいものをgrepして、aws lambda delete-function --function-name ARNするだけ。Regionごとに消さないといけないので、ちょっと面倒くさいけど。

0
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
0
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?