
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@aws-solutions-constructs/aws-cloudfront-s3
Advanced tools
CDK Constructs for AWS Cloudfront to AWS S3 integration.
All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
| Reference Documentation: | https://docs.aws.amazon.com/solutions/latest/constructs/ |
|---|
| Language | Package |
|---|---|
Python | aws_solutions_constructs.aws_cloudfront_s3 |
Typescript | @aws-solutions-constructs/aws-cloudfront-s3 |
Java | software.amazon.awsconstructs.services.cloudfronts3 |
This AWS Solutions Construct implements an AWS CloudFront fronting an AWS S3 Bucket.
Here is a minimal deployable pattern definition in Typescript:
import { CloudFrontToS3 } from '@aws-solutions-constructs/aws-cloudfront-s3';
new CloudFrontToS3(this, 'test-cloudfront-s3', {});
new CloudFrontToS3(scope: Construct, id: string, props: CloudFrontToS3Props);
Parameters
ConstructstringCloudFrontToS3Props| Name | Type | Description |
|---|---|---|
| existingBucketObj? | s3.Bucket | Existing instance of S3 Bucket object, if this is set then the bucketProps is ignored. |
| bucketProps? | s3.BucketProps | User provided props to override the default props for the S3 Bucket. |
| cloudFrontDistributionProps? | cloudfront.DistributionProps | 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 |
| Name | Type | Description |
|---|---|---|
| cloudFrontWebDistribution | cloudfront.CloudFrontWebDistribution | Returns an instance of cloudfront.CloudFrontWebDistribution created by the construct |
| edgeLambdaFunctionVersion | lambda.Version | Returns an instance of the edge Lambda function version created by the pattern. |
| cloudFrontLoggingBucket | s3.Bucket | Returns an instance of the logging bucket for CloudFront WebDistribution. |
| s3Bucket? | s3.Bucket | Returns an instance of s3.Bucket created by the construct. |
| s3LoggingBucket? | s3.Bucket | Returns an instance of s3.Bucket created by the construct as the logging bucket for the primary bucket. |
Out of the box implementation of the Construct without any override will set the following defaults:

© Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
FAQs
CDK Constructs for AWS Cloudfront to AWS S3 integration.
We found that @aws-solutions-constructs/aws-cloudfront-s3 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.