aws lambda deploy-serverless command not updating Layer version when used with secrets manager
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 503
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 18
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.