部署C#.net Core AWS Lambda函数时出错

时间:2019-03-19 20:12:59

标签: c# amazon-web-services asp.net-core lambda aws-lambda

我正在尝试使用.NET Core CLI部署lambda函数,但无法部署该函数。我不太确定为什么。我一直遵循this article来部署该功能并在运行此功能时:

dotnet deploy lambda-function MyFunction 

它返回以下内容:

Executing publish command
... invoking 'dotnet publish', working folder '/Users/xxxxxx/repos/AWSLambdas/MyFunction/src/MyFunction/bin/Release/netcoreapp2.1/publish'
... Disabling compilation context to reduce package size. If compilation context is needed pass in the "/p:PreserveCompilationContext=false" switch.
Unknown error executing command: No such file or directory
   at Interop.Sys.ForkAndExecProcess(String filename, String[] argv, String[] envp, String cwd, Boolean redirectStdin, Boolean redirectStdout, Boolean redirectStderr, Boolean setUser, UInt32 userId, UInt32 groupId, Int32& lpChildPid, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean shouldThrow)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Amazon.Lambda.Tools.LambdaDotNetCLIWrapper.Publish(LambdaToolsDefaults defaults, String projectLocation, String outputLocation, String targetFramework, String configuration, String msbuildParameters, String deploymentTargetPackageStoreManifestContent) in E:\JenkinsWorkspaces\aws-extensions-for-dotnet-cli\src\Amazon.Lambda.Tools\LambdaDotNetCLIWrapper.cs:line 153
   at Amazon.Lambda.Tools.LambdaPackager.CreateApplicationBundle(LambdaToolsDefaults defaults, IToolLogger logger, String workingDirectory, String projectLocation, String configuration, String targetFramework, String msbuildParameters, Boolean disableVersionCheck, String& publishLocation, String& zipArchivePath) in E:\JenkinsWorkspaces\aws-extensions-for-dotnet-cli\src\Amazon.Lambda.Tools\LambdaPackager.cs:line 65
   at Amazon.Lambda.Tools.Commands.DeployFunctionCommand.PerformActionAsync() in E:\JenkinsWorkspaces\aws-extensions-for-dotnet-cli\src\Amazon.Lambda.Tools\Commands\DeployFunctionCommand.cs:line 142
   at Amazon.Common.DotNetCli.Tools.Commands.BaseCommand`1.ExecuteAsync() in E:\JenkinsWorkspaces\aws-extensions-for-dotnet-cli\src\Amazon.Common.DotNetCli.Tools\Commands\BaseCommand.cs:line 44

其他信息

dotnet --list-sdks

2.1.505 [/usr/local/share/dotnet/sdk]
2.2.105 [/usr/local/share/dotnet/sdk]
dotnet --list-runtimes

Microsoft.AspNetCore.All 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.3 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

任何帮助将不胜感激。

0 个答案:

没有答案