aws / aws/aws-lambda-dotnet

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

Đang mở
#448 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
feature-request module/lambda-client-lib p2 queued
Ngôn ngữ chính
C#
Star
1.7k
Fork
503
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
21

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với lệnh deploy-serverless và cấu hình Layer trong serverless.yaml, sau đó theo dõi cách một Secrets Manager dynamic reference được xử lý trong quá trình cập nhật một hàm Lambda hiện có. Tái hiện các lần cập nhật Layer liên tiếp với cả dynamic reference và ARN thông thường. Hoàn tất khi hàm hiện có nhận được phiên bản Layer mới nhất khi ARN đến từ Secrets Manager.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
aws, csharp
Lĩnh vực
cloud, devops
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.