<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deployment on Robin Su</title><link>https://robinsujob.github.io/tags/deployment/</link><description>Recent content in Deployment on Robin Su</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 15 Nov 2023 00:00:00 +0800</lastBuildDate><atom:link href="https://robinsujob.github.io/tags/deployment/index.xml" rel="self" type="application/rss+xml"/><item><title>China CloudFront SSL Plugin Deployment Guide</title><link>https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/</link><pubDate>Wed, 15 Nov 2023 00:00:00 +0800</pubDate><guid>https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/</guid><description>&lt;img src="https://robinsujob.github.io/" alt="Featured image of post China CloudFront SSL Plugin Deployment Guide" /&gt;&lt;p&gt;This article applies to AWS China Region services. You will learn how to use Amazon CloudFront in the China Region to accelerate and distribute traffic from websites deployed on EC2, and use the &lt;a class="link" href="https://www.amazonaws.cn/getting-started/tutorials/create-ssl-with-cloudfront/" target="_blank" rel="noopener"
 &gt;China CloudFront SSL Plugin&lt;/a&gt; to deploy free SSL certificates to protect your site. The plugin helps you generate, renew, and download free SSL certificates in the AWS China Regions, with Amazon CloudFront integration and automatic certificate renewal. You can also refer to the EC2-CloudFront integration section for configuring CloudFront to distribute EC2 website traffic in AWS Global Regions.&lt;/p&gt;
&lt;h2 id="why-choose-amazon-cloudfront"&gt;Why Choose Amazon CloudFront?
&lt;/h2&gt;&lt;p&gt;Amazon CloudFront is a Content Delivery Network (CDN) service provided by AWS. Using a CDN reduces website load times, lowers bounce rates, and increases traffic and revenue, while also reducing the load on origin servers, improving website stability, security, availability, and reliability. Amazon CloudFront securely delivers data, videos, applications, and APIs to customers globally with low latency and high transfer speeds in a developer-friendly environment, and integrates seamlessly with Amazon S3, Elastic Load Balancer, Amazon EC2, and more.&lt;/p&gt;
&lt;p&gt;Amazon CloudFront not only accelerates your website and reduces origin server load, but also lowers the data transfer costs for traffic leaving your AWS-hosted website to the internet. For example, compared to EC2&amp;rsquo;s outbound data transfer costs, using Amazon CloudFront in the AWS China Regions can help you reduce outbound data transfer costs by at least 67%. For specific pricing, refer to the AWS China Region official website &lt;a class="link" href="https://www.amazonaws.cn/ec2/pricing/#Amazon_EC2_.E6.95.B0.E6.8D.AE.E4.BC.A0.E8.BE.93" target="_blank" rel="noopener"
 &gt;EC2 Data Transfer Pricing&lt;/a&gt; and &lt;a class="link" href="https://www.amazonaws.cn/cloudfront/pricing/#On-demand_Pricing" target="_blank" rel="noopener"
 &gt;CloudFront Data Transfer Pricing&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="considerations-for-using-cloudfront-in-china-regions"&gt;Considerations for Using CloudFront in China Regions
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;ICP Filing and Domain Registration:&lt;/strong&gt; According to relevant laws and regulations, if you need to host a website in mainland China, you must first complete ICP filing. Domains without ICP filing cannot serve web content. Please prepare an ICP-filed domain. Refer to the AWS China &lt;a class="link" href="https://www.amazonaws.cn/support/icp/" target="_blank" rel="noopener"
 &gt;ICP Filing Support Documentation&lt;/a&gt; for more details on obtaining the required ICP filing for your domain.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CloudFront Provided Domain:&lt;/strong&gt; CloudFront automatically assigns a &lt;code&gt;*.cloudfront.cn&lt;/code&gt; domain. However, due to ICP filing requirements, you cannot directly use this domain for website services in China. You must add an ICP-filed domain as an alternate domain name (also known as CNAME) to your CloudFront distribution, and then use the alternate domain name to access your website.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CloudFront SSL/TLS Certificate Integration:&lt;/strong&gt; Amazon CloudFront in the China Regions does not currently support &lt;a class="link" href="https://www.amazonaws.cn/certificate-manager/features/" target="_blank" rel="noopener"
 &gt;Amazon Certificate Manager&lt;/a&gt;. If you need to use SSL/TLS certificates with CloudFront, you can obtain them from third-party certificate authorities and &lt;a class="link" href="https://docs.amazonaws.cn/AmazonCloudFront/latest/DeveloperGuide/cnames-and-https-procedures.html#cnames-and-https-uploading-certificates" target="_blank" rel="noopener"
 &gt;import SSL/TLS certificates&lt;/a&gt;. You can also use the &lt;a class="link" href="https://www.amazonaws.cn/getting-started/tutorials/create-ssl-with-cloudfront/" target="_blank" rel="noopener"
 &gt;China CloudFront SSL Plugin&lt;/a&gt; to obtain free SSL/TLS certificates, which will be covered in detail in the &amp;ldquo;Deploy Free Certificates with China CloudFront SSL Plugin&amp;rdquo; section of this article.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Feature Differences Between China and Global Regions:&lt;/strong&gt; Amazon CloudFront in the China Regions does not currently support Lambda@Edge, Amazon WAF, and other features. See the &lt;a class="link" href="https://docs.amazonaws.cn/aws/latest/userguide/cloudfront.html#feature-diff" target="_blank" rel="noopener"
 &gt;documentation&lt;/a&gt; for more details.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites
