Amazon CloudFront,

For example, we often use S3 acceleration for website or object storage, as well as load balancing and some API calling applications.

Here we can select the created source according to the prompt, such as AWS S3 or enter the domain name. Remember, this domain name is not the domain name that we directly accelerate CDN, but the domain name that points to the server IP, which is a springboard. We need to resolve this domain name to the current server IP.

Enter the domain name, and check whether HTTP and HTTPS are supported by default.

Then we need to set the cache behavior, including automatic compression of objects, viewer policies, and allowed HTTP methods. By default, cache request policies are also provided.

Select nodes according to our project business. All nodes are recommended by default. If you have enabled WAF security, you can also select the policy to start. At the same time, if we use HTTPS, you can also select the associated certificate.
What should be noted here is that how do we bind our own domain names that really need CDNs?

The alternate domain name here is the domain name that we really need CDN. But if you really add or save, you will be prompted with an error.
To add an alternate domain name (CNAME) to a CloudFront distribution, you must attach a trusted certificate that validates your authorization to use the domain name. For more details, see: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate -domain-names-requirements
I need to verify the domain name ownership in the custom SSL certificate.

After the certificate is verified successfully, we can add the domain name. According to the prompt, we add CNAME resolution to verify the ownership of the current domain name, and can continue until the verification is completed.

Domain names can only be added after SSL authentication is passed, otherwise they will not pass.

If we need to enable a custom CDN, we need to add CNAME to resolve to the assigned domain name. The corresponding source domain name points to the IP address of the source server.
Of course, this is not enough. If we need to resolve to the website, we also need to configure it on the server side.
Cloudfront will request your server through port 443 and port 80, that is, https and http protocol. You must apply the domain name and source domain name to the CDN mentioned above in your server configuration. We need to add resolution to the domain name of the NGINX configuration site.
server { listen 80; server_ name 1.test.com 2.test.com; …… }
Similar.
In this way, our website can be accelerated through Amazon Cloud's CDN. Generally, foreign trade websites use it more frequently. about Amazon Cloud CDN Service: 1TB of monthly traffic is provided free of charge, and extra charges are required for excess traffic.
Recommended reading
Lao Zuo personally tested the process of applying for free Amazon Cloud AWS 12 month account qualification (verify and activate the complete tutorial)
Presumably, many of us have heard of Amazon ECS, database, cloud storage, and machine learning applications. However, because AWS Amazon ECS only provides English, we have some difficulties for many friends who need to buy it. We may have heard that Amazon AWS has the qualification to apply for free accounts, and it is generous in the industry [...]
Updated: 2022/7/18
read the whole passage
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge