aws-cloudfront-apigateway
| Reference Documentation: | https://docs.aws.amazon.com/solutions/latest/constructs/ |
| Language | Package |
|---|---|
|
|
|
|
|
|
|
|
|
Overview
This AWS Solutions Construct implements an AWS CloudFront fronting an Amazon API Gateway REST API.
Here is a minimal deployable pattern definition:
Example
Pattern Construct Props
| Name | Type | Description |
|---|---|---|
|
existingApiGatewayObj |
The regional API Gateway that will be fronted with the CloudFront |
|
|
cloudFrontDistributionProps? |
Optional user provided props to override the default props for CloudFront Distribution |
|
|
insertHttpSecurityHeaders? |
|
Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront |
|
responseHeadersPolicyProps? |
Optional user provided configuration that cloudfront applies to all http responses. |
|
|
cloudFrontLoggingBucketProps? |
Optional user provided props to override the default props for the CloudFront Logging Bucket. |
Pattern Properties
| Name | Type | Description |
|---|---|---|
|
cloudFrontWebDistribution |
Returns an instance of cloudfront.Distribution created by the construct |
|
|
apiGateway |
Returns an instance of the API Gateway REST API created by the pattern. |
|
|
cloudFrontFunction? |
Returns an instance of the Cloudfront function created by the pattern. |
|
|
cloudFrontLoggingBucket |
Returns an instance of the logging bucket for CloudFront Distribution. |
Default settings
Out of the box implementation of the Construct without any override will set the following defaults:
Amazon CloudFront
-
Configure Access logging for CloudFront Distribution
-
Enable automatic injection of best practice HTTP security headers in all responses from CloudFront Distribution
Amazon API Gateway
-
User provided API Gateway object is used as-is
-
Enable X-Ray Tracing
Architecture
Github
Go to the Github repo