{"id":6056,"date":"2021-01-09T19:51:53","date_gmt":"2021-01-09T14:21:53","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=6056"},"modified":"2021-01-09T19:51:55","modified_gmt":"2021-01-09T14:21:55","slug":"how-to-copy-objects-from-one-bucket-to-another-bucket-in-the-same-region","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-copy-objects-from-one-bucket-to-another-bucket-in-the-same-region\/","title":{"rendered":"How to  copy objects from one bucket to another bucket in the same region."},"content":{"rendered":"\n<ol class=\"wp-block-list\"><li>Login to AWS console and go to S3.<\/li><li>Create a new S3 bucket or if you want to copy the objects to another existing bucket, you can use it.<\/li><li>Install and configure the AWS Command Line Interface (AWS CLI) with the below steps.<br>a) <span class=\"has-inline-color has-vivid-cyan-blue-color\">curl &#8220;https:\/\/awscli.amazonaws.com\/awscli-exe-linux-x86_64.zip&#8221; -o &#8220;awscliv2.zip&#8221;<\/span><br>b) <span class=\"has-inline-color has-vivid-cyan-blue-color\">unzip awscliv2.zip<\/span><br>c) <span class=\"has-inline-color has-vivid-cyan-blue-color\">sudo .\/aws\/install<\/span><\/li><li>You need to have a IAM user to proceed further. If you do not have you can follow the below steps.<br>a) Open the IAM console<br>b) From the navigation menu, click &#8220;Users&#8221;<br>c) Select your IAM user name<br>d) Click <strong>User Actions<\/strong>, and then click <strong>Manage Access Keys<\/strong>.<br>e) Click <strong>Create Access Key<\/strong>.<br>f) Click <strong>Download Credentials<\/strong>, and store the keys in a secure location.<\/li><li>Configure the AWS CLI by running the following command<br><span class=\"has-inline-color has-vivid-cyan-blue-color\">aws configure<\/span><\/li><li>It will ask for Access key and Secret key. Enter your Access key and Secret key.<\/li><li>Press <strong>Enter<\/strong> to skip the default Region and default output options.<\/li><li>Copy the objects between the source and target buckets by running the following command using the AWS CLI.<br><span class=\"has-inline-color has-vivid-cyan-blue-color\">aws s3 sync s3:\/\/DOC-EXAMPLE-BUCKET-SOURCE s3:\/\/DOC-EXAMPLE-BUCKET-TARGET<\/span><\/li><li>Go to S3 and check the target bucket, objects will be transferred.<br><\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Login to AWS console and go to S3. Create a new S3 bucket or if you want to copy the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[803,300,804,806,807,324,805],"class_list":["post-6056","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-amazon-s3","tag-aws","tag-aws-s3","tag-bucket","tag-one-bucket-to-another","tag-s3","tag-transfer-objects","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1zG","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=6056"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6056\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}