- [Adam] Let's get started with the CloudFront demo. First step is I'm going to prepare my content. In this step, I'm going to upload my static content to an S3 bucket. In later steps, we will use this bucket as a CloudFront origin. Amazon S3 is a good choice for Amazon CloudFront origin that includes static content, such as images, videos, HTML pages, .css files, and .js files. The sample image we will use in this tutorial is an image called Jingles.jpg. The AWS Management Console is where we will begin in a new browser window. Type "S3" in the search box, and double-click to open the dashboard. Now that I am in the S3 dashboard, I'll click the Create bucket button. I'll enter a name for my bucket. It must be unique and all lowercase. I'll have the option to choose a Region to minimize latency, minimize cost, or address regulatory requirements based on my data. I'll select Next. On the Properties panel, there are a number of useful options for my S3 bucket, including versioning, server access logging, tags, object-level logging, and default encryption. I won't enable these features in this tutorial, so I'll click Next. On the Set permissions panel, I can set access control permissions for our bucket, but I won't enable these features for this tutorial, so I'll click Next. On the Review panel, I'll select Create bucket. I'll double-click on my bucket and select Upload. Then, add files and select the picture of my cat, Jingles. And, click Next. On the Set permissions tab, I will need to make my image publicly readable. By default, S3 objects are set to private. I'll change my Manage public permissions to grant access to this object. Select Next. On the Properties tab, I can set a storage class option. On the Set properties tab, I can set storage class, encryption, and metadata. I won't enable these features for this tutorial, so I'll click Next. And, select Upload. Step two will be entering the CloudFront console. Once my content is uploaded to Amazon S3, I can use the Amazon CloudFront console to deliver that content to end users all around the world. Let's get to it. Go back to the AWS Management Console. And then, I will type in CloudFront. Select. And, I'll select Create Distribution. Step three is going to be configuring a web distribution. A "web distribution" specifies configuration settings so that CloudFront knows which origin to get my content from when a user requests it. I've got a couple options here. I can use an Amazon S3 bucket, I can use HTTP servers, web servers, as an origin, as well. I will first choose my delivery option, my delivery method. A web distribution is used for static and dynamic content. Because Jingles.jpg is a static image, I'll select Get Started under the Web option. I will now configure my settings. In Origin Domain Name, I'll select the name of the S3 bucket I store Jingles.jpg in. I can leave the rest of the configuration settings with the default values for this tutorial. You can learn more about each configuration setting by clicking and hovering over the "i" next to each field, just as I have done here. Step four will be creating a distribution. Once I have configured my distribution, CloudFront will now create the distribution and propagate it throughout the CloudFront network for me. I'm going to scroll down and select Create Distribution. After this process is complete, the status column will change from In Progress to Deployed. By the way, if you do this at home, it might be a good idea to go ahead and grab a cup of coffee. Luckily, I have my friends in the studio who are quite adept at time travel. So on this video, step four goes very quickly for me. But for you, it can take up to 15 minutes. The domain name that CloudFront assigns to my distribution appears in my list of distribution. I will need to make note of this for the next step. Clicking on the Distribution ID field takes me to a page where I can see the full CloudFront domain under Domain Name. The next step is to test my link. After I create my web distribution, I can test it out by confirming that CloudFront gets my object from origin and returns it into my web browser. For this test, I will need the CloudFront domain name from step four and the image name I uploaded to the S3 bucket previously in step one. I'll open a text editor on my computer, and copy and paste the following HTML code. I'll replace the domain name with the domain name that CloudFront assigned my distribution. I'll replace object name with the name of my image file in the Amazon S3 bucket. In my case, it's Jingles.jpg. I'll save the text file as mycloudfronttest.html. I'll open my webpage in a browser to ensure that we can see my content. And there you have it, a cute cat. Step six is to disable my distribution. I can easily disable the distribution from the CloudFront console. In fact, it's a best practice to disable distributions that you are no longer using, so you don't keep getting charged for them. However, note that when a distribution is disabled, any website supported by that distribution will be down, and the content will no longer be accessible to the end users. I'll select the checkbox next to the distribution I created and click Disable. I'll be asked to confirm, and then I'll click Yes, Disable. That's it. How easy was that? Now, you can go and create your own low latency static site to serve up as many cute cat pictures as you can possibly handle. That's all for now. I'll see you in other topics.