Skip to content

Publish-layer fails validation on ARM64 #408

@dyonatamachado

Description

@dyonatamachado

Description

I encountered an issue when running the dotnet lambda publish-layer command targeting the arm64 architecture.

The tool successfully generates the layer content and the artifact.xml file in the correct directory structure (e.g., inside the .../arm64/ path). However, the validation step that follows immediately after the build incorrectly looks for artifact.xml in the x64 directory path, regardless of the target architecture specified.

Because of this path mismatch, the command fails stating that the artifact was not found, even though the build itself was successful.

Expected Behavior

The tool should look for artifact.xml in the architecture-specific folder defined in the arguments (i.e., inside the arm64 folder hierarchy).

Current Behavior

The tool throws an error indicating it cannot find artifact.xml. Upon inspection of the error logs/path, it is evident that it is checking the x64 folder instead of arm64.

Reproduction Steps

Run the publish-layer command specifying arm64:

dotnet lambda publish-layer --layer-type runtime-package-store --s3-bucket <bucket-name> --framework-arch arm64

Solution & Pull Request

I have identified the cause of the issue and submitted a Pull Request with the fix. PR: #401

Temporary Workaround

For anyone blocked by this issue before the official release, I have built a Docker image based on my fork that includes this fix.

It is based on the official Microsoft image and includes the AWS CLI as well as Amazon.Lambda.Tools (with the fix).

Docker Image: Docker Image

Targeted .NET platform

.NET 8

CLI extension version

5.0.13

Environment details (OS name and version, etc.)

Amazon Linux ARM 64

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions