aws-cloudfront-apigateway
Language | Package |
---|---|
Python |
aws_solutions_constructs.aws_cloudfront_apigateway
|
Typescript |
@aws-solutions-constructs/aws-cloudfront-apigateway
|
Java |
software.amazon.awsconstructs.services.cloudfrontapigateway
|
Overview
This AWS Solutions Construct implements an AWS CloudFront fronting an Amazon API Gateway REST API.
Here is a minimal deployable pattern definition:
Pattern Construct Props
Name | Type | Description |
---|---|---|
existingApiGatewayObj |
api.RestApi
|
The regional API Gateway that will be fronted with the CloudFront |
cloudFrontDistributionProps? |
cloudfront.DistributionProps \| any
|
Optional user provided props to override the default props for CloudFront Distribution |
insertHttpSecurityHeaders? |
boolean
|
Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront |
responseHeadersPolicyProps? |
cloudfront.ResponseHeadersPolicyProps
|
Optional user provided configuration that cloudfront applies to all http responses. |
cloudFrontLoggingBucketProps? |
s3.BucketProps
|
Optional user provided props to override the default props for the CloudFront Logging Bucket. |
Pattern Properties
Name | Type | Description |
---|---|---|
cloudFrontWebDistribution |
cloudfront.Distribution
|
Returns an instance of cloudfront.Distribution created by the construct |
apiGateway |
api.RestApi
|
Returns an instance of the API Gateway REST API created by the pattern. |
cloudFrontFunction? |
cloudfront.Function
|
Returns an instance of the Cloudfront function created by the pattern. |
cloudFrontLoggingBucket |
s3.Bucket
|
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
To view the code for this pattern, create/view issues and pull requests, and more: | |
---|---|
|
@aws-solutions-constructs/aws-cloudfront-apigateway |