Skip to content

Instantly share code, notes, and snippets.

@atrauzzi
Last active April 1, 2016 13:23
Show Gist options
  • Select an option

  • Save atrauzzi/f5483d60875c47c60b1a to your computer and use it in GitHub Desktop.

Select an option

Save atrauzzi/f5483d60875c47c60b1a to your computer and use it in GitHub Desktop.

Revisions

  1. atrauzzi revised this gist Apr 1, 2016. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions cors.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    <?xml version="1.0" encoding="UTF-8"?>
    <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <AllowedHeader>*</AllowedHeader>
    </CORSRule>
    </CORSConfiguration>
  2. atrauzzi revised this gist Mar 30, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion policy.json
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,6 @@
    "Principal": "*",
    "Action": "s3:GetObject",
    "Resource": "arn:aws:s3:::[BUCKET NAME]/*"
    },
    }
    ]
    }
  3. atrauzzi revised this gist Mar 30, 2016. 1 changed file with 10 additions and 3 deletions.
    13 changes: 10 additions & 3 deletions policy.json
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    "Id": "GrantAppAccess",
    "Statement": [
    {
    "Sid": "1",
    "Sid": "AppObjects",
    "Effect": "Allow",
    "Principal": {
    "AWS": "[USER ARN]"
    @@ -16,7 +16,7 @@
    "Resource": "arn:aws:s3:::[BUCKET NAME]/*"
    },
    {
    "Sid": "2",
    "Sid": "AppBucket",
    "Effect": "Allow",
    "Principal": {
    "AWS": "[USER ARN]"
    @@ -25,6 +25,13 @@
    "s3:ListBucket"
    ],
    "Resource": "arn:aws:s3:::[BUCKET NAME]"
    }
    },
    {
    "Sid": "AnonymousObjects",
    "Effect": "Allow",
    "Principal": "*",
    "Action": "s3:GetObject",
    "Resource": "arn:aws:s3:::[BUCKET NAME]/*"
    },
    ]
    }
  4. atrauzzi revised this gist Mar 16, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion policy.json
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,4 @@
    {
    "Version": "1",
    "Id": "GrantAppAccess",
    "Statement": [
    {
  5. atrauzzi created this gist Mar 5, 2016.
    31 changes: 31 additions & 0 deletions policy.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,31 @@
    {
    "Version": "1",
    "Id": "GrantAppAccess",
    "Statement": [
    {
    "Sid": "1",
    "Effect": "Allow",
    "Principal": {
    "AWS": "[USER ARN]"
    },
    "Action": [
    "s3:GetObjectAcl",
    "s3:GetObject",
    "s3:PutObject",
    "s3:DeleteObject"
    ],
    "Resource": "arn:aws:s3:::[BUCKET NAME]/*"
    },
    {
    "Sid": "2",
    "Effect": "Allow",
    "Principal": {
    "AWS": "[USER ARN]"
    },
    "Action": [
    "s3:ListBucket"
    ],
    "Resource": "arn:aws:s3:::[BUCKET NAME]"
    }
    ]
    }