Copy an Amazon s3 object to another folder in another bucket.

ap.singh

I want to copy all the data from on bucket to another directory in another bucket on amazon s3 with java.

Like I have a bucket name sourceBucket and a destBucket and there is another directory in destBucket. i want to copy all the data from sourceBucket to that directory. And i am using java. I am unable to find the solution

Aneesh

Try :

ObjectListing objectListing = s3.listObjects(new ListObjectsRequest()
                                .withBucketName(bucketName)
                                .withPrefix(""));

for (S3ObjectSummary objectSummary : objectListing.getObjectSummaries()) {s3client.copyObject(sourceBucketName, objectSummary.getKey(), 
                    destinationBucketName, objectSummary.getKey());}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how to copy s3 object from one bucket to another using python boto3

From Dev

How to transfer an Amazon S3 bucket to another account?

From Dev

Copy to Redshift from another accounts S3 bucket

From Java

Put Object to S3 Bucket of another account

From Dev

How can I execute a command (like copy) for each folder in an Amazon S3 bucket?

From Dev

S3: User cannot access object in his own s3 bucket if created by another user

From Dev

Mule ESB: How to take all the files in a folder inside Bucket of Amazon S3 ( get object content)

From Dev

configure Amazon s3 bucket to run Lambda function created in another account

From Dev

configure Amazon s3 bucket to run Lambda function created in another account

From Dev

How to create a folder in an amazon S3 bucket using terraform

From Dev

amazon s3, upload file in folder in bucket

From Dev

How to create a new folder in amazon S3 bucket?

From Dev

Copy a list of folder to another folder?

From Dev

how to copy a folder into another folder

From Dev

AWS Lambda: How to read CSV files in S3 bucket then upload it to another S3 bucket?

From Dev

How to expire s3 objects when another object is added to the same folder?

From Dev

Copy contents of subfolder to another folder

From Dev

Copy specific files to another folder

From Dev

copy folder permission to another server

From Dev

could not copy the folder with .txt file in it to another folder

From Dev

could not copy the folder with .txt file in it to another folder

From Dev

how to copy from current folder to another folder

From Dev

Command line: Copy files listed with DIR /S to another folder

From Dev

Rails 4, Fog, Amazon s3 - retrieving all the images as an array from a specific folder in a bucket.

From Dev

creating a folder/uploading a file in amazon S3 bucket using API

From Dev

How to download all the contents of an S3 bucket and then upload to another bucket?

From Dev

Copying an s3 bucket to another bucket is too slow, how can I do it faster?

From Dev

copy amazon resources from one account to another

From Dev

Copy object reference to another observable

Related Related

  1. 1

    how to copy s3 object from one bucket to another using python boto3

  2. 2

    How to transfer an Amazon S3 bucket to another account?

  3. 3

    Copy to Redshift from another accounts S3 bucket

  4. 4

    Put Object to S3 Bucket of another account

  5. 5

    How can I execute a command (like copy) for each folder in an Amazon S3 bucket?

  6. 6

    S3: User cannot access object in his own s3 bucket if created by another user

  7. 7

    Mule ESB: How to take all the files in a folder inside Bucket of Amazon S3 ( get object content)

  8. 8

    configure Amazon s3 bucket to run Lambda function created in another account

  9. 9

    configure Amazon s3 bucket to run Lambda function created in another account

  10. 10

    How to create a folder in an amazon S3 bucket using terraform

  11. 11

    amazon s3, upload file in folder in bucket

  12. 12

    How to create a new folder in amazon S3 bucket?

  13. 13

    Copy a list of folder to another folder?

  14. 14

    how to copy a folder into another folder

  15. 15

    AWS Lambda: How to read CSV files in S3 bucket then upload it to another S3 bucket?

  16. 16

    How to expire s3 objects when another object is added to the same folder?

  17. 17

    Copy contents of subfolder to another folder

  18. 18

    Copy specific files to another folder

  19. 19

    copy folder permission to another server

  20. 20

    could not copy the folder with .txt file in it to another folder

  21. 21

    could not copy the folder with .txt file in it to another folder

  22. 22

    how to copy from current folder to another folder

  23. 23

    Command line: Copy files listed with DIR /S to another folder

  24. 24

    Rails 4, Fog, Amazon s3 - retrieving all the images as an array from a specific folder in a bucket.

  25. 25

    creating a folder/uploading a file in amazon S3 bucket using API

  26. 26

    How to download all the contents of an S3 bucket and then upload to another bucket?

  27. 27

    Copying an s3 bucket to another bucket is too slow, how can I do it faster?

  28. 28

    copy amazon resources from one account to another

  29. 29

    Copy object reference to another observable

HotTag

Archive