Getting started with AWS S3 using PHP – A Beginner’s guide

I often wonder, is it just me that doesn’t find the simplest version of code possible on the internet (without reading 50x un-necessary content) ? So from today I am starting to write my findings in the most simple way possible for complete beginners (and to refer myself in the future).

So lets quickly get started on Amazon’s wonderful AWS S3 + PHP Tutorial !

You Need :

  • Basic knowledge of PHP (functions, variables, namespaces, etc.)
  • An Amazon AWS Account (you can start with free tier)
  • Not afraid to get hands dirty


What is AWS – Amazon Web Services ?

Amazon web services, or in simple language, cloud, is the ongoing revolution in the field of servers and computing. Just like we don’t have to generate electricity or pump water in each of our homes (and let Municipal corporation / local government does that) similarly we allow ‘plug and play’ providers like Amazon AWS, Microsoft Azure, Google Cloud, etc. does that for us.


Just like electricity, we get a monthly bill generated at the end of the month and only pay for what we have used. This differs from traditional Hosting Providers(Shared, VPS, etc)  in two ways :

  • You only pay for what you use. So if your website isn’t that popular (10 / 20 pageviews a day for example), you pay only for those 20 visitors (or more specifically, their bandwidth).
  • Your Website / Backend isn’t throttled if, say a million visitors, arrive at your site at once. <insert 21 cents article here>


It is interesting to notew that the definition of ‘cloud’ itself is ambuigious (like ‘apps’).  Variouds new age VPS Providers like Digital Ocean bill by the hour (instead of month) and are considered to be hybridn of VPS + Cloud. They are pretty good at what they do (SSD servers from, 5 USD per month)  – read my review here.


Amazon Web Services : for normal people


It baffles me even topday why would Amazon pick such ‘heavyweight’ names for their services. EC2, S3, RDS, DynamoDB, SES, Route 53, etc.

What the hell does each of these mean ? (we would bge working on S3 only in this tutorial)