{"id":838,"date":"2015-03-24T05:32:37","date_gmt":"2015-03-24T05:32:37","guid":{"rendered":"http:\/\/shivdev.com\/blog\/?p=838"},"modified":"2015-03-26T23:48:40","modified_gmt":"2015-03-26T23:48:40","slug":"download-an-entire-aws-s3-bucket-or-file","status":"publish","type":"post","link":"http:\/\/shivdev.com\/blog\/2015\/03\/24\/download-an-entire-aws-s3-bucket-or-file\/","title":{"rendered":"Download an entire AWS S3 bucket or file"},"content":{"rendered":"<p>AWS CLI to the rescue. It&#8217;s really quick and easy. Install AWS CLI, add your keys to the credentials and then fire away.<\/p>\n<ul>\n<li><a href=\"http:\/\/aws.amazon.com\/cli\/\">AWS CLI Reference<\/a> (<strong>pip install awscli<\/strong>) of course you have Python<\/li>\n<li><a href=\"http:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-getting-started.html\">Configuring AWS CLI<\/a> (<strong>~\/.aws\/credentials<\/strong>) use profiles for qa, dev etc.<\/li>\n<li><a href=\"http:\/\/docs.aws.amazon.com\/cli\/latest\/reference\/s3\/ls.html\">AWS ls command<\/a> (<strong>aws s3 ls s3:\/\/mybucket<\/strong>) <\/li>\n<li><a href=\"http:\/\/docs.aws.amazon.com\/cli\/latest\/reference\/s3\/cp.html\">AWS cp command<\/a> (<strong>aws s3 cp s3:\/\/mybucket\/test.txt .<\/strong>) create all your aliases<\/li>\n<\/ul>\n<p>Here are some of mine <\/p>\n<blockquote><p>\nalias s3ls=&#8217;function _s3ls(){ aws s3 ls s3:\/\/&#8221;$@&#8221; ; }; _s3ls&#8217;<br \/>\nalias s3get=&#8217;function _s3get(){ aws s3 cp s3:\/\/&#8221;$@&#8221; . ; }; _s3get&#8217;<br \/>\nalias s3getdir=&#8217;function _s3getdir(){ aws s3 cp s3:\/\/&#8221;$@&#8221; . &#8211;recursive ; }; _s3getdir&#8217;\n<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>AWS CLI to the rescue. It&#8217;s really quick and easy. Install AWS CLI, add your keys to the credentials and then fire away. AWS CLI Reference (pip install awscli) of course you have Python Configuring AWS CLI (~\/.aws\/credentials) use profiles for qa, dev etc. AWS ls command (aws s3 ls s3:\/\/mybucket) AWS cp command (aws [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/838"}],"collection":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/comments?post=838"}],"version-history":[{"count":7,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/838\/revisions"}],"predecessor-version":[{"id":845,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/838\/revisions\/845"}],"wp:attachment":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/media?parent=838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/categories?post=838"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/tags?post=838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}