-
Notifications
You must be signed in to change notification settings - Fork 491
Closed
Labels
bugThis issue is a bug.This issue is a bug.module/lambda-test-toolneeds-reproductionThis issue needs reproduction.This issue needs reproduction.
Description
I have a "factory" class tat sets up some dependency injection inside of my Aws Lambda:
var serviceProvider = new ServiceCollection()
.AddHttpClient()
..... Other services
and when I run the test tool it throws back:
System.MissingMethodException: Method not found: 'Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.HttpClientFactoryServiceCollectionExtensions.AddHttpClient(Microsoft.Extensions.DependencyInjection.IServiceCollection)'.
at Factories.ProcessorFactory.CreateProcessor()
// Handle event method
at Amazon.Lambda.TestTool.Runtime.LambdaExecutor.ProcessReturnAsync(ExecutionRequest request, Object lambdaReturnObject) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LambdaExecutor.cs:line 141
at Amazon.Lambda.TestTool.Runtime.LambdaExecutor.ExecuteAsync(ExecutionRequest request) in C:\codebuild\tmp\output\src142363207\src\Tools\LambdaTestTool\src\Amazon.Lambda.TestTool\Runtime\LambdaExecutor.cs:line 62
Heres a dump of the aws-lambda-tools-defaults.json
:
{
"Information": [
"This file provides default values for the deployment wizard inside Visual Studio and the AWS Lambda commands added to the .NET Core CLI.",
"To learn more about the Lambda commands with the .NET Core CLI execute the following command at the command line in the project root directory.",
"dotnet lambda help",
"All the command line options for the Lambda command can be specified in this file."
],
"profile": "default",
"region": "eu-west-1",
"configuration": "Release",
"framework": "netcoreapp3.1",
"function-runtime": "dotnetcore3.1",
"function-memory-size": 256,
"function-timeout": 30,
"function-handler": "HandleStreamEvent"
}
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.module/lambda-test-toolneeds-reproductionThis issue needs reproduction.This issue needs reproduction.