Skip to content

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

Open
@rpgeddam

Description

@rpgeddam

Describe the bug

if [ "${#DEPS_FILES[@]}" -ne 1 ] || echo "${DEPS_FILES[0]}" | grep -q -F '*'; then
echo "Error: .NET binaries for Lambda function are not correctly installed in the ${LAMBDA_TASK_ROOT} directory of the image when the image was built. The ${LAMBDA_TASK_ROOT} directory is missing the required .deps.json file." 1>&2

This bit of code looks for a <assemblyname>.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions