1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

デフォルトのCloudFront設定

1
Last updated at Posted at 2016-08-20

マネージメントコンソールからS3の静的webサイトホスティングのエンドポイント向けにCloudFrontを立ち上げたので、そのときの設定情報を取得してみた。

cloudfront_default.json
{
	ETag: '{CLOUDFRONT_DESTRIBUTION_ID}',
	DistributionConfig: {
		CallerReference: '1471603622154',
		Aliases: {
			Quantity: 0,
			Items: [] 
		},
		DefaultRootObject: '',
		Origins: {
			Quantity: 1,
			Items: [ {
				Id: 'Custom-{YOUR_BUCKET_NAME}.s3-website-{S3_REGION}.amazonaws.com/',
				DomainName: '{YOUR_BUCKET_NAME}.s3-website-{S3_REGION}.amazonaws.com',
				OriginPath: '/',
				CustomHeaders: {
					Quantity: 0,
					Items: []
				},
				CustomOriginConfig: {
					HTTPPort: 80,
					HTTPSPort: 443,
					OriginProtocolPolicy: 'http-only',
					OriginSslProtocols: {
						Quantity: 3,
						Items: [ 'TLSv1', 'TLSv1.1', 'TLSv1.2' ]
					} 
				}
			}]
		},
		DefaultCacheBehavior: {
			TargetOriginId: 'Custom-{YOUR_BUCKET_NAME}.s3-website-{S3_REGION}.amazonaws.com/',
			ForwardedValues: {
				QueryString: false,
				Cookies: { Forward: 'none' },
				Headers: { Quantity: 0, Items: [] }
			},
			TrustedSigners: { 
				Enabled: false, 
				Quantity: 0, 
				Items: [] 
			},
			ViewerProtocolPolicy: 'allow-all',
			MinTTL: 0,
			AllowedMethods: { Quantity: 2,
				Items: [ 'HEAD', 'GET' ],
				CachedMethods: {
					Quantity: 2,
					Items: [ 'HEAD', 'GET' ]
				} 
			},
			SmoothStreaming: false,
			DefaultTTL: 86400,
			MaxTTL: 31536000,
			Compress: false 
		},
		CacheBehaviors: { Quantity: 0, Items: [] },
		CustomErrorResponses: { Quantity: 0, Items: [] },
		Comment: '',
		Logging: {
			Enabled: false,
			IncludeCookies: false,
			Bucket: '',
			Prefix: ''
		},
		PriceClass: 'PriceClass_All',
		Enabled: true,
		ViewerCertificate:{
			CloudFrontDefaultCertificate: true,
			MinimumProtocolVersion: 'SSLv3',
			CertificateSource: 'cloudfront'
		},
		Restrictions: {
			GeoRestriction: {
				RestrictionType: 'none',
				Quantity: 0,
				Items: []
			}
		},
		WebACLId: ''
	}
}

AWS SDKとかCloudFormationで素のCloudFrontを立ち上げたいときの参考になればです。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?