AWS CLI创建Cloudfront发行版:--distribution-config [英] AWS CLI create cloudfront distribution: --distribution-config
本文介绍了AWS CLI创建Cloudfront发行版:--distribution-config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试使用AWS CLI进行Cloudfront分发时,需要一个参数--distribution-config
Trying a cloudfront distribution using the AWS CLI, one needs an argument --distribution-config
aws cloudfront create-distribution
aws: error: argument --distribution-config is required
我认为这是一个带有发布配置的json字符串,但是我找不到有关它的任何文档。
在哪里可以找到最小的工作示例?
I assume this is a json string with the configuration for the distribution, but I cannot find any documentation about it. Where can I find a minimal working example?
推荐答案
以下JSON对我有用。我用get-distribution-config来生成它。
The following JSON worked for me. I used get-distribution-config to generate it.
{
"Comment": "example json",
"CacheBehaviors": {
"Quantity": 0
},
"Logging": {
"Bucket": null,
"Prefix": null,
"Enabled": false,
"IncludeCookies": false
},
"Origins": {
"Items": [
{
"S3OriginConfig": {
"OriginAccessIdentity": null
},
"Id": "S3-origin",
"DomainName": "example.s3.amazonaws.com"
}
],
"Quantity": 1
},
"DefaultRootObject": null,
"PriceClass": "PriceClass_All",
"Enabled": false,
"DefaultCacheBehavior": {
"TrustedSigners": {
"Enabled": false,
"Quantity": 0
},
"TargetOriginId": "S3-origin",
"ViewerProtocolPolicy": "allow-all",
"ForwardedValues": {
"Headers": {
"Quantity": 0
},
"Cookies": {
"Forward": "none"
},
"QueryString": false
},
"SmoothStreaming": false,
"AllowedMethods": {
"Items": [
"GET",
"HEAD"
],
"Quantity": 2
},
"MinTTL": 0
},
"CallerReference": "example",
"ViewerCertificate": {
"CloudFrontDefaultCertificate": true
},
"CustomErrorResponses": {
"Quantity": 0
},
"Restrictions": {
"GeoRestriction": {
"RestrictionType": "none",
"Quantity": 0
}
},
"Aliases": {
"Quantity": 0
}
}
这篇关于AWS CLI创建Cloudfront发行版:--distribution-config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文