{"id":3605,"date":"2019-03-20T20:14:32","date_gmt":"2019-03-20T20:14:32","guid":{"rendered":"https:\/\/209.235.70.100\/?p=3605"},"modified":"2019-12-26T20:22:19","modified_gmt":"2019-12-26T20:22:19","slug":"aws-command-line-interface-cli-copy-files-to-s3","status":"publish","type":"post","link":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/","title":{"rendered":"AWS Command Line Interface (CLI)- Copy Files to S3"},"content":{"rendered":"\n

As companies move toward and leverage the cloud, each cloud provider has various tools that help to make working with your cloud environment easier. Today I want to show you a use case for one of those tools, AWS CLI, to copy files from a server in my local data center to my AWS S3 bucket.<\/p>\n\n\n\n

The AWS CLI (Command Line Interface) is a tool for managing your AWS services from the command prompt or PowerShell.\u00a0This post will assume you\u2019ve already installed the AWS CLI tool, but if you haven\u2019t you can easily do so from the following link.<\/p>\n\n\n\n

https:\/\/aws.amazon.com\/cli\/<\/a><\/p>\n\n\n\n

Once your AWS CLI has been installed, there are a few configuration steps you\u2019ll need to do before you start managing your resources. For this, you\u2019ll need to have an AWS Access Key ID, the associated Secret Access Key, default region name, and default output format. In my example, I am using PowerShell, but the same can be done via command prompt.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Now that we have the AWS CLI configured, we can start copying files! AWS CLI makes working with S3 very easy with the aws s3 cp command using the following syntax:<\/p>\n\n\n\n

aws s3 cp <source> <destination><\/em><\/p>\n\n\n\n

The source and destination arguments can be local paths or S3 locations, so you can use this command to copy between your local and S3 or even between different S3 locations.<\/p>\n\n\n\n

You can copy an individual file\u2026<\/p>\n\n\n\n

aws s3 cp D:\\SQLBackup\\TestSpace\\Full\\TestSpace_FULL_20190101_214230_1.bak<\/em><\/strong>
s3:\/\/rdxtestbackup\/SQLBackup\/TestSpace_FULL_20190101_214230_1.bak<\/em><\/strong><\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n
\"\"<\/figure>\n\n\n\n
\"\"<\/figure>\n\n\n\n

\u2026or all files in a folder.<\/p>\n\n\n\n

aws s3 cp D:\\SQLBackup\\TestSpace\\Full\\ s3:\/\/rdxtestbackup\/SQLBackup\/ –recursive<\/em><\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n
\"\"<\/figure>\n\n\n\n
\"\"<\/figure>\n\n\n\n

Thanks for reading! I hope the AWS CLI tool makes it easier for you to copy files to your S3 bucket. Leave a comment below if you’ve used the tool before and stay tuned for more AWS tips soon.<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":114,"featured_media":3606,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"acf":[],"yoast_head":"\nAWS Command Line Interface (CLI)- Copy Files to S3 - Navisite<\/title>\n<meta name=\"description\" content=\"As companies move toward and leverage the cloud, each cloud provider has various tools that help to make working with your cloud environment easier. Today\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AWS Command Line Interface (CLI)- Copy Files to S3\" \/>\n<meta property=\"og:description\" content=\"As companies move toward and leverage the cloud, each cloud provider has various tools that help to make working with your cloud environment easier. Today\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/\" \/>\n<meta property=\"og:site_name\" content=\"Navisite\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-20T20:14:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-12-26T20:22:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.navisite.com\/wp-content\/uploads\/2019\/12\/AWS_CLI_Main.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"815\" \/>\n\t<meta property=\"og:image:height\" content=\"463\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Megan Ferringer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@navisite\" \/>\n<meta name=\"twitter:site\" content=\"@navisite\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Megan Ferringer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/\"},\"author\":{\"name\":\"Megan Ferringer\",\"@id\":\"https:\/\/www.navisite.com\/#\/schema\/person\/99bad6e33cc6d3ac27337400026e4a9f\"},\"headline\":\"AWS Command Line Interface (CLI)- Copy Files to S3\",\"datePublished\":\"2019-03-20T20:14:32+00:00\",\"dateModified\":\"2019-12-26T20:22:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/\"},\"wordCount\":329,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.navisite.com\/#organization\"},\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/\",\"url\":\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/\",\"name\":\"AWS Command Line Interface (CLI)- Copy Files to S3 - Navisite\",\"isPartOf\":{\"@id\":\"https:\/\/www.navisite.com\/#website\"},\"datePublished\":\"2019-03-20T20:14:32+00:00\",\"dateModified\":\"2019-12-26T20:22:19+00:00\",\"description\":\"As companies move toward and leverage the cloud, each cloud provider has various tools that help to make working with your cloud environment easier. Today\",\"breadcrumb\":{\"@id\":\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.navisite.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Command Line Interface (CLI)- Copy Files to S3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.navisite.com\/#website\",\"url\":\"https:\/\/www.navisite.com\/\",\"name\":\"Navisite\",\"description\":\"Elevate Your Cloud Journey\",\"publisher\":{\"@id\":\"https:\/\/www.navisite.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.navisite.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.navisite.com\/#organization\",\"name\":\"Navisite\",\"url\":\"https:\/\/www.navisite.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.navisite.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.navisite.com\/wp-content\/uploads\/2020\/02\/logo.svg\",\"contentUrl\":\"https:\/\/www.navisite.com\/wp-content\/uploads\/2020\/02\/logo.svg\",\"width\":1,\"height\":1,\"caption\":\"Navisite\"},\"image\":{\"@id\":\"https:\/\/www.navisite.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/twitter.com\/navisite\",\"https:\/\/www.instagram.com\/navisite\/\",\"https:\/\/www.linkedin.com\/company\/navisite\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.navisite.com\/#\/schema\/person\/99bad6e33cc6d3ac27337400026e4a9f\",\"name\":\"Megan Ferringer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.navisite.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.navisite.com\/wp-content\/uploads\/2021\/02\/IMG-0529-150x150.jpg\",\"contentUrl\":\"https:\/\/www.navisite.com\/wp-content\/uploads\/2021\/02\/IMG-0529-150x150.jpg\",\"caption\":\"Megan Ferringer\"},\"description\":\"Megan is the Content Marketing Manager at Navisite with more than 10 years of experience helping brands discover and tell their stories. From working at a global non-profit organization to boutique marketing agencies in Chicago, she champions the power of storytelling across all industries.\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"AWS Command Line Interface (CLI)- Copy Files to S3 - Navisite","description":"As companies move toward and leverage the cloud, each cloud provider has various tools that help to make working with your cloud environment easier. Today","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/","og_locale":"en_US","og_type":"article","og_title":"AWS Command Line Interface (CLI)- Copy Files to S3","og_description":"As companies move toward and leverage the cloud, each cloud provider has various tools that help to make working with your cloud environment easier. Today","og_url":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/","og_site_name":"Navisite","article_published_time":"2019-03-20T20:14:32+00:00","article_modified_time":"2019-12-26T20:22:19+00:00","og_image":[{"width":815,"height":463,"url":"https:\/\/www.navisite.com\/wp-content\/uploads\/2019\/12\/AWS_CLI_Main.jpg","type":"image\/jpeg"}],"author":"Megan Ferringer","twitter_card":"summary_large_image","twitter_creator":"@navisite","twitter_site":"@navisite","twitter_misc":{"Written by":"Megan Ferringer","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/#article","isPartOf":{"@id":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/"},"author":{"name":"Megan Ferringer","@id":"https:\/\/www.navisite.com\/#\/schema\/person\/99bad6e33cc6d3ac27337400026e4a9f"},"headline":"AWS Command Line Interface (CLI)- Copy Files to S3","datePublished":"2019-03-20T20:14:32+00:00","dateModified":"2019-12-26T20:22:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/"},"wordCount":329,"commentCount":0,"publisher":{"@id":"https:\/\/www.navisite.com\/#organization"},"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/","url":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/","name":"AWS Command Line Interface (CLI)- Copy Files to S3 - Navisite","isPartOf":{"@id":"https:\/\/www.navisite.com\/#website"},"datePublished":"2019-03-20T20:14:32+00:00","dateModified":"2019-12-26T20:22:19+00:00","description":"As companies move toward and leverage the cloud, each cloud provider has various tools that help to make working with your cloud environment easier. Today","breadcrumb":{"@id":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.navisite.com\/blog\/aws-command-line-interface-cli-copy-files-to-s3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.navisite.com\/"},{"@type":"ListItem","position":2,"name":"AWS Command Line Interface (CLI)- Copy Files to S3"}]},{"@type":"WebSite","@id":"https:\/\/www.navisite.com\/#website","url":"https:\/\/www.navisite.com\/","name":"Navisite","description":"Elevate Your Cloud Journey","publisher":{"@id":"https:\/\/www.navisite.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.navisite.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.navisite.com\/#organization","name":"Navisite","url":"https:\/\/www.navisite.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.navisite.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.navisite.com\/wp-content\/uploads\/2020\/02\/logo.svg","contentUrl":"https:\/\/www.navisite.com\/wp-content\/uploads\/2020\/02\/logo.svg","width":1,"height":1,"caption":"Navisite"},"image":{"@id":"https:\/\/www.navisite.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/twitter.com\/navisite","https:\/\/www.instagram.com\/navisite\/","https:\/\/www.linkedin.com\/company\/navisite"]},{"@type":"Person","@id":"https:\/\/www.navisite.com\/#\/schema\/person\/99bad6e33cc6d3ac27337400026e4a9f","name":"Megan Ferringer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.navisite.com\/#\/schema\/person\/image\/","url":"https:\/\/www.navisite.com\/wp-content\/uploads\/2021\/02\/IMG-0529-150x150.jpg","contentUrl":"https:\/\/www.navisite.com\/wp-content\/uploads\/2021\/02\/IMG-0529-150x150.jpg","caption":"Megan Ferringer"},"description":"Megan is the Content Marketing Manager at Navisite with more than 10 years of experience helping brands discover and tell their stories. From working at a global non-profit organization to boutique marketing agencies in Chicago, she champions the power of storytelling across all industries."}]}},"publishpress_future_action":{"enabled":false,"date":"1970-01-01 00:00:00","action":"","terms":[],"taxonomy":"","browser_timezone_offset":0},"_links":{"self":[{"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/posts\/3605"}],"collection":[{"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/comments?post=3605"}],"version-history":[{"count":1,"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/posts\/3605\/revisions"}],"predecessor-version":[{"id":32251,"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/posts\/3605\/revisions\/32251"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/media\/3606"}],"wp:attachment":[{"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/media?parent=3605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/categories?post=3605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.navisite.com\/wp-json\/wp\/v2\/tags?post=3605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}