{"id":2300,"date":"2018-12-12T16:19:43","date_gmt":"2018-12-12T16:19:43","guid":{"rendered":"https:\/\/www.danielpradilla.info\/blog\/?p=2300"},"modified":"2019-02-18T19:54:00","modified_gmt":"2019-02-18T19:54:00","slug":"uploading-and-downloading-documents-from-amazon-s3-using-bash","status":"publish","type":"post","link":"https:\/\/www.danielpradilla.info\/blog\/uploading-and-downloading-documents-from-amazon-s3-using-bash\/","title":{"rendered":"Uploading and downloading documents from Amazon S3 using bash"},"content":{"rendered":"<p>You need to upload a file to S3 and cannot install new packages in the server, nor the s3 client tools. You only have bash, openssl and sed. Go.<\/p>\n<p>I found and adapted a script by\u00a0<a href=\"http:\/\/vszakats.net\">Viktor Szakats<\/a>, that creates all the proper headers expected by the latest AWS API. I had lots of trouble with whitespaces and empty lines. Be mindful of that when modifying these scripts:<\/p>\n<p><a href=\"https:\/\/gist.github.com\/danielpradilla\/1b9747f21b74bee4b81c9afd12e44d22\">s3-upload-aws4.sh<\/a><\/p>\n<p><a href=\"https:\/\/gist.github.com\/danielpradilla\/97fddc6f1a1985cdf8af82dd7e14b251\">s3-download-aws4.sh<\/a><\/p>\n<p>run them like:<\/p>\n<pre>. s3-upload-aws4.sh \"myfile.ext\" \"my_bucket_name\" \"folder_name_in_bucket\" \"region\" \"REDUCED_REDUNDANCY\" \"MY_AWS_ACCESS_KEY\" \"MY_AWS_SECRET_KEY\"<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You need to upload a file to S3 and cannot install new packages in the server, nor the s3 client tools. You only have bash, openssl and sed. Go. I found and adapted a script by\u00a0Viktor Szakats, that creates all the proper headers expected by the latest AWS API. I had lots of trouble with&hellip; <a class=\"more-link\" href=\"https:\/\/www.danielpradilla.info\/blog\/uploading-and-downloading-documents-from-amazon-s3-using-bash\/\">Continue reading <span class=\"screen-reader-text\">Uploading and downloading documents from Amazon S3 using bash<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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_post_was_ever_published":false},"categories":[331],"tags":[],"class_list":["post-2300","post","type-post","status-publish","format-standard","hentry","category-software-development-en-en","entry"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1tlzy-B6","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1752,"url":"https:\/\/www.danielpradilla.info\/blog\/roambi-inteligencia-de-negocios-para-ipad\/","url_meta":{"origin":2300,"position":0},"title":"Roambi: inteligencia de negocios para iPad","author":"Daniel Pradilla","date":"29\/04\/2012","format":false,"excerpt":"\u00a0 Roambi es una aplicaci\u00c3\u00b3n de inteligencia de negocios dise\u00c3\u00b1ada para visualizar datos en iPhone y iPad. Tres cosas que me parecen destacables y diferenciadoras: Asume que la mayor\u00c3\u00ada de los interesados en ver los datos, lo har\u00c3\u00a1 en un dispositivo m\u00c3\u00b3vil. Vivimos en un mundo post-PC. De los tres\u2026","rel":"","context":"In &quot;Control de Proyectos&quot;","block_context":{"text":"Control de Proyectos","link":"https:\/\/www.danielpradilla.info\/blog\/category\/controldeproyectos\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/04\/roambi.jpg?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/04\/roambi.jpg?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/04\/roambi.jpg?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/04\/roambi.jpg?resize=700%2C400 2x"},"classes":[]},{"id":1914,"url":"https:\/\/www.danielpradilla.info\/blog\/4-ways-of-getting-the-most-out-of-your-dropbox\/","url_meta":{"origin":2300,"position":1},"title":"4 ways of getting the most out of your dropbox","author":"Daniel Pradilla","date":"04\/02\/2013","format":false,"excerpt":"Dropbox is one of my essential tools.\u00a0If you already have it, I've got 4 ways of using it that you may not know about: \u00a0 1.\u00a0Upload files via email Send To Dropbox\u00a0is a service that assigns you an email address linked to your Dropbox. Everything that you send or forward\u2026","rel":"","context":"In &quot;Project Mgmt.&quot;","block_context":{"text":"Project Mgmt.","link":"https:\/\/www.danielpradilla.info\/blog\/category\/projectmanagement-en\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/01\/dropbox_logo.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2101,"url":"https:\/\/www.danielpradilla.info\/blog\/dropbox-alternatives\/","url_meta":{"origin":2300,"position":2},"title":"Two Dropbox alternatives","author":"Daniel Pradilla","date":"20\/08\/2014","format":false,"excerpt":"Like everyone else, I've run out of space in my Dropbox and my Google Drive. Besides, I'm low on space in my hard drive, so I've been looking for a solution that enables me to do manual backups, to have some mp3 and video files in an off-site and relatively\u2026","rel":"","context":"In &quot;Lifestyle&quot;","block_context":{"text":"Lifestyle","link":"https:\/\/www.danielpradilla.info\/blog\/category\/lifestyle\/"},"img":{"alt_text":"Screen-Shot-2013-05-16-at-12.50.39-PM","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2014\/08\/Screen-Shot-2013-05-16-at-12.50.39-PM.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2014\/08\/Screen-Shot-2013-05-16-at-12.50.39-PM.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2014\/08\/Screen-Shot-2013-05-16-at-12.50.39-PM.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1912,"url":"https:\/\/www.danielpradilla.info\/blog\/4-tools-to-organize-your-life\/","url_meta":{"origin":2300,"position":3},"title":"4 Tools to organize your life","author":"Daniel Pradilla","date":"04\/02\/2013","format":false,"excerpt":"Very few people manage to establish a fundamentalist separation between their work spaces and their homes. Normally our work follows us home; our shores chase us to work and they both follow us outside. How many times \u00e2\u20ac\u201c for instance\u00e2\u20ac\u201c have we arrived at the office only to find that\u2026","rel":"","context":"In &quot;Best of&quot;","block_context":{"text":"Best of","link":"https:\/\/www.danielpradilla.info\/blog\/category\/bestof\/"},"img":{"alt_text":"modern-working-desk-2","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2011\/02\/modern-working-desk-2.jpeg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2302,"url":"https:\/\/www.danielpradilla.info\/blog\/aws-lambda-python\/","url_meta":{"origin":2300,"position":4},"title":"10 things I learned while deploying my first python function to AWS Lambda","author":"Daniel Pradilla","date":"04\/01\/2019","format":false,"excerpt":"I spent a few days on and off trying to deploy a Flask REST service to AWS Lambda, just to experience what the cool kids were talking about. These are some of the things I learned along the way: \u00a0 Zappa is the easiest packager\/deployer for python (as of December\u2026","rel":"","context":"In &quot;Software Dev.&quot;","block_context":{"text":"Software Dev.","link":"https:\/\/www.danielpradilla.info\/blog\/category\/software-development-en-en\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2019\/01\/AWS-Lambda-290x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2407,"url":"https:\/\/www.danielpradilla.info\/blog\/5-lessons-i-learned-from-my-first-foray-into-clawdbot-a-local-agentic-assistant\/","url_meta":{"origin":2300,"position":5},"title":"5 lessons I learned playing with Clawdbot, a local agentic assistant","author":"Daniel Pradilla","date":"26\/01\/2026","format":false,"excerpt":"I\u2019ve spent the last few weeks playing with Clawdbot. My instance is named Clawd. If you haven\u2019t seen this category yet: think \u201cchat assistant\u201d, but with hands. It can run commands, write files, poke your integrations, and generally do the annoying glue-work you normally do by tab-switching and copy\/pasting. TL;DR\u2026","rel":"","context":"In &quot;Best of&quot;","block_context":{"text":"Best of","link":"https:\/\/www.danielpradilla.info\/blog\/category\/bestof\/"},"img":{"alt_text":"Clawdbot local agentic assistant","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2026\/01\/clawdbot.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2026\/01\/clawdbot.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2026\/01\/clawdbot.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2026\/01\/clawdbot.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/posts\/2300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/comments?post=2300"}],"version-history":[{"count":0,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/posts\/2300\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/media?parent=2300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/categories?post=2300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/tags?post=2300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}