Skip to content

Instantly share code, notes, and snippets.

#THIS SHOULD BE ADDED IN YOUR location /
add_header 'Access-Control-Allow-Origin' '*';
#wide cors
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
#
# Om nom nom cookies
@tirasmuturi
tirasmuturi / S3 buckets copy.md
Created September 3, 2019 15:09 — forked from ushu/S3 buckets copy.md
Copy between S3 buckets w/ different accounts

This is a mix between two sources:

basically the first resource is great but didn't work for me: I had to remove the trailing "/*" in the resource string to make it work. I also noticed that setting the policy on the source bucket was sufficient. In the end these are the exact steps I followed to copy data between two buckets on two accounts

Basically the idea there is:

  • we allowe the destination account to read the source bucket (in the console for the source account)
  • we log as the destination and start the copy