[最終更新] 2021年1月13日
AWS Lambdaをデプロイした時、ダウンタイムは発生するのかについて。
直接答えとなる記述をドキュメントで見つけることができていないのだが、AWSフォーラムの開発者による回答を見るに、新旧両方のバージョンが動作する時間はあるものの、ダウンタイム自体は理屈のうえではなさそう。
公式フォーラムの回答
「AWS Developer Forums: What happens to a running lambda during …」の回答による。そのまま引用する。
In-flight invocations complete, without code changes or interruption, using the version of the function that was in place at the time they began. You can potentially have a function change for asynchronous invocations that experience errors or throttles, because a retry will potentially allow a new version of the function to be hit on the next attempt. While we do not abort in-flight invocations, we will aggressively eliminate copies of the old code; this typically happens within a minute of a function being updated. That means that for up to about 5-6 minutes (the max duration of a function, plus a little bit) you can experience either/both versions in use; after that, you should see only the new(ly deployed) version executing.
AWS Developer Forums: What happens to a running lambda during …
つまりデプロイ中の挙動としては以下のような感じ。
- 古いバージョンが動作したら、完了までそのバージョンが動作する
- ただし、エラーとかでリトライが発生すると、今度は新しいバージョンが動くかも
- 関数の動作時間に加えて5,6分くらいは、新旧両方のバージョンが動くかもね
ということらしい。
いずれにしても、こういうことならばダウンタイム自体は発生しない……と思われる。
リンク
- What happens to a running AWS lambda during redeployment? – Stack Overflow
- AWS Developer Forums: What happens to a running lambda during …
関連記事
aws の記事
- [2022年1月18日] 2022年1月18日 DyanmoDB、メタバース、アキネータ
- [2021年8月23日] AWS SAMでDynamoDBテーブルを作成する時のテンプレート
- [2021年6月12日] DynamoDBの多対多で隣接リストやった時の冗長性対策どうしよう
- [2021年5月13日] Lambda関数でDeadLetterQueue(DLQ)を試す
- [2021年1月25日] AWS Lambdaのロギングを考える
- ---本記事---
- [2020年12月8日] DynamoDB から DocumentClient で get() した StringSet型 の値を取り出す
- [2020年11月20日] AWS Lambdaでイベント起動した時にeventに渡されるパラメータあれこれ
- [2020年10月13日] AWS Lambda (Python 3.8)から Amazon Elasticsearchを使う(LambdaはSAMで)
- [2020年10月12日] AWS SAM CLIでSNSからLambdaを起動する(Python 3.8)、S3からSNSに通知する
- [2020年5月13日] Grafana on EC2 で Let’s Encrypt 使ってSSL
スポンサーリンク