Skip to content

Instantly share code, notes, and snippets.

@jdecode
Last active January 17, 2024 11:45
Show Gist options
  • Save jdecode/23a42aaa8fb01feb03f73164c15dc557 to your computer and use it in GitHub Desktop.
Save jdecode/23a42aaa8fb01feb03f73164c15dc557 to your computer and use it in GitHub Desktop.
S3 and IAM policy and configuration setup

Following is the CORS configuration that goes under Bucket > Permissions

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
@er-pkumar
Copy link

New/JSON CORS

[{
  "AllowedHeaders": [],
  "AllowedMethods": [
      "GET",
      "POST"
  ],
  "AllowedOrigins": [
      "*"
  ],
  "ExposeHeaders": []
}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment