CmdID / aws / aws cloudfront
aws cloudfront get-distribution
Get the information about a distribution. AWS CLI reference
1 example 1 option Its page in the AWS CLI reference
Examples
To get a CloudFront distribution
The following get-distribution example gets the CloudFront distribution with the ID EDFDVBD6EXAMPLE, including its ETag. The distribution ID is returned in the create-distribution and list-distributions commands.
aws cloudfront get-distribution --id EDFDVBD6EXAMPLEIdentify--idThe distribution's ID.Its output, shortened
{
"ETag": "E2QWRUHEXAMPLE",
"Distribution": {
"Id": "EDFDVBD6EXAMPLE",
"ARN": "arn:aws:cloudfront::123456789012:distribution/EDFDVBD6EXAMPLE",
"Status": "Deployed",
"LastModifiedTime": "2019-12-04T23:35:41.433Z",
"InProgressInvalidationBatches": 0,
"DomainName": "d111111abcdef8.cloudfront.net",
"ActiveTrustedSigners": {
"Enabled": false,
"Quantity": 0
},
"DistributionConfig": {
"CallerReference": "cli-example",
"Aliases": {
"Quantity": 0
},
"DefaultRootObject": "index.html",
"Origins": {
"Quantity": 1,
"Items": [
{
"Id": "amzn-s3-demo-bucket.s3.amazonaws.com-cli-example",
"DomainName": "amzn-s3-demo-bucket.s3.amazonaws.com",
"OriginPath": "",
"CustomHeaders": {
"Quantity": 0
},
"S3OriginConfig": {
… 83 more linesFor more information, see Configure distributions in the Amazon CloudFront Developer Guide.
Options
--idThe distribution's ID.