Welcome!

Blog Feed Post

How to host Media Files on Amazon S3 with CloudBerry Explorer (part 1)


In this post we will discuss the advantages of storing media content of your website on Amazon S3 and how CloudBerry Explorer can help.  

Overview

If you want to learn how to get your Amazon S3 account you can read our previous post here

One of the typical ways to improve scalability of high traffic website is to serve it contents from several web servers. For example you may want to store your html files and dynamic script files at http://www.mysite.com/ while multimedia content such as images, video and audio files at http://media.mysite.com/ This way all request for html pages will go to first sever and requests for media content will go to the second one allowing each server to perform better under high load.

Let’s see how you can employ Amazon S3 as your second server. Amazon S3 offers you unlimited scalability and pay as you go model. You pay only for what actually is stored on your S3 account and pay only for the actual traffic. If the amount of data grows you pay more if it decreases you pay less. Same is with the traffic.

Amazon S3 can also act as a web server serving static content and this is where it comes handy. So instead of ordering another server to store your media content from your hosting provider you can sign-up for Amazon S3 account and move your images and video files there.

How to get Amazon S3 account and CloudBerry Explorer

 

It takes just a couple of minutes to create your own Amazon S3 account. We have a special blog post about it that you can find here

You can download CloudBerry Explorer freeware S3 client here

Copying files

Obviously if you want to serve your media files from Amazon S3 you will have to copy your files to your Amazon S3 account.  This is where you will need a client tool. There are many client tools available out there, but in this post we will talk about CloudBerry Explorer freeware.

Creating a bucket

First you will have to create a bucket that will have the same name as your domain name. for our example we will create a bucket called media.mysite.com,  this will help us to configure a CNAME for the bucket and you will learn more about it later.  Also make sure the name of the bucket is in lowercase – this is a requirement if you want to serve files from your bucket.


Copying files

 

Now you can copy files to your newly created bucket. Just select files on your local disk and click copy button on the toolbar.


 

Configuring access rights

 

To be able to serve your media files to internet users you will have to allow anonymous access to the files. You can do it easily by selecting the bucket and clicking the ACL Editor button in the toolbar.


ACL Editor will come up and you will have to grant “All Users” Read access to the bucket. “All Users” built-in group represents anonymous Internet users.  Make sure the check box “Apply for all subfolders and files” is checked off as it will automatically propagate access rights to all files in the bucket and you won’t have to set them up one by one. 

The ability to apply access rights to all objects in the bucket is one of the advantages of CloudBerry Explorer over other tools.  


Another cool feature is that you don’t have to care about access rights anymore - CloudBerry Explorer will apply bucket’s ACL to any new files copied to the bucket.

Generating URL

 

Now you have everything you need to start serving your files from Amazon S3. The syntax of the URL should conform to the following rule

http://[bucketname].s3.amazonaws.com/[filename]

your files URLs will look like the following

http://media.mysite.com.s3.amazonaws.com/Picture003.jpg

http://media.mysite.com.s3.amazonaws.com/Picture004.jpg

CloudBerry Explorer has an easy way to generate URLs for multiple files. Just select multiple files and click “Web URL” button on the toolbar.


In the dialog box you can see URLs for all your files and you can click Copy to clipboard button to copy them and paste wherever you like.

 


Configuring CNAMEs

 

Would you like to be able to use simpler link to your media files? Something like

http://media.mysite.com /Picture004.jpg

Is that possible? Yes! This is where CNAME comes. I am not going to get into DNS internal but simply speaking CNAME is a way to create a sub domain and refer it to another location. In our case we will refer a domain to Amazon S3 bucket.

All you have to do is to configure appropriate CNAME in your hosting provider control panel. I use 1&1 but every hosting provider offers a way to create CNAMEs and you will just have to find out the details.

To create a CNAME record you will have to specify an alias media and s3.amazonaws.com domain. This is how it looks like in 1&1 control panel:



It usually takes some time for DNS configuration to take effect, so the changes will not be available immediately.

Generating URLs with CNAME

 

Now you can start generating nice URLs using your newly created CNAME. Open the Web URL dialog box that you are already familiar with and type CNAME as indicated on the screen.  You will see that all URLs will be automatically updated to include the CNAME.


 

That’s it. Now you are ready to update your html code with new URLs and improve the scalability of your web server by taking advantage of Amazon S3.

 

Automating upload with PowerShell command line interface

 

If you are wondering how you can automate the process of copying the files to Amazon S3 you can check out CloudBerry Explorer PowerShell command line interface here It can automate most of the tasks available in CloudBerry Explorer GUI.

There is also an open source C# library called Resourceful that you can use to automate date transfer to S3. You can download the library at here

There is a huge number of 3rd party libraries for Amazon S3 available and those two are just examples.

Looking ahead to part 2

In the second part of our article we will look at how you can employ Amazon CloudFront content delivery service to make your files available in multiple locations and how to configure CloudFront using CloudBerry Explorer.

Another area that we will explore is how to reduce your monthly bills by configuring cache-control headers. 

Conclusion

As you could see Amazon S3 offers a great solution for hosting your media content while decreasing the load of your primary web server. There are some obvious advantages including pay as you go model and unlimited scalability. On the other hand CloudBerry Explorer freeware can help copy files to S3 account, configure your files to be accessible by web browser and automate the whole process.


Want to know how much it may cost to host videos on Amazon S3? Check out this blog post 

Read the original blog entry...

More Stories By Alexandra Brown

Marketing Manager at CloudBerry Lab, the company that specialize on tool that makes Cloud Computing adoption easier. CloudBerry Lab is established in 2008 by a group of experienced IT professionals with the mission to help organization in adopting Cloud computing technologies by closing the gap between Cloud vendors propositions and consumer needs through development of innovative low costs solutions.

Latest Stories
Wooed by the promise of faster innovation, lower TCO, and greater agility, businesses of every shape and size have embraced the cloud at every layer of the IT stack – from apps to file sharing to infrastructure. The typical organization currently uses more than a dozen sanctioned cloud apps and will shift more than half of all workloads to the cloud by 2018. Such cloud investments have delivered measurable benefits. But they’ve also resulted in some unintended side-effects: complexity and risk. ...
It is ironic, but perhaps not unexpected, that many organizations who want the benefits of using an Agile approach to deliver software use a waterfall approach to adopting Agile practices: they form plans, they set milestones, and they measure progress by how many teams they have engaged. Old habits die hard, but like most waterfall software projects, most waterfall-style Agile adoption efforts fail to produce the results desired. The problem is that to get the results they want, they have to ch...
"We are a monitoring company. We work with Salesforce, BBC, and quite a few other big logos. We basically provide monitoring for them, structure for their cloud services and we fit into the DevOps world" explained David Gildeh, Co-founder and CEO of Outlyer, in this SYS-CON.tv interview at DevOps Summit at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Cloud Expo, Inc. has announced today that Andi Mann and Aruna Ravichandran have been named Co-Chairs of @DevOpsSummit at Cloud Expo Silicon Valley which will take place Oct. 31-Nov. 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. "DevOps is at the intersection of technology and business-optimizing tools, organizations and processes to bring measurable improvements in productivity and profitability," said Aruna Ravichandran, vice president, DevOps product and solutions marketing...
21st International Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Me...
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
SYS-CON Events announced today that Enzu will exhibit at SYS-CON's 21st Int\ernational Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Enzu’s mission is to be the leading provider of enterprise cloud solutions worldwide. Enzu enables online businesses to use its IT infrastructure to their competitive advantage. By offering a suite of proven hosting and management services, Enzu wants companies to focus on the core of their ...
DevOps at Cloud Expo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to w...
In 2014, Amazon announced a new form of compute called Lambda. We didn't know it at the time, but this represented a fundamental shift in what we expect from cloud computing. Now, all of the major cloud computing vendors want to take part in this disruptive technology. In his session at 20th Cloud Expo, Doug Vanderweide, an instructor at Linux Academy, discussed why major players like AWS, Microsoft Azure, IBM Bluemix, and Google Cloud Platform are all trying to sidestep VMs and containers wit...
With major technology companies and startups seriously embracing Cloud strategies, now is the perfect time to attend 21st Cloud Expo October 31 - November 2, 2017, at the Santa Clara Convention Center, CA, and June 12-14, 2018, at the Javits Center in New York City, NY, and learn what is going on, contribute to the discussions, and ensure that your enterprise is on the right path to Digital Transformation.
Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 21st Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal and enterprise IT since the creation of the Worldwide Web more than 20 years ago. All major researchers estimate there will be tens of billions devic...
"Loom is applying artificial intelligence and machine learning into the entire log analysis process, from start to finish and at the end you will get a human touch,” explained Sabo Taylor Diab, Vice President, Marketing at Loom Systems, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Amazon started as an online bookseller 20 years ago. Since then, it has evolved into a technology juggernaut that has disrupted multiple markets and industries and touches many aspects of our lives. It is a relentless technology and business model innovator driving disruption throughout numerous ecosystems. Amazon’s AWS revenues alone are approaching $16B a year making it one of the largest IT companies in the world. With dominant offerings in Cloud, IoT, eCommerce, Big Data, AI, Digital Assista...
The taxi industry never saw Uber coming. Startups are a threat to incumbents like never before, and a major enabler for startups is that they are instantly “cloud ready.” If innovation moves at the pace of IT, then your company is in trouble. Why? Because your data center will not keep up with frenetic pace AWS, Microsoft and Google are rolling out new capabilities. In his session at 20th Cloud Expo, Don Browning, VP of Cloud Architecture at Turner, posited that disruption is inevitable for comp...
SYS-CON Events announced today that Cloud Academy named "Bronze Sponsor" of 21st International Cloud Expo which will take place October 31 - November 2, 2017 at the Santa Clara Convention Center in Santa Clara, CA. Cloud Academy is the industry’s most innovative, vendor-neutral cloud technology training platform. Cloud Academy provides continuous learning solutions for individuals and enterprise teams for Amazon Web Services, Microsoft Azure, Google Cloud Platform, and the most popular cloud com...