Outlining our plan
Setting up the infrastructure
The course is part of these learning paths
In this course, the expert CloudAcademy's Senior Devops Engineer, Antonio Angelino, will discuss how to set up a static website on the Cloud using only Amazon S3 to store the files, Amazon CloudFront for content delivery, Route 53 to associate a custom domain name to our website, and Amazon Glacier to set up an automatic backup strategy of the website's files on S3. It's an effective and low-cost solution that avoids the burden of configuring an EC2 instance with a webserver for a task that is very simple, but still needs good skills to be accomplished proficiently.
Who should follow this course
As a beginner-to-intermediate course, you are expected to have some experience with the basic concepts of website hosting. Also, you should have at least a small experience with the AWS services described in the course, namely S3, CloudFront, Route53 and Glacier. In any case, you should be able to understand the key concepts shown in this course even if you are a newcomer of the Amazon Cloud.
If you need to learn more about the AWS services cited here, please check our collection of AWS courses. Also, if you want to test your knowledge on the basic topics covered in this course, check out our AWS questions. You will learn more about every single services cited in this course.
If you have thoughts or suggestions for this course, please contact Cloud Academy at email@example.com.
CloudFront is the Amazon service that allows you to create a content delivery network, CDN, to increase the speed of static websites reducing connection latency. When a visitor requests a file from a CloudFront powered website, he's invisibly redirected to a copy of the file at the nearest edge location. It's possible to specify how long content should be cached, and when a visitor requests content that has been cached for longer than the expiration date, CloudFront checks the origin server to see if a new version of the content is available. If there is, CloudFront copies the new version to the edge location. In this manner, changes made to the original content are replicated out to edge locations as visitors request the content. It's possible to create a distribution with an Amazon S3 origin using the AWS management console. Open the Amazon CloudFront console and click create distribution. On the step one select delivery method page, accept the default selection web and then click continue. On step two in your origin domain name box enter the Amazon S3 static website hosting end point for your bucket.
You don't have to select the name of the bucket from the list. The origin ID value is automatically filled in for us. Leave origin protocol policy HTTP port and HTTPS port at their default settings. Leave the values under default cache behavior settings at their default settings.
Under distribution settings, leave price class set to use all edge locations, best performance. Set alternate domain names, cnames to the root domain in www subdomain. These values must be set in order to create A record aliases from the specified domain names to the CloudFront distribution.
Set default root object to index.html, this is the default page that the CloudFront distribution returns if the URL used to access the distribution does not contain a file name. Set logging to on. In bucket for logs, select the logging bucket and set log prefix to CDN/. The setting stores the logs generated by traffic to the CloudFront distribution to a folder CDN inside the log bucket. Leave cookie logging set to off, comment blank and distribution state set to enabled. Click create distribution. Amazon may take up to 15 minutes to create and deploy the CDN distribution. The distribution's current status is displayed in the console under status. When the distribution is deployed, it is possible to check the configuration by navigating to the domain name of the distribution in a web browser.
About the Author
Antonio is an IT Manager and a software and infrastructure Engineer with 15 years of experience in designing, implementing and deploying complex webapps.
He has a deep knowledge of the IEEE Software and Systems Engineering Standards and of several programming languages (Python, PHP, Java, Scala, JS).
Antonio has also been using and designing cloud infrastructures for five years, using both public and private cloud services (Amazon Web Services, Google Cloud Platform, Azure, Openstack and Vmware vSphere).
During his past working experiences, he designed and managed large web clusters, also developing a service orchestrator for providing automatic scaling, self-healing and a Disaster Recovery Strategy.
Antonio is currently the Labs Product Manager and a Senior DevOps Engineer at Cloud Academy; his main goal is providing the best learn-by-doing experience possible taking care of the Cloud Academy Labs platform.