I’m trying to deploy nested stack using command
aws cloudformation deploy --stack-name "${STACK_NAME}" --template-file "${S3_ROOT_TEMPLATE}" --parameter-overrides ${PARAMS[@]} --region ${REGION}
But despite the S3_ROOT_TEMPLATE
having proper url, I get the error
Invalid template path
https://<s3-bucket-name>
.s3.us-east-2.amazonaws.com/sm-domain-templates/main_stack.yaml
Any idea what’s wrong with the above?
2
Answers
Even though in the console you have to use S3 path, in the
awscli
command, it expects the local file path of the root stack fileThe following command deploys a template named S3_ROOT_TEMPLATE to a stack named STACK_NAME:
If your templates are sized greater than 51,200 bytes, then the name of the S3 bucket where this command uploads your CloudFormation template.
For updating the stack, you could upload the template file to the S3 bucket by using copy and then, update the stack by using the S3 object URL as the template source.