&lt;/h2&gt;&lt;p&gt;To complete all sections of this article and get a consistent experience with AWS services, please ensure you meet the following prerequisites.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your AWS China Region account has completed ICP filing, with ports 80/443 open&lt;/li&gt;
&lt;li&gt;You have an ICP-filed domain&lt;/li&gt;
&lt;li&gt;Use &lt;a class="link" href="https://www.amazonaws.cn/route53/" target="_blank" rel="noopener"
 &gt;Amazon Route 53&lt;/a&gt; as your DNS service. If you haven&amp;rsquo;t migrated your DNS to Amazon Route 53 yet, see the &lt;a class="link" href="https://www.amazonaws.cn/getting-started/tutorials/migrate-domain-to-amazon-route53/" target="_blank" rel="noopener"
 &gt;reference documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="integrating-ec2-with-cloudfront"&gt;Integrating EC2 with CloudFront
&lt;/h2&gt;&lt;p&gt;In the following sections, you will launch an EC2 instance, set up a web server, integrate EC2 with CloudFront, and deploy a free SSL certificate using the China CloudFront SSL Plugin.&lt;/p&gt;
&lt;p&gt;You will also learn some tips for using EC2 and CloudFront, such as using Elastic IP to fix your EC2 public DNS hostname for CloudFront origins, or using AWS-managed prefix lists to enhance EC2 security.&lt;/p&gt;
&lt;p&gt;The deployment architecture is shown below:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Deployment Architecture" class="gallery-image" data-flex-basis="279px" data-flex-grow="116" height="1090" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/architecture.png" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/architecture_hu_7853b82d2810f37e.png 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/architecture.png 1268w" width="1268"&gt;&lt;/p&gt;
&lt;h3 id="create-ec2-and-install-web-server"&gt;Create EC2 and Install Web Server
&lt;/h3&gt;&lt;p&gt;In this section, you will create an EC2 instance with a web server, then bind an Elastic IP to fix the EC2 public DNS hostname.&lt;/p&gt;
&lt;h4 id="1-launch-ec2-instance"&gt;1. Launch EC2 Instance
&lt;/h4&gt;&lt;p&gt;You can launch an EC2 instance from the EC2 console.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Launch EC2 Instance" class="gallery-image" data-flex-basis="398px" data-flex-grow="166" height="1183" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/ec2-create.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/ec2-create_hu_4bad2cd2999e9a49.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/ec2-create_hu_524d8415a1264fef.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/ec2-create.jpg 1965w" width="1965"&gt;&lt;/p&gt;
&lt;p&gt;Name your instance, e.g., &amp;ldquo;web-server&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;You can keep the default AMI and instance type.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AMI: Amazon Linux 2023&lt;/li&gt;
&lt;li&gt;Instance type: micro&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="AMI and Instance Type" class="gallery-image" data-flex-basis="398px" data-flex-grow="166" height="1183" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-2.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-2_hu_4bad2cd2999e9a49.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-2_hu_524d8415a1264fef.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-2.jpg 1965w" width="1965"&gt;&lt;/p&gt;
&lt;p&gt;Under &amp;ldquo;Key pair&amp;rdquo;, select an existing key pair or create a new one for subsequent system administration.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Key Pair Settings" class="gallery-image" data-flex-basis="639px" data-flex-grow="266" height="651" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-3.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-3_hu_9f6ea6be1004f543.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-3_hu_cd1424e493dd60e4.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-3.jpg 1734w" width="1734"&gt;&lt;/p&gt;
&lt;p&gt;For network settings, ensure your EC2 instance is deployed in a public subnet, and check &amp;ldquo;Allow HTTP traffic from the internet&amp;rdquo; to make port 80 accessible from the internet.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Network Configuration" class="gallery-image" data-flex-basis="260px" data-flex-grow="108" height="1532" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-4.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-4_hu_6eb00b634c3b6715.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-4_hu_daaf7b7b2d61cf19.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-4.jpg 1663w" width="1663"&gt;&lt;/p&gt;
&lt;p&gt;Expand the &amp;ldquo;Advanced details&amp;rdquo; section at the bottom:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Advanced Details" class="gallery-image" data-flex-basis="592px" data-flex-grow="246" height="622" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-5.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-5_hu_b78cc41ef9237432.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-5.jpg 1536w" width="1536"&gt;&lt;/p&gt;
&lt;p&gt;At the bottom of the page under &amp;ldquo;User data&amp;rdquo;, paste the following script to install a web server on first boot. Then click &amp;ldquo;Launch instance&amp;rdquo; to start the instance.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="cp"&gt;#!/bin/bash
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yum install -y httpd
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl &lt;span class="nb"&gt;enable&lt;/span&gt; httpd
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;systemctl start httpd
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img alt="User Data" class="gallery-image" data-flex-basis="274px" data-flex-grow="114" height="1378" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-6.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-6_hu_7ced7558e6bc727.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-6.jpg 1576w" width="1576"&gt;&lt;/p&gt;
&lt;h4 id="2-create-elastic-ip-and-associate-with-ec2"&gt;2. Create Elastic IP and Associate with EC2
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="https://docs.amazonaws.cn/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html" target="_blank" rel="noopener"
 &gt;Elastic IP&lt;/a&gt; is a static IPv4 address designed for cloud computing. Using an Elastic IP ensures your EC2 instance&amp;rsquo;s public IP address and public DNS hostname remain unchanged. In this section, you will learn how to associate an Elastic IP with your EC2 instance and access your site using the EC2 instance&amp;rsquo;s public DNS hostname.&lt;/p&gt;
