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
エキスパート
回答済み 1年前
profile picture
エキスパート
レビュー済み 2ヶ月前
  • Hey Ben,

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

    Thanks, Swapnadeep

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