How to Host Images on Amazon S3 Storage Service

Cloud Storage Solution

The Premier Cloud Storage Platform What are you waiting for? Start Now www.Nirvanix.com

Virtual Private Servers

Complete Web Hosting Information Find The Best Web Host Today! www.TopHosts.com

Last week, I moved all the common web images, CSS, JavaScript and other static files of this blog to Amazon S3 Storage service and that alone reduced the average CPU load / memory requirement of the web server by almost 90% – see graph.

Why Use Amazon S3 Storage for Hosting Files

There are multiple advantage of hosting images on Amazon S3 – your site’s downtime is reduced because there are lesser number of concurrent connections to your main web service (and hence lower memory requirements) and two, the site’s overall load-time is reduced because static images and other files are served via the more efficient content delivery network of Amazon

How to Host Images on Amazon S3 Storage

Let’s assume that you have an account at amazon.com (who doesn’t have one) and you want to use the sub-domain files.labnol.org for hosting images that in turn are stored on Amazon Simple Storage Service.

Step 1: Go to Amazon.com and sign-up for the S3 service. You may use the same account that you created for shopping on the main amazon.com portal.

Create CNAME Record for Amazon S3

Step 2: Login to the control panel of your web hosting service and create a new CNAME record - we’ll set the name as files (same as sub-domain) and assign it a value of files.labnol.org.s3.amazonaws.com (for details check this article on Amazon S3 Buckets).

Step 3: Install S3 Fox – this is my favorite Amazon S3 client though it works inside Firefox. Check this S3 Guide for a list of other popular S3 clients.

Step 4: Now we’ll associate S3 Fox with our Amazon S3 account. First go here to access your secret Access Key ID. Then click the S3 Fox button in the Firefox status bar and complete the associate via "Manage Accounts."

Create folders to host files

Step 5: In the "Remote View" tab of S3 Fox, create a new folder that has the same name as your sub-domain. Drag-n-drop all your images, static files and other folder from the desktop into this folder and they’ll automatically get uploaded to your Amazon S3 account.

Amazon S3 Upload Queue

Step 6: This is important. By default all files uploaded on Amazon S3 are accessible only to the owner but since your are hosting web pages for a public website, anyone should be able to read these files.

Set File Permissions on Amazon S3

To change the default permission, right-click the main folder files.labnol.org and choose "Edit ACL". Now select "Read" for "Everyone" and "Apply to All Folders".

Step 7: This is optional but if you don’t like your web pages to be crawled by Google and other spiders, you may create a robots.txt file and place it in root directory.

User-agent: *Disallow: /

This may be a good idea because Amazon S3 charges you for every byte of requested data so you may block web bots and thus reduce your overall bandwidth bills.

Is Amazon S3 More Expensive Than Your Web Host

Here’s a detailed report of my Amazon S3 usage for one week. I’ll have to shell out around $28 per week or a little over $100 per month.

Itemized Bill - Amazon S3 storage

Now DreamHost Private Server hosting used to cost me around $150-200 a month but after moving the images to Amazon S3, that charge has reduced by around 60% so the total monthly cost of hosting website + images still remains the same.

时间: 2024-07-31 04:31:29

How to Host Images on Amazon S3 Storage Service的相关文章

Amazon Simple Storage Service(Amazon S3) 之一,基本概念

这2天接触了一下Amazon Web Services(AWS)中的Amazon Simple Storage Service,简称Amazon S3(下称S3).S3站点上用下面的语句描述了自己的作用: Amazon S3 provides a simple web services interface that can be used to store and retrieve any amount of data, at any time, from anywhere on the web

用 Amazon Web Services 进行云计算,第 2 部分: 用 Amazon Simple Storage Service (S3) 在云中存储数据

学习基本的 Amazon SimpleDB (SDB) 概念,研究 boto(一个用于与 SDB 交互的开放源码 Python 库)提供的一些功能.在这个 "用 Amazon Web Services 进行云计算" 系列中,学习如何使用 Amazon Web Services 进行云计算.了解这些服务如何为设计和构建可伸缩.可靠的应用程序提供一种可选方案.本文讨论 Amazon Simple Storage Service (S3) 提供的可伸缩.高响应性的服务.了解用于与 S3 交互