&lt;p&gt;Find Elastic IP under &amp;ldquo;Network &amp;amp; Security&amp;rdquo; in the EC2 console left menu.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Elastic IP Menu" class="gallery-image" data-flex-basis="1917px" data-flex-grow="799" height="201" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-7.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-7_hu_dcee5b048214ea12.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-7_hu_a09c30cd09c9bc23.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-7.jpg 1606w" width="1606"&gt;&lt;/p&gt;
&lt;p&gt;Click &amp;ldquo;Allocate Elastic IP address&amp;rdquo; in the upper right, then click &amp;ldquo;Allocate&amp;rdquo; to obtain an Elastic IP.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Allocate Elastic IP" class="gallery-image" data-flex-basis="542px" data-flex-grow="226" height="1058" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-8.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-8_hu_ef1e899f2d63465d.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-8_hu_77727674391f39a8.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-8.jpg 2392w" width="2392"&gt;&lt;/p&gt;
&lt;p&gt;Select your Elastic IP, click the &amp;ldquo;Actions&amp;rdquo; button in the upper right, and choose &amp;ldquo;Associate Elastic IP address&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Associate Elastic IP" class="gallery-image" data-flex-basis="423px" data-flex-grow="176" height="1375" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-9.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-9_hu_c73c28e244703e66.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-9_hu_db6574310cf99be4.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-9_hu_152a186740569800.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-9.jpg 2426w" width="2426"&gt;&lt;/p&gt;
&lt;p&gt;Select your previously created EC2 instance and click &amp;ldquo;Associate&amp;rdquo; to ensure the EC2 instance&amp;rsquo;s public IP address remains stable.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Select EC2 Instance" class="gallery-image" data-flex-basis="338px" data-flex-grow="141" height="1256" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-10.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-10_hu_bf400582c310b418.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-10_hu_d5b93b8eec98cf94.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-10.jpg 1772w" width="1772"&gt;&lt;/p&gt;
&lt;p&gt;Click the &amp;ldquo;Instances&amp;rdquo; menu on the left to return to the instance list, select your instance, and copy the public IPv4 DNS.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Copy Public DNS" class="gallery-image" data-flex-basis="856px" data-flex-grow="356" height="782" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-11.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-11_hu_e13e176090677f6.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-11_hu_2eacf8c682b2ccda.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-11_hu_1b2b525001061f85.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-11.jpg 2791w" width="2791"&gt;&lt;/p&gt;
&lt;p&gt;Access the public DNS hostname in your browser to verify the web server is installed. You can see the site is currently using port 80 without an SSL/TLS certificate.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Browser Verification" class="gallery-image" data-flex-basis="274px" data-flex-grow="114" height="1485" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-12.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-12_hu_4b723108790f6ed8.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-12_hu_da4cc718ccb5b425.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-12.jpg 1699w" width="1699"&gt;&lt;/p&gt;
&lt;p&gt;In the following sections, you will use this hostname as the CloudFront origin to divert website traffic from EC2 to Amazon CloudFront.&lt;/p&gt;
&lt;h3 id="create-cloudfront-distribution"&gt;Create CloudFront Distribution
&lt;/h3&gt;&lt;p&gt;In this section, you will create a CloudFront distribution and associate it with the previously deployed EC2 instance, routing traffic through CloudFront to accelerate content delivery.&lt;/p&gt;
&lt;h4 id="1-create-cloudfront-distribution-and-associate-ec2"&gt;1. Create CloudFront Distribution and Associate EC2
&lt;/h4&gt;&lt;p&gt;Next, you will quickly set up a CloudFront distribution. Go to the CloudFront console and create a distribution:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Create CloudFront Distribution" class="gallery-image" data-flex-basis="606px" data-flex-grow="252" height="1325" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-13.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-13_hu_a8367bef1aae0926.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-13_hu_4d508bb4a235ad8d.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-13_hu_5453637f6d5fbdeb.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-13.jpg 3351w" width="3351"&gt;&lt;/p&gt;
&lt;p&gt;On the CloudFront configuration page, you will see the basic configuration elements that a CloudFront distribution requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Origin&lt;/strong&gt; – The origin server, supporting multiple AWS services including but not limited to S3, EC2, ELB, API Gateway, as well as third-party origins&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cache Behavior&lt;/strong&gt; – Define caching behavior through path matching, enable transfer compression, allowed request methods, access control, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Settings&lt;/strong&gt; – Alternate domain names (CNAME), SSL certificate, default root object, logging, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the origin, use the EC2 public DNS (with Elastic IP) as the origin domain. Ensure the origin protocol is HTTP.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Origin Settings" class="gallery-image" data-flex-basis="414px" data-flex-grow="172" height="978" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-14.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-14_hu_c12930d6d67ea46.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-14_hu_8583eeaa9f5891e9.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-14.jpg 1690w" width="1690"&gt;&lt;/p&gt;
&lt;p&gt;For the default cache behavior, you can keep the default settings:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Cache Behavior Settings" class="gallery-image" data-flex-basis="711px" data-flex-grow="296" height="909" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-15.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-15_hu_12c7444888d92324.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-15_hu_65ebbbf0958e115e.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-15_hu_20aef0f435f57651.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-15.jpg 2694w" width="2694"&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Due to compliance requirements, the default CloudFront distribution domain in the Beijing/Ningxia regions cannot be accessed directly. You must complete domain ICP filing and set up CNAME DNS resolution before access is possible.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;In the settings section, enter your ICP-filed domain as the alternate domain name (CNAME):&lt;/p&gt;
&lt;p&gt;&lt;img alt="Alternate Domain Name Settings" class="gallery-image" data-flex-basis="286px" data-flex-grow="119" height="1438" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-16.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-16_hu_14196fd7b272dfcd.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-16_hu_94de9764e2460cf6.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-16.jpg 1716w" width="1716"&gt;&lt;/p&gt;
&lt;p&gt;After creation, wait for deployment to complete. Once deployed, check your alternate domain name — if the domain has passed ICP filing, you should see a &amp;ldquo;green checkmark&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="ICP Filing Green Checkmark" class="gallery-image" data-flex-basis="153px" data-flex-grow="63" height="1698" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-17.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-17_hu_acad7026d9b16373.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-17.jpg 1086w" width="1086"&gt;&lt;/p&gt;
&lt;p&gt;After deployment, go to Route 53 (or your DNS provider) to update the DNS configuration. Using Route 53 as an example, enter the corresponding domain&amp;rsquo;s hosted zone and create a new record.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Route 53 Create Record" class="gallery-image" data-flex-basis="405px" data-flex-grow="168" height="956" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-18.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-18_hu_970077f08855e81d.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-18_hu_995f1b9e1c60399.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-18.jpg 1615w" width="1615"&gt;&lt;/p&gt;
&lt;p&gt;Fill in the DNS record:&lt;/p&gt;
&lt;p&gt;&lt;img alt="DNS Record Configuration" class="gallery-image" data-flex-basis="693px" data-flex-grow="289" height="1085" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-19.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-19_hu_b37ebdfd46e25cb.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-19_hu_490015ade77f4a67.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-19_hu_d75cfeda12c8ce18.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-19.jpg 3136w" width="3136"&gt;&lt;/p&gt;
&lt;p&gt;After completing the DNS update, open your browser and access the ICP-filed domain:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Browser Access Domain" class="gallery-image" data-flex-basis="539px" data-flex-grow="224" height="1010" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-20.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-20_hu_36b565ec92948586.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-20_hu_58b3a2674e642329.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-20.jpg 2270w" width="2270"&gt;&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you encounter a 502 error, check whether EC2 has an SSL certificate installed or whether the origin port is correct. See the &lt;a class="link" href="https://docs.amazonaws.cn/AmazonCloudFront/latest/DeveloperGuide/http-502-bad-gateway.html" target="_blank" rel="noopener"
 &gt;documentation&lt;/a&gt;. If you encounter a 403 error, ensure you are accessing via the ICP-filed domain.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;h4 id="2-enhance-ec2-and-website-security"&gt;2. Enhance EC2 and Website Security
