AWS CloudFormation Deploy error when template size > 51,200 bytes

When the template size > 51,200 bytes, I got below error when deploy the cloudformation template to AWS.

Amazon.CloudFormation.AmazonCloudFormationException: The service returned an error with Error Code ValidationError and HTTP Body

When I change to a smaller size template, it’s ok.

As the deploy command in CLI request to specify S3 bucket for uploading when template size > 51,200 bytes, I guess that’s the reason of validation error, however in current step template I didn’t see support for S3 bucket so maybe this is something still missing?

Thanks.

Hi @hurung!

Thanks for reaching out, and sorry to hear you’re having headaches with your CF template. Sadly, this is a limitation of AWS, and they only allow a maximum request body of 51200 bytes (as noted here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html)

The usual solution that we suggest in this scenario is to break up your template up into multiple steps if you would like to keep it under the request limit. Our built-in step does not currently support loading a template from an S3 bucket, but if you wanted to do this, you could perhaps use a script step to achieve this.

I hope this helps!

@Justin_Walsh - I just encountered this same thing. I will do as suggested, but I hope you guys can prioritize this one. I would imagine you are using aws cli in the background, so exposing the --s3-bucket argument to the Octo GUI seems like it’d be pretty easy.

Any update on this feature? Does octo support the loading of a CF template from S3?

1 Like

Hi @blindberg74

This one is still on the backlog. I’ll talk to the team and let them know there’s additional interest in this feature request on your behalf.

I am still very interested in this feature as well. We are still constantly bumping up against this limit :frowning:

I am going to try your suggestion of uploading the template to S3 and then applying the CF via a script step.

1 Like

Hi everyone,

Just a quick update that I’ve created a listing for this on our UserVoice site here: Support loading CloudFormation templates from an S3 Bucket – Feedback & Support for Octopus Deploy

Please be sure to go and upvote it!

1 Like