How to copy objects from one bucket to another bucket in the same region.

  1. Login to AWS console and go to S3.
  2. Create a new S3 bucket or if you want to copy the objects to another existing bucket, you can use it.
  3. Install and configure the AWS Command Line Interface (AWS CLI) with the below steps.
    a) curl “https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip” -o “awscliv2.zip”
    b) unzip awscliv2.zip
    c) sudo ./aws/install
  4. You need to have a IAM user to proceed further. If you do not have you can follow the below steps.
    a) Open the IAM console
    b) From the navigation menu, click “Users”
    c) Select your IAM user name
    d) Click User Actions, and then click Manage Access Keys.
    e) Click Create Access Key.
    f) Click Download Credentials, and store the keys in a secure location.
  5. Configure the AWS CLI by running the following command
    aws configure
  6. It will ask for Access key and Secret key. Enter your Access key and Secret key.
  7. Press Enter to skip the default Region and default output options.
  8. Copy the objects between the source and target buckets by running the following command using the AWS CLI.
    aws s3 sync s3://DOC-EXAMPLE-BUCKET-SOURCE s3://DOC-EXAMPLE-BUCKET-TARGET
  9. Go to S3 and check the target bucket, objects will be transferred.

admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Reply

Scroll to Top