aws / aws/aws-lambda-dotnet

When a dotnet lambda zip package contains more than 1 .deps file, the error printed is misleading

Open
#1,430 4 comments 1 reaction 0 assignees View on GitHub
bug module/lambda-client-lib p2 queued
Dominant language
C#
Stars
1.7k
Forks
503
Avg merge
1d 5h
Merged PRs (30d)
18

Description

### Describe the bug

https://github.com/aws/aws-lambda-dotnet/blob/48ea41ecc61136390d62a26ca41d41fa3a4d9e66/Libraries/src/Amazon.Lambda.RuntimeSupport/bootstrap.sh#L73-L74

This bit of code looks for a `.deps` file. If that file does not exist it looks for `*.deps` files.
If it finds more than 1 matching file, it fails with the error message:
> The ${LAMBDA_TASK_ROOT} directory is missing the required .deps.json file.

which is slightly misleading.

### Expected Behavior

A better error message that indicates that more *.deps files than expected were encoutered.

### Current Behavior

A wrong error message that says there were no *.deps files

### Reproduction Steps

Add an extra *.deps file to working lambda zip package and deploy it.

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### AWS .NET SDK and/or Package version used

AWSSDK.Core 3.5.3.3

### Targeted .NET Platform

.NET 6

### Operating System and version

Amazon Lambda

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.