I can't send a post request to Cloudfront that I set up for my Ec2s. I get the 404 and 400 error. How do I request requests to my EC2 machines via cloudfront?
This is because by default the Allowed HTTP Methods for a CloudFront distribution are GET, HEAD.
From the console perform the following:
Behaviours tab.EditAllowed HTTP Methods select GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE Yes, EditThis process might take upt an hour to rollout to all Edge locations, but normally is much quicker.
Below is a screenshot of the option from the interface.

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