1
1

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.

serverless-prune-pluginでLambdaのバージョンを整理する

Posted at

ちょくちょく忘れるので忘備録

インストール

$ npm i -D serverless-prune-plugin

serverless.yml

plugins:
 - serverless-prune-plugin

custom:
  prune:
    automatic: true
    number:3

customの方を設定してないと、sls deployで消えない。

CLIから手動削除

# 直近3バージョンを残してすべて削除
$ sls prune -n 3

# helloのLambda関数を直近3バージョンを残して削除
$ sls prune -f hello -n 3

# ドライラン。削除予定の数が見れる
$ sls prune -n 3 -d

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?