Amazon web services AWS Lambda代码管道可以';你不能修改我的deps.json文件吗?
我正在尝试构建和部署一个简单的示例项目来学习AWS。C#/.NET内核 我的buildspec如下所示:Amazon web services AWS Lambda代码管道可以';你不能修改我的deps.json文件吗?,amazon-web-services,aws-lambda,amazon-cloudformation,aws-codepipeline,Amazon Web Services,Aws Lambda,Amazon Cloudformation,Aws Codepipeline,我正在尝试构建和部署一个简单的示例项目来学习AWS。C#/.NET内核 我的buildspec如下所示: version: 0.2 phases: install: runtime-versions: dotnet: 2.2 pre_build: commands: - echo Restore started on `date` - dotnet restore AWSServerless1.csproj build: c
version: 0.2
phases:
install:
runtime-versions:
dotnet: 2.2
pre_build:
commands:
- echo Restore started on `date`
- dotnet restore AWSServerless1.csproj
build:
commands:
- echo Build started on `date`
- dotnet publish -c release -o ./build_output AWSServerless1.csproj
artifacts:
files:
- ./build_output/**/*
- scripts/**/*
- appspec.yml
discard-paths: yes
version: 0.0
Resources:
- myStack-AspNetCoreFunction-1HPKUEU7I6GFW:
Type: AWS::Lambda::Function
Properties:
Name: "myStack-AspNetCoreFunction-1HPKUEU7I6GFW"
Alias: "AWSServerless1"
CurrentVersion: "1"
TargetVersion: "2"
我的appspec如下所示:
version: 0.2
phases:
install:
runtime-versions:
dotnet: 2.2
pre_build:
commands:
- echo Restore started on `date`
- dotnet restore AWSServerless1.csproj
build:
commands:
- echo Build started on `date`
- dotnet publish -c release -o ./build_output AWSServerless1.csproj
artifacts:
files:
- ./build_output/**/*
- scripts/**/*
- appspec.yml
discard-paths: yes
version: 0.0
Resources:
- myStack-AspNetCoreFunction-1HPKUEU7I6GFW:
Type: AWS::Lambda::Function
Properties:
Name: "myStack-AspNetCoreFunction-1HPKUEU7I6GFW"
Alias: "AWSServerless1"
CurrentVersion: "1"
TargetVersion: "2"
管道成功完成,但当我尝试运行lambda时,得到了502。我查看了日志,上面写着:
Could not find the required 'AWSServerless1.deps.json'. This file should be present at the root of the deployment package.: LambdaException
当我从S3下载软件包时,对我来说,一切都在那里。这是一个zip文件,任何地方都没有路径,所有内容都在zip的根目录中,包括AWSServerless1.deps.json
有什么想法吗?使用dotnet lambda包而不是发布 看