aws lambda deploy-serverless command not updating Layer version when used with secrets manager
- Vorherrschende Sprache
- C#
- Sterne
- 1.7k
- Forks
- 503
- Ø Merge
- 1 T. 5 Std.
- Gemergte PRs (30 T.)
- 18
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Beginne mit dem Befehl deploy-serverless und der Layer-Konfiguration in serverless.yaml und verfolge anschließend, wie eine Secrets Manager dynamic reference während Updates einer bestehenden Lambda-Funktion verarbeitet wird. Reproduziere aufeinanderfolgende Layer-Updates sowohl mit der dynamic reference als auch mit einer einfachen ARN. Als abgeschlossen gilt dies, wenn die bestehende Funktion die neueste Layer-Version erhält, sobald die ARN aus Secrets Manager stammt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, csharp
- Bereich
- cloud, devops
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100