HTTP 405 status code (Method Not Allowed)
CloudFront returns a 405 (Method Not Allowed) error if you're trying to use an HTTP method that you haven't specified in the CloudFront distribution. You can specify one of the following options for your distribution:
-
CloudFront forwards only
GET
andHEAD
requests. -
CloudFront forwards only
GET
,HEAD
, andOPTIONS
requests. -
CloudFront forwards
GET
,HEAD
,OPTIONS
,PUT
,PATCH
,POST
, andDELETE
requests. (If you select this option, you might need to restrict access to your Amazon S3 bucket or custom origin so that users can't perform operations that you don't want them to. For example, you might not want users to have permissions to delete objects from your origin.