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?

serverless frameworkでよく使うコマンド

0
Last updated at Posted at 2026-05-03

serverless frameworkでよく使うコマンドについて記載


#バージョン確認
$sls --version

#サービス作成(対話形式。template指定、sls、aws認証など)
$sls

#デプロイ(-vはverbose)
$sls deploy -v

#デプロイ(デフォルト以外のawsプロファイルに対してデプロイ)
$sls deploy --aws-profile {profile} -r {region}

#削除
$sls remove -r {region}

#関数のテスト
$sls invoke -f hello

#関数のテスト(-dは引数を渡す場合)
$sls invoke -f func-name -d '{"key":"value"}'

#関数のテスト(-pは引数ファイルを渡す場合 --logはログを出力)
$sls invoke --function func-name -p temp.json --log

#関数のテスト(localテスト)
$sls invoke local

#関数のテスト インスタンスのクレジット使用状況確認
$sls usage

#serverless frameworkの認証
$sls login

#awsの認証
$sls login aws

以上

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?