question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for local testing with Lambda Test Tool for .NET 6 when using the `Container Image` blueprint

See original GitHub issue

image

Describe the Feature

In the current version of the Lambda Test Tool, local debugging of lambda functions running on .NET 6 is not supported when using the Container Image blueprint.

Proposed Solution

Add support for Lambda function running on .NET 6, similar to how the current Container Image blueprint supports .Net Core 3.1 and .NET 5 out-of-the-box.

Reproduction of the problem

Changing the workingDirectory value in properties/launchSettings.json to refer to net6.0:

{
  "profiles": {
    "Mock Lambda Test Tool": {
      "commandName": "Executable",
      "executablePath": "%USERPROFILE%\\.dotnet\\tools\\dotnet-lambda-test-tool-5.0.exe",
      "commandLineArgs": "--port 5050",
      "workingDirectory": ".\\bin\\$(Configuration)\\net6.0"
    }
  }
}

Change target framework: image

The error I get when I try to invoke the Lambda function locally: image

Notes

This issue is most likely blocked behind the issue https://github.com/aws/aws-lambda-base-images/issues/27.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
normjcommented, Nov 23, 2021

@sjd2021 There are instructions on how to configure the .NET Lambda test tool for Rider here. Let me know if the instructions aren’t clear https://github.com/aws/aws-lambda-dotnet/tree/master/Tools/LambdaTestTool#configure-for-jetbrains-rider

@TrongTheAlpaca Yesterday I released the .NET 6 version of the tool. https://www.nuget.org/packages/Amazon.Lambda.TestTool-6.0/ Visual Studio toolkit hasn’t been updated yet to autoconfigure it so you will have to manually install the tool via the dotnet tool install --global Amazon.Lambda.TestTool-6.0 --version 0.11.3 command and editing your launchSettings.json file.

I’m going to close this issue since the tool has been released.

1reaction
normjcommented, Nov 16, 2021

This belongs in this repo. This repo contains the code for the test tool. We need to spin up a new version for .NET 6 which we will do soon. Once we have the NuGet package released for a .NET 6 version of the tool we will need to do a small update to the VS toolkit.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deploy .NET Lambda functions with container images
This page explains how to build, test, and deploy container images for Lambda. Topics. AWS base images for .NET; Using an AWS base...
Read more >
AWS Lambda with .NET 6 - Serverless Computing
NET 6, deploying this serverless function to AWS, and much more. ... First, install the Lambda test tool using the following CLI command....
Read more >
AWS Lambda For The .NET Developer: How To Easily Get ...
The Mock Lambda Tool helps test the Lambda function locally without deploying it to an AWS environment. The launchsettings.json file has the ...
Read more >
aws/aws-lambda-dotnet: Libraries, samples and tools to ...
Repository for the AWS NuGet packages and Blueprints to support writing AWS Lambda functions using .NET Core. For a history of releases view...
Read more >
AWS Lambda Docker Image: An Easy Guide
Functions Defined as Container Images: To develop, test, and deploy your Lambda functions, it lets you use your favorite container image ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found