&lt;/h4&gt;&lt;p&gt;In this section, you will use &lt;a class="link" href="https://docs.amazonaws.cn/vpc/latest/userguide/working-with-aws-managed-prefix-lists.html#available-aws-managed-prefix-lists" target="_blank" rel="noopener"
 &gt;AWS-managed prefix lists&lt;/a&gt; to enhance EC2 security. You can use the Amazon CloudFront managed prefix list to restrict inbound HTTP/HTTPS traffic to only the IP addresses of CloudFront origin-facing servers.&lt;/p&gt;
&lt;p&gt;Select your instance, go to the EC2 security group, and edit the inbound rules: add an HTTP rule, enter &amp;ldquo;cloudfront&amp;rdquo; in the source field, select the &lt;code&gt;com.amazonaws.global.cloudfront.origin-facing&lt;/code&gt; prefix list, and remove the existing &lt;code&gt;0.0.0.0/0&lt;/code&gt; rule.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Security Group Prefix List Configuration" class="gallery-image" data-flex-basis="382px" data-flex-grow="159" height="1065" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-21.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-21_hu_f948369aa9eb93d9.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-21_hu_aa508796cb61f82d.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-21.jpg 1696w" width="1696"&gt;&lt;/p&gt;
&lt;p&gt;You can also associate SSL/TLS certificates with CloudFront to enhance website security. In the following section, you will deploy free SSL certificates using the China CloudFront SSL Plugin.&lt;/p&gt;
&lt;h2 id="deploy-free-certificates-with-china-cloudfront-ssl-plugin"&gt;Deploy Free Certificates with China CloudFront SSL Plugin
&lt;/h2&gt;&lt;p&gt;Before starting, please confirm once again that you are using Amazon Route 53 for DNS resolution. This section covers the deployment process only. For more details, see the &lt;a class="link" href="https://www.amazonaws.cn/getting-started/tutorials/create-ssl-with-cloudfront/?nc1=h_ls" target="_blank" rel="noopener"
 &gt;China CloudFront SSL Plugin&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="1-initialize-deployment"&gt;1. Initialize Deployment
