kasei_sanのブログ

かせいさんのIT系のおぼえがきです。胡乱の方はnoteとtwitterへ

serverless

ローカルでAWS Lambda ランタイムと(ほぼ)同様の環境でserverlessを動作確認する方法

先に結論 --docker オプションを使う serverless invoke local --docker --function hoge 解説 --docker オプションを使うと、AWS lambda が公式に配信しているDocker でシミュレートされた Lambda 環境 ( lambci/lambda ) をつかって、serverlessをローカル…

serverless のバージョンが古いまま、lambda ruby 2.7 を使うと The security token included in the request is invalid エラーが出てハマるので最新版にしよう

というお話です 出てくるエラー ruby 2.7 で serverless invoke を実行すると --aws-profile を設定していても The security token included in the request is invalid が出ます Error raised from handler method { "errorMessage": "The security token i…

serverless で AWS lambda のログ出力の有効期限を制御する方法

サンプル function hoge_fuga-aaa の出力先ロググループの有効期限を30日にする場合 serverless.yml functions: hoge_fuga-aaa: handler: handler.api_create events: - http: path: api/create method: post resources: Resources: HogeUnderscoreFugaDashA…