aws lambda deploy-serverless command not updating Layer version when used with secrets manager
- 主要言語
- C#
- スター
- 1.7k
- フォーク
- 503
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 19
説明
When trying to update an existing Lambda function with a Lambda Layer using _aws lambda deploy-serverless_ command, it fails to update the function with the latest layer version when the Layer ARN is fetched from AWS Secrets Manager. Creating a new function with the same command works fine. Issue is only when we do consecutive updates to the same function.
### Scenario
* Create a Lambda Function with Layer
* Update the Layer using _dotnet lambda publish-layer_ command.
* Now run _aws lambda deploy-serverless_ command by passing a serverless template. Example command below
```
dotnet lambda deploy-serverless -sb my-lambda-apps -t .\serverless.yaml -sn OrderProcessor
```
* serverless.yaml command has the Layer settings as below. Layer ARN is stored as a key/value pair in AWS Secrets Manager.
```
Layers:
- '{{resolve:secretsmanager:LambdaLayerSecretArn:SecretString:LambdaLayerSecretArn}}'
```
* When the Layer ARN is directly given as plain text in the .yaml file, there is no issue.
コントリビューションガイド
調査の方向性
deploy-serverless コマンドと serverless.yaml の Layer 設定から始め、既存の Lambda 関数の更新時に Secrets Manager dynamic reference がどのように処理されるかを追跡します。dynamic reference と単純な ARN の両方を使って、連続する Layer の更新を再現します。Secrets Manager から ARN が提供された場合に、既存の関数が最新の Layer バージョンを受け取れば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, csharp
- 領域
- cloud, devops
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100