Skip to content

Instantly share code, notes, and snippets.

@icarrr
Created October 19, 2021 08:52
Show Gist options
  • Save icarrr/a546fdb5d3d4b5d2aa88c4922600fa0a to your computer and use it in GitHub Desktop.
Save icarrr/a546fdb5d3d4b5d2aa88c4922600fa0a to your computer and use it in GitHub Desktop.

Revisions

  1. icarrr created this gist Oct 19, 2021.
    45 changes: 45 additions & 0 deletions s3.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    # Policy

    ```json
    {
    "Version": "2012-10-17",
    "Statement": [
    {
    "Sid": "AllowPublicRead",
    "Effect": "Allow",
    "Principal": {
    "AWS": "*"
    },
    "Action": "s3:GetObject",
    "Resource": "arn:aws:s3:::BucketNate/*"
    }
    ]
    }
    ```

    # CORS

    ```json
    [
    {
    "AllowedHeaders": [
    "*"
    ],
    "AllowedMethods": [
    "HEAD",
    "GET",
    "PUT",
    "POST",
    "DELETE"
    ],
    "AllowedOrigins": [
    "*"
    ],
    "ExposeHeaders": [
    "ETag",
    "x-amz-meta-custom-header"
    ]
    }
    ]

    ```