Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Amazon CloudFront distributions example

Purpose

Shows how to use the AWS SDK for Python (Boto3) with Amazon CloudFront to list and update distributions.

CloudFront speeds up distribution of static and dynamic web content by delivering it through a worldwide network of edge locations that provide low latency and high performance.

Code examples

⚠ Important

  • As an AWS best practice, grant this code least privilege, or only the permissions required to perform a task. For more information, see Grant Least Privilege in the AWS Identity and Access Management User Guide.
  • This code has not been tested in all AWS Regions. Some AWS services are available only in specific Regions. For more information, see the AWS Region Table on the AWS website.
  • Running this code might result in charges to your AWS account.

Running the code

Prerequisites

Command

List distributions at a command prompt with the following command.

python list_distributions.py

Update the comment field in a distribution by running the following command and answering the prompts.

python update_distribution.py

Additional information


Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0