Amazon S3 API

一.概述 Amazon s3,全称为Amazon Simple Storage  Service.EC2和S3是Amazon最早推出的两项云服务. REST,这也是比较火的一种Web服务架构.简单来说,资源是由URI指定,对资源的操作包括GET.PUT.POST.DELETE和HEAD,返回结果常常是XML或者其他形式.参见维基REST: Amazon S3的操作包括三部分:Service.Buckets和Objects. Service只包括GET操作,就是返回所有的Buckets列表. Ob

从Amazon S3服务看将来的IT行业趋势

Amazon S3服务即Amazon Simple Storage Service (Amazon S3),另外也得知当我们某天给微软或者给国外某个大公司电话时候,而最后电话将被转接到印度,由印度的某大公司负责处理所有的业务.从这些我们可以知道,服务趋向于集中化,专业化,方便化! 这些业务在国外已经有很多成熟的应用模式,而国内相对较少,只听过携程老板说过他们的IVR每时每刻同时可以1000Phone接入量,我想有一天他们或许也会走如这个行业. 另外在服务器的架构集群化越来越夸张,国内的CDN虽然

Amazon S3中断后的思考:云时代,怎么把鸡蛋放在不同的篮子里呢?

Amazon S3中断事件回顾 亚马逊云端资料储存服务Amazon S3(Amazon Simple Storage Service),在美国时间2月28 日上午发生故障一度中断,连带使数千个采用Amazon S3服务的网站受到波及,包括软件系统服务.新闻媒体.政府机构等网站皆无法正常运作.此次故障持续4个小时之久,已经给受影响的Amazon S3用户造成巨大损失. 遭遇Amazon S3中断事件后的思考 即使云计算能够提供其承诺的"像自来水和电力"一样的随用随取的资源,但是别忘了还有

Using Amazon S3 from Perl

数据管理(Data management)对于任何资源型站点都是一项艰巨而又重要的挑战.随着指数级增长的海量数据和多媒体的日益流行,甚至是小型的资源行站点也必要进行有效的管理和发布大量的数据.另外,如果简易的站点外数据资源管理(offsite storage resource)带来工作的省心,想必对于所有站点维护人员都是一大福音. 在SundayMorningRides.com上,我们为终端用户们管理数据量不断持续增长的GPS(全球定位系统),GIS(地理信息系统)数据和网页内容(文字,图像,视

Amazon S3(Simple Storage Service)在线存储服务介绍

Amazon S3(Simple Storage Service)是Amazon Web Services在2006年3月推出的在线存储服务.今天为了解决一个录音共享管理,研究了一下Amonzon S3,非常有意思,具有实用价值. Amazon S3的特点 不用于网络硬盘,Amamon Simple Storage Servive是供商用的,所以其服务在可靠性.扩展性方面设定了更高的标准. 你的网站流量爆发的时候Amazon S3可以支持住. 比虚拟主机更好的可靠性 Amazon S3是面向开发

如何利用Amazon S3服务将文件备份到国外

如果担心自己网站/Blog内容遇到不可抗力的用户可以考虑一下利用s3的服务将文件远程备份到国外.去年AMazon推出了一系列基于Web的服务,其中S3(Simple Storage Service)是网络服务的存储和带宽传输,发布时的价格为: # $0.15 per GB-Month of storage used. # $0.20 per GB of data transferred. 具体成本可以参考一下Jeremy的在家备份和使用S3的比较,算算电费和灾难恢复等可靠性指标还是用s3比较便宜

企业存储使用Amazon S3六大理由

Dropbox, OpenSimulator, Zmanda, Ubuntu One 和 SmugMug都是知名的在线业务品牌.他们有一个共同的特点就是都具有Amazon S3(Simple Storage Service,简单存储服务).如果你想拥有具有可扩展性.高可用性而且价格低廉的存储服务,那么Amazon S3 是个不错的选择.如果仅靠营销不能使你信服,那么有六个理由让你选择Amazon S3作为企业存储. 1. 即用即付的定价 由于没有每月的最低额定费用,你只需根据你所使用的去支付费用