&lt;/h3&gt;&lt;p&gt;Deploy via CloudFormation. Click the &lt;a class="link" href="https://console.amazonaws.cn/cloudformation/home?#/stacks/create/template?templateURL=https://aws-cn-getting-started.s3.cn-northwest-1.amazonaws.com.cn/china-cloudfront-ssl-plugin/ChinaCloudFrontSslPluginStack.json" target="_blank" rel="noopener"
 &gt;link&lt;/a&gt; to launch the stack in the CloudFormation console.&lt;/p&gt;
&lt;p&gt;&lt;img alt="CloudFormation Deployment" class="gallery-image" data-flex-basis="381px" data-flex-grow="158" height="898" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-22.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-22_hu_c48fc7de493a412d.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-22.jpg 1426w" width="1426"&gt;&lt;/p&gt;
&lt;h3 id="2-enter-deployment-parameters"&gt;2. Enter Deployment Parameters
&lt;/h3&gt;&lt;p&gt;Specify stack details with the following parameters:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stack Name:&lt;/strong&gt; Name your stack&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Email:&lt;/strong&gt; Enter your email for SNS email notifications (only one email supported)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Domain Name:&lt;/strong&gt; Enter the domain names for the SSL certificate. Supports wildcard domains and multiple domains (comma-separated)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SSL Renew Interval Days:&lt;/strong&gt; Enter the certificate renewal interval. Let&amp;rsquo;s Encrypt certificates are valid for 90 days; enter a number between 1 and 89. Recommended default: 80 days.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Stack Parameters" class="gallery-image" data-flex-basis="547px" data-flex-grow="228" height="1408" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-23.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-23_hu_df0d35d2e1320a42.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-23_hu_fb9028b1c9581b35.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-23_hu_98d013332fd98823.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-23.jpg 3211w" width="3211"&gt;&lt;/p&gt;
&lt;h3 id="3-confirm-deployment"&gt;3. Confirm Deployment
&lt;/h3&gt;&lt;p&gt;Review the deployment details on the current page, check the &amp;ldquo;I acknowledge&amp;rdquo; box at the bottom, and click &lt;strong&gt;Submit&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Confirm Deployment" class="gallery-image" data-flex-basis="540px" data-flex-grow="225" height="1500" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-24.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-24_hu_97040fb6988a5f8.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-24_hu_3530ff7150daad0c.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-24_hu_8c5bc23ad109306f.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-24.jpg 3378w" width="3378"&gt;&lt;/p&gt;
&lt;p&gt;After submission, you will see resources being created in the stack events tab. Wait approximately 3 minutes.&lt;/p&gt;
&lt;h3 id="4-subscribe-to-sns-notifications-promptly"&gt;4. Subscribe to SNS Notifications Promptly
&lt;/h3&gt;&lt;p&gt;During the stack deployment process, check your email promptly. You will receive an SNS subscription confirmation request from &lt;a class="link" href="mailto:no-reply@sns.amazonaws.com" &gt;no-reply@sns.amazonaws.com&lt;/a&gt;. Please click the confirmation link as soon as possible.&lt;/p&gt;
&lt;p&gt;&lt;img alt="SNS Subscription Email" class="gallery-image" data-flex-basis="753px" data-flex-grow="313" height="1579" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-25.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-25_hu_cdde9165045830e8.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-25_hu_bb88619825b58bb2.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-25_hu_f203472c7d3c1c50.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-25.jpg 4956w" width="4956"&gt;&lt;/p&gt;
&lt;p&gt;Successful subscription confirmation:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Subscription Successful" class="gallery-image" data-flex-basis="1331px" data-flex-grow="554" height="566" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-26.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-26_hu_745d769f4f147290.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-26_hu_af2c5877f6070985.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-26_hu_2b7bfecfa67898b.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-26.jpg 3140w" width="3140"&gt;&lt;/p&gt;
&lt;h3 id="5-check-stack-deployment-progress"&gt;5. Check Stack Deployment Progress
&lt;/h3&gt;&lt;p&gt;When the stack status changes to green &lt;code&gt;CREATE_COMPLETE&lt;/code&gt;, the deployment is finished.&lt;/p&gt;
&lt;p&gt;Check the &amp;ldquo;Outputs&amp;rdquo; tab for quick links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CloudfrontConsole:&lt;/strong&gt; Access the CloudFront console to quickly bind the issued certificate&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ManagementWebURL:&lt;/strong&gt; Access SwaggerUI to view or delete existing SSL certificates in IAM&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S3BucketURL:&lt;/strong&gt; Access the S3 console to download the issued SSL certificates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img alt="Stack Outputs" class="gallery-image" data-flex-basis="1089px" data-flex-grow="453" height="526" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-27.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-27_hu_e4a40fc578f3a1ff.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-27_hu_d7c6996c56f5d4b4.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-27.jpg 2387w" width="2387"&gt;&lt;/p&gt;
&lt;h3 id="6-bind-ssl-certificate-in-the-amazon-cloudfront-console"&gt;6. Bind SSL Certificate in the Amazon CloudFront Console
&lt;/h3&gt;&lt;p&gt;After stack deployment is complete, an SSL certificate will be automatically requested for your domain. If you have subscribed to the SNS topic, you will receive an email notification confirming the certificate has been issued. The certificate name consists of the stack name and expiry time, e.g., &lt;code&gt;Certbot-2023-11-14-1540&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="SSL Certificate Email Notification" class="gallery-image" data-flex-basis="532px" data-flex-grow="221" height="542" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-28.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-28_hu_eea6111e60dfb38a.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-28.jpg 1202w" width="1202"&gt;&lt;/p&gt;
&lt;p&gt;Open the CloudFront console, select your distribution, and find the option to edit alternate domain names and SSL certificate.&lt;/p&gt;
&lt;p&gt;&lt;img alt="CloudFront Edit Settings" class="gallery-image" data-flex-basis="551px" data-flex-grow="229" height="1403" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-29.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-29_hu_9832edb84636551.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-29_hu_e1912aa46e2c65d8.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-29_hu_ab611836b6a34937.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-29.jpg 3222w" width="3222"&gt;&lt;/p&gt;
&lt;p&gt;Select the corresponding SSL certificate from the custom SSL certificate dropdown, then save changes.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Select SSL Certificate" class="gallery-image" data-flex-basis="444px" data-flex-grow="185" height="1743" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-30.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-30_hu_5dae4bd224493381.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-30_hu_26ea4d3b5146beb3.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-30_hu_4517dfc367337036.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-30.jpg 3226w" width="3226"&gt;&lt;/p&gt;
&lt;p&gt;After deployment, you can access your CloudFront-accelerated site via HTTPS in the browser and verify the SSL certificate issued by Let&amp;rsquo;s Encrypt, valid for 90 days.&lt;/p&gt;
&lt;p&gt;&lt;img alt="HTTPS Access Verification" class="gallery-image" data-flex-basis="437px" data-flex-grow="182" height="1492" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-31.jpg" srcset="https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-31_hu_1eee86b177ad311b.jpg 800w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-31_hu_3c5134eb5ca760eb.jpg 1600w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-31_hu_532535a6568d9bb.jpg 2400w, https://robinsujob.github.io/p/cloudfront-ssl-plugin-deployment-guide/images/cloudfront-ssl-31.jpg 2720w" width="2720"&gt;&lt;/p&gt;
&lt;p&gt;For more information on using the China CloudFront SSL Plugin, see the &lt;a class="link" href="https://www.amazonaws.cn/getting-started/tutorials/create-ssl-with-cloudfront/?nc1=h_ls" target="_blank" rel="noopener"
 &gt;plugin documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="summary"&gt;Summary
