I am unable to package CloudFormation template, it constantly throws an error

0

I tried the following two commands to upload artifacts and package CFN template, but doesn't seem to work -

  1. "aws cloudformation package --s3-bucket s3-swapnadeep-code-sam --template-file template.yaml --output-template-file gen/template-generated.yaml"
  2. "sam package --s3-bucket s3-swapnadeep-code-sam --output-template-file packaged.yaml"

It constantly throws an error like this -

"Unable to upload artifact src/ referenced by CodeUri parameter of helloworldpython3 resource. Parameter CodeUri of resource helloworldpython3 refers to a file or folder that does not exist"

1개 답변
1
수락된 답변

Hi,

the error message indicates that there is an issue with the parameter CodeUriof the resource you have named helloworldpython3. More specifically, the path src/ references not a relative path but and absolute one. You likely need to change it to something like ./src. Basically referencing the folder where you code resides relative to the path your template is located.

profile pictureAWS
전문가
답변함 일 년 전
profile picture
전문가
검토됨 2달 전
  • Hey Ben,

    Thanks for sharing this. I could resolve this with your help.

    Thanks, Swapnadeep

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

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

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

관련 콘텐츠