
Security News
Meet Socket at Black Hat Europe and BSides London 2025
Socket is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.
@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.
The npm package @aws-solutions-constructs/aws-cloudfront-s3 receives a total of 9,767 weekly downloads. As such, @aws-solutions-constructs/aws-cloudfront-s3 popularity was classified as popular.
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 is heading to London! Stop by our booth or schedule a meeting to see what we've been working on.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.