Setting an open CORS policy on an S3 bucket
posted 2022.01.18 by Clark Wilkins, Simplexable

I was working on implementing file uploads to S3 in a React project. One of the setup steps is to implement a cross-border CORS configuration. Here's how you get this done.

  1. Login to your S3 console.
  2. Go to the bucket.
  3. Select permissions.
  4. Scroll down to Cross-origin resource sharing (CORS).
  5. Click Edit and add this JSON array.

[  {
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"HEAD", "PUT",
"POST"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]

There's a good explanation of this here.