Skip to content

dotnet-lambda package fails with AWS SDK v4: Missing type IUnmarshaller<T1, T2> from AWSSDK.Core #374

@ncipollina

Description

@ncipollina

Describe the bug

When using AWS SDK for .NET v4 (e.g. AWSSDK.Core version 4.0.0), the dotnet-lambda package command fails with the following error:

/usr/local/share/dotnet/sdk/9.0.203/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(470,5): error : Error: Failed to load type 'Amazon.Runtime.Internal.Transform.IUnmarshaller`2' from assembly 'AWSSDK.Core, Version=4.0.0.0'

This appears to be due to a breaking change in AWSSDK.Core, where IUnmarshaller<T1, T2> has been removed or refactored in version 4.x. The Lambda packaging tool still expects it to exist.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

dotnet-lambda package should successfully build and package the Lambda function using AWS SDK v4.

Current Behavior

The command fails with:

Failed to load type 'Amazon.Runtime.Internal.Transform.IUnmarshaller`2'

Reproduction Steps

  1. Create a .NET 8 Lambda project.
  2. Upgrade AWS SDK packages (e.g., AWSSDK.Core, AWSSDK.Lambda, etc.) to version 4.0.0.
  3. Run dotnet tool run dotnet-lambda package.

Possible Solution

Please update Amazon.Lambda.Tools to be compatible with AWS SDK v4.

Additional Information/Context

No response

Targeted .NET platform

NET SDK: 9.0.203

CLI extension version

5.12.4

Environment details (OS name and version, etc.)

OS: macOS / Ubuntu runner in GitHub Actions

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