AWS CLI commands

  1. Create a CloudFront distribution config JSON file. Specify a caller reference to uniquely reference our request, as follows:
{  "CallerReference": "qnatime-distribution-2019-01-12-07-45",

Specify the domains that will point to this CloudFront domain, as follows:

"Aliases": {  "Quantity": 2,  "Items": ["qnatime.net", "www.qnatime.net"]},

You can only add a CNAME or alias to your domain record for CloudFront domain if it is added as Aliases for that CloudFront domain.

Specify the default root object and the origin details, as follows:

"DefaultRootObject": "index.html","Origins": {  "Quantity": 1,  "Items": [    {      "Id": "my-origin",      "DomainName": "qnatime.com.s3.amazonaws.com",      "S3OriginConfig": {        "OriginAccessIdentity": ""      }    }

Get Serverless Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.