Learn how to build a custom JSON API in Shopify with Liquid - a trick for when you want to build really interesting AJAX experiences in a theme.
How To: Host Images on Amazon S3 – Cheap In 5 Minutes
We'll teach you How To Host Images On Amazon S3 for 1 year for less than the cost of a stamp! (in most cases)
Many times we’re asking if we can accept a disk of images or a thumb drive for Amazon S3 images. The problem for us is, that is completely unsustainable at our price points due to the manual nature of this. However the good news is the fix is dead simple and best of all cheap. AWS’s S3 service costs about $0.03 / GB of storage per month.
So how big is 1GB? Well on average you could store
- 18,874 Word Documents
- 3,146 PDFs
- 614 Photos
- 230 Songs
That means most of our customers can use this for 1 year for LESS than the cost of the postage to send us a USB drive or a Disk ($0.36 / year) !! Ohh yeah and did I mention that Amazon gives you 5GB free for your first year!?!
Learn How To Host Images Amazon S3
So now that you understand why and how cheap this is, let me show you how to set this up.
Step 1: Create an AWS Account
Head on over to https://aws.amazon.com and setup a new account. You should only need a credit card and a phone so that Amazon can call to verify you are real.
Step 2: Create an S3 Bucket
Once your account is set up and verified, we need to create a bucket. A bucket is similar to a folder on your computer and the only limitation of a bucket is that you must have a unique name across all of aws. Typically we suggest your business name – media. (ie: mybusinessname-media).
1. Once logged in and verified in AWS, click the Services dropdown in the top left and Select Amazon S3
2. Click Create Bucket, enter the name, and select Region: US Standard
Step 3: Upload your files into the bucket
Once created, click on the bucket name in the list on the left and then click Upload on the next screen
Step 4: Make the Bucket Public So we Can grab the images
After you upload all files, the last step is to make the bucket public so we can get the images from it.
Click to the right of the bucket name and not on the text to get the properties tab to the right.
Click permissions and Add Bucket Policy and copy and paste the following in making SURE you change the highlighted word “bucket” below to match the bucket name you created in step 2.
See example here you can copy and paste:
And replace “bucket-name” with the name of your bucket.
5. Find the URLs for your files by clicking on the bucket name, then selecting a single file and showing the properties.
If you did everything right, clicking that link should show you the image in your browser.
Now you can send us an example URL of one file and we’ll be able to get your files over the internet without the need for a disk and so you can share them in the future.
If you need to add new ones you can repeat step 3 over and over again.
- Create AWS Account
- Create S3 Bucket
- Upload files to the S3 Bucket
- Make bucket accessible to the world
- Found how to get the URL for the image.