1. Create CloudFront distribution
Create distribution
Go to AWS console - CloudFront - Distributions - Create distribution.
Select origin
Select an origin domain that I will use as a source.
Use OAC(origin access control) for access control and create a new OAC for this distribution. Then select it.

Origin can be S3, ELB or other endpoint.
Cache behavior
I almost used default options.

Compress objects automatically option is yes by default. The info says that the request need to have an accept-encoding header to use compression.
Selected viewer protocol policy at HTTPS only because the client will always be HTTPS, I think.
CachingOptimized is default and recommended for S3. I can configure detailed caching policy by creating one, but not now.
Cache policy

Check cache policy key settings.
Supported compressions are gzip and brotli.
Other settings
WAF: Do not enable
Price class: Use North America, Europe, Asia, Middle East, and Africa
Merely because of cost.
Creation
Click create distribution button. This takes some minutes.
Last updated