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 Respuesta
1
Respuesta aceptada

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
EXPERTO
respondido hace un año
profile picture
EXPERTO
revisado hace 2 meses
  • Hey Ben,

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

    Thanks, Swapnadeep

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas