aws / aws/aws-lambda-dotnet

aws lambda deploy-serverless command not updating Layer version when used with secrets manager

Aperta
#448 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature-request module/lambda-client-lib p2 queued
Lingua principale
C#
Stelle
1.7k
Fork
503
Merge medio
1g 5h
PR unite (30g)
18

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con il comando deploy-serverless e la configurazione di Layer in serverless.yaml, quindi traccia come viene gestita una Secrets Manager dynamic reference durante gli aggiornamenti di una funzione Lambda esistente. Riproduci aggiornamenti consecutivi di Layer sia con la dynamic reference sia con una semplice ARN. Il lavoro è completato quando la funzione esistente riceve l’ultima versione di Layer quando l’ARN proviene da Secrets Manager.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, csharp
Ambito
cloud, devops
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.