-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f64e335
commit 970fb8c
Showing
2 changed files
with
276 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
function distribution_create() { | ||
aws cloudfront create-distribution --distribution-config file://config/cloudfront/aws-cloudfront-distribution-config.json | ||
} | ||
|
||
"$@" |
269 changes: 269 additions & 0 deletions
269
bin/config/cloudfront/aws-cloudfront-distribution-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,269 @@ | ||
{ | ||
"ETag": "EJ6LDRXLT5NEK", | ||
"DistributionConfig": { | ||
"CallerReference": "408f8e39-c3ff-43b7-8007-ab30fa3b6ef6", | ||
"Aliases": { | ||
"Quantity": 1, | ||
"Items": [ | ||
"haasandmilan.com" | ||
] | ||
}, | ||
"DefaultRootObject": "index.html", | ||
"Origins": { | ||
"Quantity": 1, | ||
"Items": [ | ||
{ | ||
"Id": "aws-haasandmilan-com.s3.us-east-1.amazonaws.com", | ||
"DomainName": "aws-haasandmilan-com.s3.us-east-1.amazonaws.com", | ||
"OriginPath": "", | ||
"CustomHeaders": { | ||
"Quantity": 0 | ||
}, | ||
"S3OriginConfig": { | ||
"OriginAccessIdentity": "" | ||
}, | ||
"ConnectionAttempts": 3, | ||
"ConnectionTimeout": 10, | ||
"OriginShield": { | ||
"Enabled": false | ||
}, | ||
"OriginAccessControlId": "E14LHHTL5TEBOG" | ||
} | ||
] | ||
}, | ||
"OriginGroups": { | ||
"Quantity": 0 | ||
}, | ||
"DefaultCacheBehavior": { | ||
"TargetOriginId": "aws-haasandmilan-com.s3.us-east-1.amazonaws.com", | ||
"TrustedSigners": { | ||
"Enabled": false, | ||
"Quantity": 0 | ||
}, | ||
"TrustedKeyGroups": { | ||
"Enabled": false, | ||
"Quantity": 0 | ||
}, | ||
"ViewerProtocolPolicy": "redirect-to-https", | ||
"AllowedMethods": { | ||
"Quantity": 2, | ||
"Items": [ | ||
"HEAD", | ||
"GET" | ||
], | ||
"CachedMethods": { | ||
"Quantity": 2, | ||
"Items": [ | ||
"HEAD", | ||
"GET" | ||
] | ||
} | ||
}, | ||
"SmoothStreaming": false, | ||
"Compress": true, | ||
"LambdaFunctionAssociations": { | ||
"Quantity": 0 | ||
}, | ||
"FunctionAssociations": { | ||
"Quantity": 0 | ||
}, | ||
"FieldLevelEncryptionId": "", | ||
"CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", | ||
"ResponseHeadersPolicyId": "67f7725c-6f97-4210-82d7-5512b31e9d03" | ||
}, | ||
"CacheBehaviors": { | ||
"Quantity": 2, | ||
"Items": [ | ||
{ | ||
"PathPattern": "/*.php", | ||
"TargetOriginId": "aws-haasandmilan-com.s3.us-east-1.amazonaws.com", | ||
"TrustedSigners": { | ||
"Enabled": false, | ||
"Quantity": 0 | ||
}, | ||
"TrustedKeyGroups": { | ||
"Enabled": false, | ||
"Quantity": 0 | ||
}, | ||
"ViewerProtocolPolicy": "redirect-to-https", | ||
"AllowedMethods": { | ||
"Quantity": 2, | ||
"Items": [ | ||
"HEAD", | ||
"GET" | ||
], | ||
"CachedMethods": { | ||
"Quantity": 2, | ||
"Items": [ | ||
"HEAD", | ||
"GET" | ||
] | ||
} | ||
}, | ||
"SmoothStreaming": false, | ||
"Compress": true, | ||
"LambdaFunctionAssociations": { | ||
"Quantity": 1, | ||
"Items": [ | ||
{ | ||
"LambdaFunctionARN": "arn:aws:lambda:us-east-1:639518990921:function:viewer-requests:5", | ||
"EventType": "viewer-request", | ||
"IncludeBody": true | ||
} | ||
] | ||
}, | ||
"FunctionAssociations": { | ||
"Quantity": 0 | ||
}, | ||
"FieldLevelEncryptionId": "", | ||
"CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", | ||
"ResponseHeadersPolicyId": "67f7725c-6f97-4210-82d7-5512b31e9d03" | ||
}, | ||
{ | ||
"PathPattern": "/*.env*", | ||
"TargetOriginId": "aws-haasandmilan-com.s3.us-east-1.amazonaws.com", | ||
"TrustedSigners": { | ||
"Enabled": false, | ||
"Quantity": 0 | ||
}, | ||
"TrustedKeyGroups": { | ||
"Enabled": false, | ||
"Quantity": 0 | ||
}, | ||
"ViewerProtocolPolicy": "redirect-to-https", | ||
"AllowedMethods": { | ||
"Quantity": 2, | ||
"Items": [ | ||
"HEAD", | ||
"GET" | ||
], | ||
"CachedMethods": { | ||
"Quantity": 2, | ||
"Items": [ | ||
"HEAD", | ||
"GET" | ||
] | ||
} | ||
}, | ||
"SmoothStreaming": false, | ||
"Compress": true, | ||
"LambdaFunctionAssociations": { | ||
"Quantity": 1, | ||
"Items": [ | ||
{ | ||
"LambdaFunctionARN": "arn:aws:lambda:us-east-1:639518990921:function:viewer-requests:5", | ||
"EventType": "viewer-request", | ||
"IncludeBody": false | ||
} | ||
] | ||
}, | ||
"FunctionAssociations": { | ||
"Quantity": 0 | ||
}, | ||
"FieldLevelEncryptionId": "", | ||
"CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6", | ||
"ResponseHeadersPolicyId": "67f7725c-6f97-4210-82d7-5512b31e9d03" | ||
} | ||
] | ||
}, | ||
"CustomErrorResponses": { | ||
"Quantity": 11, | ||
"Items": [ | ||
{ | ||
"ErrorCode": 400, | ||
"ResponsePagePath": "/404.html", | ||
"ResponseCode": "404", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 403, | ||
"ResponsePagePath": "/404.html", | ||
"ResponseCode": "404", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 404, | ||
"ResponsePagePath": "/404.html", | ||
"ResponseCode": "404", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 405, | ||
"ResponsePagePath": "/404.html", | ||
"ResponseCode": "404", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 414, | ||
"ResponsePagePath": "/404.html", | ||
"ResponseCode": "404", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 416, | ||
"ResponsePagePath": "/404.html", | ||
"ResponseCode": "404", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 500, | ||
"ResponsePagePath": "/503.html", | ||
"ResponseCode": "503", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 501, | ||
"ResponsePagePath": "/503.html", | ||
"ResponseCode": "503", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 502, | ||
"ResponsePagePath": "/503.html", | ||
"ResponseCode": "503", | ||
"ErrorCachingMinTTL": 10 | ||
}, | ||
{ | ||
"ErrorCode": 503, | ||
"ResponsePagePath": "/503.html", | ||
"ResponseCode": "503", | ||
"ErrorCachingMinTTL": 60 | ||
}, | ||
{ | ||
"ErrorCode": 504, | ||
"ResponsePagePath": "/503.html", | ||
"ResponseCode": "503", | ||
"ErrorCachingMinTTL": 10 | ||
} | ||
] | ||
}, | ||
"Comment": "haasandmilan.com", | ||
"Logging": { | ||
"Enabled": true, | ||
"IncludeCookies": true, | ||
"Bucket": "aws-haasandmilan-com-cloudfront-logs.s3.amazonaws.com", | ||
"Prefix": "" | ||
}, | ||
"PriceClass": "PriceClass_100", | ||
"Enabled": true, | ||
"ViewerCertificate": { | ||
"CloudFrontDefaultCertificate": false, | ||
"ACMCertificateArn": "arn:aws:acm:us-east-1:639518990921:certificate/2ab337bd-6f59-4b66-84d6-7412718f90f9", | ||
"SSLSupportMethod": "sni-only", | ||
"MinimumProtocolVersion": "TLSv1.2_2021", | ||
"Certificate": "arn:aws:acm:us-east-1:639518990921:certificate/2ab337bd-6f59-4b66-84d6-7412718f90f9", | ||
"CertificateSource": "acm" | ||
}, | ||
"Restrictions": { | ||
"GeoRestriction": { | ||
"RestrictionType": "none", | ||
"Quantity": 0 | ||
} | ||
}, | ||
"WebACLId": "", | ||
"HttpVersion": "http2", | ||
"IsIPV6Enabled": true, | ||
"ContinuousDeploymentPolicyId": "", | ||
"Staging": false | ||
} | ||
} |