Open the CloudFront console and choose Create distribution.

On Get started:
fcj-chat-app.
On Specify origin, keep Amazon S3 as origin type.

Scroll down:

On Enable security:

Wait until Last modified shows a date instead of Deploying (about 5 minutes). Save the distribution ID and domain name in CloudShell:
echo 'export DIST_ID=<distribution-id>' >> ~/chat.env && source ~/chat.env
echo "export CF_DOMAIN=$(aws cloudfront get-distribution --id $DIST_ID --query Distribution.DomainName --output text)" >> ~/chat.env && source ~/chat.env
Open https://<distribution-domain>/chats.html in the browser.

Compare the two paths to the same file:
curl -s -o /dev/null -w 'CloudFront: %{http_code}\n' https://$CF_DOMAIN/chats.html
curl -s -o /dev/null -w 'S3 direct: %{http_code}\n' https://$BUCKET.s3.ap-northeast-1.amazonaws.com/chats.html
200, while the direct S3 URL returns 403. Only the distribution can read the bucket.