Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloudformation failed to satisfy constraint: Member must have length less than or equal to 51200

Validating CloudFormation template using awscli

aws cloudformation validate-template --template-body file://C:/path/file.yaml

returns

failed to satisfy constraint: Member must have length less than or equal to 51200

Is there a possible easy fix?

like image 306
Shivam Anand Avatar asked Dec 04 '25 13:12

Shivam Anand


1 Answers

validate-template --template-body has a constraint of maximum length of 51,200 bytes (50KB). To validate a local file, filesize must be less than 50KB.

If you want to validate templates larger in size you can upload it to s3 and then use the --template-url argument. It has a constraint of 460800 bytes (450KB)

aws s3 cp $PATH_TO_FILE s3://$BUCKET_NAME/PATH
aws cloudformation validate-template --template-url https://$BUCKET_NAME.s3.amazonaws.com/path/file.yml
like image 76
Shivam Anand Avatar answered Dec 06 '25 03:12

Shivam Anand



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!