Located in Boston MA 02216.
+1-855-55-RDAIT

Error Copying files from one S3 bucket to another AWS account

Error Copying files from one S3 bucket to another AWS account

I ran into a strange problem when trying to copy files from one S3 bucket to another S3 bucket in a different account. I kept receiving access denied errors no matter what I tried! It turns out the solution was rather simple!

Symptom

When trying to copy files from the source bucket, I would receive errors such as:

  • An error occurred (AccessDenied) when calling the GetObject operation: Access Denied
  • 404 errors
  • No error at all!

Yet I was able to use the ls command to see the source file! I tried several different methods of setting up the permissions, creating bucket policies, etc. Nothing was working.

Solution

It turns out the solution was very simple: the permissions on each file did not allow the user! I thought that just setting the Bucket Policy to allow the user would be enough, but it was not! To fix this you need to create a new source bucket with the correct permissions. Unless you only have a few files, it will take far too long to edit permissions on the individual files.

Links

https://blog.vizuri.com/how-to-copy/move-objects-from-one-s3-bucket-to-another-between-aws-accounts
https://www.slashroot.in/how-copy-files-one-s3-bucket-another-s3-bucket-another-account

Comments are closed.