1

Trying to deploy a CloudFormation template that is stored in an S3 bucket as the template size is larger than 51kb so cant be done direct (from what I am led to believe and have seen when trying)

Doing this via ADO pipeline using AWS cli

I can upload the template to S3 bucket and validate it OK

But cant find the correct command to actually deploy the template that is stored in the S3 bucket?

aws cloudformation deploy does not have a --template-url flag like update-stack does?

And if I try passing the S3 uri to the --template-file flag it errors out

I am probably just missing something here - not sure what though

Thanks

2
  • 1
    If the template file is already in S3 then I think you need to use aws cloudformation create-stack (or update-stack if the stack already exists) with the --template-url https://mybucket.s3.<region>.amazonaws.com/path/template.yaml option. Commented Nov 11 at 2:22
  • @jarmod - yeah thanks for that - that is what it looks like - just was not sure if I was missing something simple... thanks Commented Nov 11 at 2:35

2 Answers 2

2

The aws cloudformation deploy command is a higher-level abstraction over CloudFormation stacks than the aws cloudformation xxxx-stack commands.

When using aws cloudformation deploy, it's designed to work with local templates and you typically provide the template as a local file path and then the awscli will automatically upload it to an S3 bucket and then perform CloudFormation API requests against that template.

If you want full control over this process or the template already exists in S3 then you should use the lower-level aws cloudformation create-stack or update-stack commands.

Sign up to request clarification or add additional context in comments.

Comments

0

The deploy command is for local templates only.
If your CloudFormation template is already stored in S3,
use create-stack or update-stack with the --template-url option instead

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.