Using Console
Using CLI
<distribution_id>
with the ID of the CloudFront distribution that you want to update.
config.json
and add the following code to it:
<ACM_certificate_ARN>
with the ARN of the ACM certificate that you want to use for HTTPS. Replace <origin_id>
with the ID of the CloudFront origin that you want to use for HTTPS. Replace <origin_domain_name>
with the domain name of the CloudFront origin that you want to use for HTTPS.
config.json
file and run the aws cloudfront update-distribution
command to update the CloudFront distribution to use HTTPS.
https://
.
Using Python
list_distributions()
method to get a list of all CloudFront distributions:update_distribution()
method:YOUR_DISTRIBUTION_ID
with the ID of the distribution you want to update.By following these steps, you can remediate the misconfiguration of CloudFront distributions not using HTTPS for secure delivery of web content in AWS using Python.