30
loading...
This website collects cookies to deliver better user experience
mkdir aws-cloudfront-configs && cd aws-cloudfront-configs
aws cloudfront get-distribution-config --id [ID-OF-YOUR-DISTRIBUTION] --output json > distributionConfigs.json
--profile
in the command.ETag
and DistributionConfig
and it's closing curly brackets. Following should be removed."ETag": "XXXXXXXXX",
"DistributionConfig": {
CallerReference
to a unique number.Aliases
data to reflect new site information. If you don't have any Alias for new site yet, remove the section. This part should be removed"Aliases": {
"Quantity": 1,
"Items": [
"oldDOmain"
]
},
DefaultCacheBehavior
, Origins
and CacheBehaviors
make sure to replace old domain with new oneViewerCertificate
with new certificate information if not remove the ViewerCertificate
section completely."ViewerCertificate": {
"ACMCertificateArn": "XXXX",
"SSLSupportMethod": "XXXX",
"MinimumProtocolVersion": "TLSv1.2_2019",
"Certificate": "XXXX",
"CertificateSource": "acm"
},
distributionConfigs.json
file, create a copy of it for example myNewSite.json
and run the following command.aws cloudfront create-distribution --distribution-config file://myNewSite.json
file://
before the filename. If you don't do that, get an error.30