This distribution is not configured to allow the HTTP request
This error happens because CloudFront isn't configured to accept an HTTP request it's being sent (like POST
or PATCH
).
To fix it, change your CloudFront distributions settings to accept all HTTP methods.
To do that, click on the Behaviors
tab of your CloudFront distribution, select the default behavior, click Edit
, change the Allowed HTTP Methods
to GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE
, then click Yes, Edit
in the bottom right to save your changes.
It may take several minutes for your CloudFront distribution to propagate the changes.
What the error is trying to tell you is that you cannot use POST. Going to guess that cacheable means GET in this context. You need to go ahead and configure cloud front to allow "upload requests" like POST, PUT, etc. IN this case the request will go to the origin that Cloudfront uses.
Aws docs: http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating.html
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-creating-console.html
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html
Look for Allowed HTTP Methods in last link.