Good question. We currently use DynamoDB to store the JSON which has a max item size of 400kb. We allow JSON up to 390kb so there is 10kb spare to store other data against the item, such as id and a whole bunch of metadata.
Not the best architectural decision in hindsight but we will be able to fix that at some point by not storing the JSON in a DB at all. Our new template system stores the JSON in S3 so we will do something similar.