&lt;/h2&gt;&lt;p&gt;Through this article, you have learned the basics of Amazon CloudFront and how to divert website traffic deployed on EC2 to CloudFront for acceleration and cost savings. You have also learned to use AWS-managed prefix lists in EC2 security groups to ensure your EC2 only accepts traffic originating from CloudFront, and to deploy free SSL certificates using the China CloudFront SSL Plugin to protect your site with HTTPS.&lt;/p&gt;
&lt;h2 id="references"&gt;References
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://www.amazonaws.cn/getting-started/tutorials/create-ssl-with-cloudfront/?nc1=h_ls" target="_blank" rel="noopener"
 &gt;China CloudFront SSL Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://docs.amazonaws.cn/AmazonCloudFront/latest/DeveloperGuide/Introduction.html" target="_blank" rel="noopener"
 &gt;Amazon CloudFront Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://docs.amazonaws.cn/aws/latest/userguide/cloudfront.html#feature-diff" target="_blank" rel="noopener"
 &gt;Amazon CloudFront China Region Differences&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.amazonaws.cn/getting-started/use-cases/cloudfront-network-acceleration/?nc1=h_ls" target="_blank" rel="noopener"
 &gt;Network Acceleration with Amazon CloudFront in China&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;strong&gt;Original Post:&lt;/strong&gt; &lt;a class="link" href="https://aws.amazon.com/cn/blogs/china/divert-website-access-traffic-from-ec2-to-amazon-cloudfront/" target="_blank" rel="noopener"
 &gt;Amazon CloudFront Deployment Mini-Guide (Part 8) - Deploy Free Certificates with China CloudFront and CloudFront SSL Plugin&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a class="link" href="https://github.com/aws-samples/China-CloudFront-SSL-Plugin" target="_blank" rel="noopener"
 &gt;aws-samples/China-CloudFront-SSL-Plugin&lt;/a&gt;&lt;/p&gt;

 &lt;/blockquote&gt;</description></item></channel></rss>