AWS Code Deploy stage failing for serverless NodeJS lambda deployment. Error with AppSpec.yml file

0

I have recently created a Code Pipeline. It starts with Source from Git hub repo [work perfectly fine]. Then the next stage is code build [works perfectly fine as well]. But it fails in the code deployment stage, the code build creates an artifact as a zip file and uploads it to the S3 bucket, the code deploy picks it from the same location but somehow it is not able to find or not able to parse the appspec.yml.

The IAM roles and permission required are perfectly fine for the pipeline when I run code deployment manually from the console by copy-pasting the content from appspec.yml it works perfectly fine.

Following is my folder structure

src
   handler
   service
   models
package.json
serverless.yml
buildspec.yml
appspec.yml

The contents of buildspec artifact section

artifacts:
  files:
    - src/**/*
    - appspec.yml
    - package.json
    - package-lock.json
    - node_modules/**/*

*P.S I am not using Webpack or anything as of now *

The contents of appspec.yml are as below

version: 0.0
Resources:
  - apis-dev-hello:
      Type: AWS::Lambda::Function
      Properties:
        Name: apis-dev-hello
        Alias: api-dev-hello
        CurrentVersion: 2
        TargetVersion: 2
  • Hi RD!

    Would you be able to share a complete but minimal reproducible version of the problem via a Git repository?

    Regards, Markus

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