Cloudfront S3 origin response 403 for the Options request


I'm using cloudfront with s3 origin.

I do not understand why cloudfront respond with 403 error for the Options preflight request.

S3 cors settings:

        "AllowedHeaders": [
        "AllowedMethods": [
        "AllowedOrigins": [
        "ExposeHeaders": [],
        "MaxAgeSeconds": 0

cloudfront request origin policy:

(include below headers)

My cloudfront distributions's behavior also allow OPTIONS method. But I do not know why I get 403 error http status code with below response headers:

access-control-allow-headers: *
access-control-allow-methods: GET,HEAD
vary: Access-Control-Request-Method
vary: Origin
vary: Access-Control-Request-Headers
x-cache: Error from cloudfront
1 Answer
  • Thank you. It is because I did not write the protocol.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions