Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy from one S3 bucket to another #63

Open
clutchDM opened this issue Feb 16, 2017 · 1 comment
Open

Copy from one S3 bucket to another #63

clutchDM opened this issue Feb 16, 2017 · 1 comment

Comments

@clutchDM
Copy link

The documentation for the "copyFrom" option would imply that this is possible, however after trying the sample code (included below for convenience), I was not able to copy the contents of one bucket to another. I tried adding the "dest" parameter, adding the "bucket" parameter to options, and removing the "src" parameter. I got an error when I removed the "src" parameter, and all other attempts said "Put 0 files".

s3: {

  options: {
    accessKeyId: "<%= aws.accessKeyId %>",
    secretAccessKey: "<%= aws.secretAccessKey %>",
    bucket: "my-bucket"
  },

  //Copy all files in directory
  copyFiles: {
    src: "static/**",
    options: {
      copyFrom: 'my-bucket2/static'
    }
  }

}

A little more context. I'm copying my static assets to S3, to be served by CloudFront. I'm putting everything in a static folder in S3, however, that static folder doesn't exist locally. Could that be an issue? Is there something else I'm missing here?

@bankimatglobant
Copy link

Please let me know if any one finds solution. I am also looking for copy one folder to another folder within the same s3 bucket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants