{"id":254,"date":"2009-03-23T17:00:00","date_gmt":"2009-03-23T13:00:00","guid":{"rendered":"http:\/\/yohoho.msp360.com\/?p=254"},"modified":"2024-10-02T13:29:10","modified_gmt":"2024-10-02T09:29:10","slug":"how-to-host-media-files-on-amazon-s3-with-explorer-part-1","status":"publish","type":"post","link":"https:\/\/www.msp360.com\/resources\/blog\/how-to-host-media-files-on-amazon-s3-with-explorer-part-1\/","title":{"rendered":"How to Host Media Files on Amazon S3 Using MSP360 Explorer (Part 1)"},"content":{"rendered":"<p>In this post, we will discuss the advantages of storing media content of your website on <a href=\"http:\/\/aws.amazon.com\/s3\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Amazon S3<\/a> and how <a href=\"https:\/\/www.msp360.com\/explorer\/windows\/\">MSP360 Explorer<\/a> can help with this.<!--more--><\/p>\n<h2>Overview<\/h2>\n<p>One of the typical ways to improve the scalability of a high traffic website is to serve its contents from several web servers.<\/p>\n<p>For example, you may want to store your HTML files and dynamic script files at http:\/\/www.mysitecloudberry1.com\/ while multimedia content such as images, video and audio files at http:\/\/media.mysitecloudberry1.com\/<\/p>\n<p>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.<\/p>\n<p>Let\u2019s 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.<\/p>\n<p>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.<\/p>\n<h2>How to Get Amazon S3 Account and MSP360 Explorer<\/h2>\n<p>It takes just a couple of minutes to create your own Amazon S3 account. We have a corresponding blog post on this topic.<\/p>\n<p><span class=\"further-reading \">Further reading<\/span>\u00a0<a href=\"https:\/\/www.msp360.com\/resources\/blog\/how-to-sign-up-for-amazon-s3-service-and-connect-to-it\/\">How to Sign Up for Amazon S3 Service and Connect to It with MSP360 Explorer<\/a><\/p>\n<p>Click this link to download <a href=\"https:\/\/www.msp360.com\/explorer\/windows\/\">MSP360 Explorer S3 client<\/a>.<\/p>\n<h2>Copying Files<\/h2>\n<p>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 MSP360 Explorer freeware.<\/p>\n<h3>Creating a Bucket<\/h3>\n<p>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,\u00a0 this will help us to configure a CNAME for the bucket and you will learn more about it later. \u00a0Also, make sure the name of the bucket is in lowercase \u2013 this is a requirement if you want to serve files from your bucket.<\/p>\n<h3>Copying Files<\/h3>\n<p>Now you can copy files to your newly created bucket. Just select files on your local disk and click copy button on the toolbar.<\/p>\n<h2>Configuring Access Rights<\/h2>\n<p>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 right-clicking the bucket and choosing the ACL Settings button in the menu.<\/p>\n<p>ACL Editor will come up and you will have to grant \u201cAll Users\u201d Read access to the bucket. \u201cAll Users\u201d built-in group represents anonymous Internet users. \u00a0Make sure the checkbox \u201cApply for all subfolders and files\u201d is checked off as it will automatically propagate access rights to all files in the bucket and you won\u2019t have to set them up one by one.<\/p>\n<p>The ability to apply access rights to all objects in the bucket is one of the advantages of MSP360 Explorer over other tools.<\/p>\n<p>Another cool feature is that you don\u2019t have to care about access rights anymore - CloudBerry Explorer will apply bucket\u2019s ACL to any new files copied to the bucket.<\/p>\n<h2>Generating URL<\/h2>\n<p>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.<\/p>\n<p>your files URLs will look like the following<\/p>\n<p>MSP360 Explorer has an easy way to generate URLs for multiple files. Just select multiple files and click the \u201cWeb URL\u201d button on the toolbar.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-31657 aligncenter\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2009\/03\/2019-06-25_15-09-19.png\" alt=\"\" width=\"722\" height=\"121\" srcset=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2009\/03\/2019-06-25_15-09-19.png 722w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2009\/03\/2019-06-25_15-09-19-300x50.png 300w, https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2009\/03\/2019-06-25_15-09-19-624x105.png 624w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><\/p>\n<p>In the dialog box, you can see URLs for your files and you can click Copy to clipboard button to copy them and paste wherever you like.<\/p>\n<h2>Configuring CNAMEs<\/h2>\n<p>Would you like to be able to use a simpler link to your media files? Something like<\/p>\n<p>http:\/\/media.mysitecloudberry1.com\/verisign.bmp<\/p>\n<p>Is this 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 subdomain and refer it to another location. In our case, we will refer a domain to the Amazon S3 bucket.<\/p>\n<p>All you have to do is to configure appropriate CNAME in your hosting provider control panel. I use <a href=\"http:\/\/www.1and1.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">1&amp;1<\/a> but every hosting provider offers a way to create CNAMEs and you will just have to find out the details.<\/p>\n<p>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 the 1&amp;1 control panel:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/www.msp360.com\/resources\/wp-content\/uploads\/2009\/03\/image014.jpg\" alt=\"\" border=\"0\" \/><\/p>\n<p>It usually takes some time for DNS configuration to take effect, so the changes will not be available immediately.<\/p>\n<h3>Generating URLs with CNAME<\/h3>\n<p>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.\u00a0 You will see that all URLs will be automatically updated to include the CNAME.<\/p>\n<p>That\u2019s 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.<\/p>\n<h2>Automating Upload with PowerShell Command Line interface<\/h2>\n<p>If you are wondering how you can automate the process of copying the files to Amazon S3 you can check out <a href=\"https:\/\/www.msp360.com\/default.aspx?page=amazon-s3-powershell\">MSP360 Explorer PowerShell command-line interface<\/a>. It can automate most of the tasks available in MSP360 Explorer GUI.<\/p>\n<p>There is also an open-source C# library called Resourceful that you can use to automate data transfer to S3. Click this link to <a href=\"http:\/\/www.codeplex.com\/resourceful\">download the library<\/a>.<\/p>\n<p>There is a huge number of 3rd\u00a0party libraries for Amazon S3 available and those two are just examples.<\/p>\n<h2>Conclusion<\/h2>\n<p>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, <a href=\"https:\/\/www.msp360.com\/explorer\/windows\/\">MSP360 Explorer<\/a> can help copy files to S3 account, configure your files to be accessible by the web browser and automate the whole process.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this post, we will discuss the advantages of storing media content of your website on Amazon S3 and how MSP360 Explorer can help with this.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[877,898,882],"tags":[],"class_list":["post-254","post","type-post","status-publish","format-standard","hentry","category-blog-articles","category-msp360-explorer","category-msp360-news"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":2,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"predecessor-version":[{"id":58702,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/posts\/254\/revisions\/58702"}],"wp:attachment":[{"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msp360.com\/resources\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}