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

external
usability
(Hurung) #1

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.

(Justin Walsh) #3

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!

(Robertthomasdavis) #4

@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.