Skip to content

Instantly share code, notes, and snippets.

@weblogix
Created March 14, 2019 05:41
Show Gist options
  • Save weblogix/252538a2f64f9fc8104412d8afd0bbc5 to your computer and use it in GitHub Desktop.
Save weblogix/252538a2f64f9fc8104412d8afd0bbc5 to your computer and use it in GitHub Desktop.
[AWS Cheatsheet] #aws

Modify CORS

put-bucket-cors

#cors.json

{
    "CORSRules": [
      {
        "AllowedOrigins": ["*"],
        "AllowedMethods": ["PUT", "POST", "DELETE"],
        "AllowedMethods": ["GET"],
        "MaxAgeSeconds": 3000
      }
    ]
  }
: aws s3api put-bucket-cors --bucket acme-experiments --cors-configuration file://cors.json

Sync folder (local --> S3)

aws s3 sync <local folder> s3://<s3 bucket name>/<folder>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment