Skip to content

Commit 80f3c34

Browse files
authored
chore(release): 2.79.0 (#1272)
* Update README.md * Correct the case * feat(aws-cloudfront-oai-s3): new construct (#1271) * Seed the repo so I can revert * First draft * Exclude snapshot * More granular * Sycn * Rest of the integration tests * cfn_guard fix * Update HttpOrigin warning * Reset versions to 0.0.0 * Final self review * Rename integration tests * tweaks * Update architecture * chore(release): 2.79.0 * chore(changelog): Updated CHANGELOG.md --------- Co-authored-by: biffgaut <[email protected]> Co-authored-by: biffgaut <[email protected]>
2 parents c20e3a6 + 804e1ea commit 80f3c34

File tree

139 files changed

+23839
-90
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+23839
-90
lines changed

.viperlightignore

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-depl
9292
source/patterns/@aws-solutions-constructs/aws-route53-alb/test/integ.r53alb-deployPublicApiNewAlb.js.snapshot/tree.json:269
9393
# compressed test web site
9494
source/use_cases/aws-s3-static-website/test/integ.basic-deployment.js.snapshot/asset.eafa2d6c6a55bda16b1603003f1721e2f66a024c0c31d6665ee1c5ff59b565d9.zip
95+
# Snapshots from cloudfront-oai-s3
96+
source/patterns/@aws-solutions-constructs/aws-cloudfront-oai-s3/test/integ.cfts3-bucket-encrypted-with-managed-key-provided-as-existingbucket.js.snapshot/asset.1c5a2ab1d1e53b0672a644454aab3dbb258ccd0079c92ad0e23b95b2c2079f70.zip
9597

9698
deployment/v2/parse-raw-license-data.js:73
9799
deployment/v2/parse-raw-license-data.js:78

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [2.79.0](https://github.com/awslabs/aws-solutions-constructs/compare/v2.78.1...v2.79.0) (2025-03-18)
6+
7+
Build on CDK v2.177.0
8+
9+
### Features
10+
11+
* **aws-cloudfront-oai-s3:** new construct ([#1271](https://github.com/awslabs/aws-solutions-constructs/issues/1271)) ([0bd918e](https://github.com/awslabs/aws-solutions-constructs/commit/0bd918ee1cff35a385d30b2fd5ca32b69006ff07))
12+
513
## [2.78.1](https://github.com/awslabs/aws-solutions-constructs/compare/v2.78.0...v2.78.1) (2025-03-11)
614

715
Build on CDK v2.177.0

THIRD_PARTY_LICENSE.txt

+20-16
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ Apache-2.0: @humanwhocodes/[email protected]
8383
Apache-2.0: @hutson/[email protected]
8484
Apache-2.0: @jsii/[email protected]
8585
Apache-2.0: @jsii/[email protected]
86-
Apache-2.0: @jsii/[email protected]
86+
Apache-2.0: @jsii/[email protected]
87+
Apache-2.0: @jsii/[email protected]
8788
Apache-2.0: @sigstore/[email protected]
8889
Apache-2.0: @sigstore/[email protected]
8990
Apache-2.0: @sigstore/[email protected]
@@ -146,7 +147,7 @@ Apache-2.0: @smithy/[email protected]
146147
Apache-2.0: [email protected]
147148
Apache-2.0: [email protected]
148149
Apache-2.0: [email protected]
149-
Apache-2.0: codemaker@1.108.0
150+
Apache-2.0: codemaker@1.109.0
150151
Apache-2.0: [email protected]
151152
Apache-2.0: [email protected]
152153
Apache-2.0: [email protected]
@@ -157,12 +158,12 @@ Apache-2.0: [email protected]
157158
Apache-2.0: [email protected]
158159
Apache-2.0: [email protected]
159160
Apache-2.0: [email protected]
160-
Apache-2.0: jsii-pacmak@1.108.0
161-
Apache-2.0: jsii-reflect@1.108.0
161+
Apache-2.0: jsii-pacmak@1.109.0
162+
Apache-2.0: jsii-reflect@1.109.0
162163
Apache-2.0: [email protected]
163164
Apache-2.0: [email protected]
164165
Apache-2.0: [email protected]
165-
Apache-2.0: oo-ascii-tree@1.108.0
166+
Apache-2.0: oo-ascii-tree@1.109.0
166167
Apache-2.0: [email protected]
167168
Apache-2.0: [email protected]
168169
Apache-2.0: [email protected]
@@ -179,17 +180,17 @@ License: MIT
179180
*******************
180181
MIT: @babel/[email protected]
181182
MIT: @babel/[email protected]
182-
MIT: @babel/[email protected].9
183-
MIT: @babel/[email protected].9
183+
MIT: @babel/[email protected].10
184+
MIT: @babel/[email protected].10
184185
MIT: @babel/[email protected]
185186
MIT: @babel/[email protected]
186187
MIT: @babel/[email protected]
187188
MIT: @babel/[email protected]
188189
MIT: @babel/[email protected]
189190
MIT: @babel/[email protected]
190191
MIT: @babel/[email protected]
191-
MIT: @babel/[email protected].9
192-
MIT: @babel/[email protected].9
192+
MIT: @babel/[email protected].10
193+
MIT: @babel/[email protected].10
193194
MIT: @babel/[email protected]
194195
MIT: @babel/[email protected]
195196
MIT: @babel/[email protected]
@@ -207,13 +208,13 @@ MIT: @babel/[email protected]
207208
MIT: @babel/[email protected]
208209
MIT: @babel/[email protected]
209210
MIT: @babel/[email protected]
210-
MIT: @babel/[email protected].9
211-
MIT: @babel/[email protected].9
211+
MIT: @babel/[email protected].10
212+
MIT: @babel/[email protected].10
212213
213214
MIT: @emnapi/[email protected]
214215
MIT: @emnapi/[email protected]
215216
MIT: @emnapi/[email protected]
216-
MIT: @eslint-community/[email protected].0
217+
MIT: @eslint-community/[email protected].1
217218
MIT: @eslint-community/[email protected]
218219
MIT: @eslint/[email protected]
219220
MIT: @eslint/[email protected]
@@ -243,7 +244,9 @@ MIT: @nodelib/[email protected]
243244
244245
245246
247+
246248
249+
247250
MIT: @octokit/[email protected]
248251
MIT: @octokit/[email protected]
249252
MIT: @octokit/[email protected]
@@ -341,7 +344,7 @@ MIT: [email protected]
341344
342345
343346
344-
347+
345348
346349
347350
@@ -490,6 +493,7 @@ MIT: [email protected]
490493
491494
492495
496+
493497
494498
495499
@@ -934,7 +938,7 @@ ISC: [email protected]
934938
935939
936940
937-
941+
938942
939943
940944
@@ -1122,7 +1126,7 @@ Python-2.0: [email protected]
11221126
*******************
11231127
License: CC-BY-4.0
11241128
*******************
1125-
CC-BY-4.0: [email protected].30001703
1129+
CC-BY-4.0: [email protected].30001704
11261130

11271131
*******************
11281132
License: (MIT OR GPL-3.0-or-later)
@@ -1166,7 +1170,7 @@ License: (MIT OR CC0-1.0)
11661170
(MIT OR CC0-1.0): [email protected]
11671171
(MIT OR CC0-1.0): [email protected]
11681172

1169-
Total libraries: 1083
1173+
Total libraries: 1087
11701174

11711175
*******************
11721176
Specific Blue Oak License attributions

source/lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
"patterns/@aws-solutions-constructs/*"
66
],
77
"rejectCycles": "true",
8-
"version": "2.78.1"
8+
"version": "2.79.0"
99
}

source/patterns/@aws-solutions-constructs/aws-alb-lambda/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ certificate = acm.Certificate.from_certificate_arn(
8585
# MyStack(app, 'id', env=cdk.Environment(account='123456789012', region='us-east-1'))
8686
AlbToLambda(self, 'new-construct',
8787
lambda_function_props=_lambda.FunctionProps(
88-
runtime=_lambda.Runtime.Python_3_11,
88+
runtime=_lambda.Runtime.PYTHON_3_11,
8989
code=_lambda.Code.from_asset('lambda'),
9090
handler='index.handler',
9191
),

source/patterns/@aws-solutions-constructs/aws-apigateway-lambda/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ from constructs import Construct
5151

5252
ApiGatewayToLambda(self, 'ApiGatewayToLambdaPattern',
5353
lambda_function_props=_lambda.FunctionProps(
54-
runtime=_lambda.Runtime.Python_3_11,
54+
runtime=_lambda.Runtime.PYTHON_3_11,
5555
handler='index.handler',
5656
code=_lambda.Code.from_asset('lambda')
5757
)
@@ -118,4 +118,4 @@ Out of the box implementation of the Construct without any override will set the
118118
![Architecture Diagram](architecture.png)
119119

120120
***
121-
&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
121+
&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway-lambda/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ from constructs import Construct
5757
CloudFrontToApiGatewayToLambda(
5858
self, 'CloudFrontApiGatewayToLambda',
5959
lambda_function_props=_lambda.FunctionProps(
60-
runtime=_lambda.Runtime.Python_3_11,
60+
runtime=_lambda.Runtime.PYTHON_3_11,
6161
code=_lambda.Code.from_asset('lambda'),
6262
handler='hello.handler',
6363
),

source/patterns/@aws-solutions-constructs/aws-cloudfront-apigateway/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ from constructs import Construct
6969
lambda_function = _lambda.Function(self, 'LambdaFunction',
7070
code=_lambda.Code.from_asset(
7171
'lambda'),
72-
runtime=_lambda.Runtime.Python_3_11,
72+
runtime=_lambda.Runtime.PYTHON_3_11,
7373
handler='index.handler')
7474

7575
api_gateway = api.LambdaRestApi(self, 'LambdaRestApi',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
lib/*.js
2+
test/*.js
3+
!test/lambda/*
4+
*.js.map
5+
*.d.ts
6+
node_modules
7+
*.generated.ts
8+
dist
9+
.jsii
10+
11+
.LAST_BUILD
12+
.nyc_output
13+
coverage
14+
.nycrc
15+
.LAST_PACKAGE
16+
*.snk
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Exclude typescript source and config
2+
*.ts
3+
tsconfig.json
4+
coverage
5+
.nyc_output
6+
*.tgz
7+
*.snk
8+
*.tsbuildinfo
9+
10+
# Include javascript files and typescript declarations
11+
!*.js
12+
!*.d.ts
13+
14+
# Exclude jsii outdir
15+
dist
16+
17+
# Include .jsii
18+
!.jsii
19+
20+
# Include .jsii
21+
!.jsii
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# aws-cloudfront-oai-s3 module
2+
<!--BEGIN STABILITY BANNER-->
3+
4+
---
5+
6+
![Stability: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge)
7+
8+
---
9+
<!--END STABILITY BANNER-->
10+
11+
| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
12+
|:-------------|:-------------|
13+
<div style="height:8px"></div>
14+
15+
| **Language** | **Package** |
16+
|:-------------|-----------------|
17+
|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_cloudfront_oai_s3`|
18+
|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-cloudfront-oai-s3`|
19+
|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.cloudfrontoais3`|
20+
21+
## Overview
22+
This AWS Solutions Construct provisions an Amazon CloudFront Distribution that serves objects from an AWS S3 Bucket via an Origin Access Identity (OAI).
23+
24+
IMPORTANT: The recommended architecture for this pattern is to use an Origin Access Control, which is available in aws-cloudfront-s3. This construct is provided to support China regions where Origin Access Controls are not available.
25+
26+
Here is a minimal deployable pattern definition:
27+
28+
Typescript
29+
``` typescript
30+
import { Construct } from 'constructs';
31+
import { Stack, StackProps } from 'aws-cdk-lib';
32+
import { CloudFrontToOaiToS3 } from '@aws-solutions-constructs/aws-cloudfront-oai-s3';
33+
34+
new CloudFrontToOaiToS3(this, 'test-cloudfront-oai-s3', {});
35+
```
36+
37+
Python
38+
``` python
39+
from aws_solutions_constructs.aws_cloudfront_oai_s3 import CloudFrontToOaiToS3
40+
from aws_cdk import Stack
41+
from constructs import Construct
42+
43+
CloudFrontToOaiToS3(self, 'test-cloudfront-oai-s3')
44+
```
45+
46+
Java
47+
``` java
48+
import software.constructs.Construct;
49+
50+
import software.amazon.awscdk.Stack;
51+
import software.amazon.awscdk.StackProps;
52+
import software.amazon.awsconstructs.services.cloudfrontoais3.*;
53+
54+
new CloudFrontToOaiToS3(this, "test-cloudfront-oai-s3", new CloudFrontToOaiToS3Props.Builder()
55+
.build());
56+
```
57+
58+
## Pattern Construct Props
59+
60+
| **Name** | **Type** | **Description** |
61+
|:-------------|:----------------|-----------------|
62+
|cloudFrontDistributionProps?|[`cloudfront.DistributionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.DistributionProps.html)|Optional user provided props to override the default props for CloudFront Distribution|
63+
|insertHttpSecurityHeaders?|`boolean`|Optional user provided props to turn on/off the automatic injection of best practice HTTP security headers in all responses from CloudFront|
64+
|responseHeadersPolicyProps? | [`cloudfront.ResponseHeadersPolicyProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.ResponseHeadersPolicyProps.html) | Optional user provided configuration that cloudfront applies to all http responses.|
65+
|originPath?|`string`|Optional user provided props to provide an[originPath](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront_origins.S3OriginProps.html#originpath) that CloudFront appends to the origin domain name when CloudFront requests content from the origin. The string should start with a `/`, for example: `/production`. Default value is `'/'`|
66+
|existingBucketObj?|[`s3.IBucket`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html)|Existing instance of S3 content bucket object or interface. If this is provided, then also providing bucketProps will cause an error. |
67+
|bucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketProps.html)|Optional user provided props to override the default props for the S3 content bucket. Note - to log S3 access for this bucket to an existing S3 bucket, put the existing log bucket in bucketProps: `serverAccessLogsBucket`|
68+
|logS3AccessLogs?| boolean|Whether to turn on Access Logging for the S3 bucket. Creates an S3 bucket with associated storage costs for the logs. Enabling Access Logging is a best practice. default - true|
69+
|loggingBucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketProps.html)|Optional user provided props to override the default props for the S3 Logging Bucket.|
70+
|cloudFrontLoggingBucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketProps.html)|Optional user provided props to override the default props for the CloudFront Logging Bucket. Note: to use an existing bucketto hold CloudFront logs, pass the existing log bucket in |
71+
|logCloudFrontAccessLog|`boolean`|Optional - Whether to maintain access logs for the CloudFront Logging bucket. Specifying false for this while providing info about the log bucket will cause an error. Default = true |
72+
|cloudFrontLoggingBucketAccessLogBucketProps|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.BucketProps.html)|Optional user provided props to override the default props for the CloudFront Log Bucket Access Log bucket. Providing both this and `existingcloudFrontLoggingBucketAccessLogBucket` will cause an error. To provide an existing bucket to accept these logs, pass the existing bucket in `cloudFrontLoggingBucketProps::serverAccessLogBucket`|
73+
74+
## Pattern Properties
75+
76+
| **Name** | **Type** | **Description** |
77+
|:-------------|:----------------|-----------------|
78+
|cloudFrontWebDistribution|[`cloudfront.Distribution`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.Distribution.html)|Returns an instance of cloudfront.Distribution created by the construct.|
79+
|cloudFrontFunction?|[`cloudfront.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.Function.html)|Returns an instance of the Cloudfront function created by the construct.|
80+
|s3BucketInterface|[`s3.IBucket`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html)|Returns an instance of s3.IBucket created by the construct.|
81+
|s3Bucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct. IMPORTANT: If `existingBucketObj` was provided in Pattern Construct Props, this property will be `undefined`|
82+
|s3LoggingBucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.Bucket.html)|Returns an instance of s3.Bucket created by the construct as the logging bucket for the primary bucket.|
83+
|cloudFrontLoggingBucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.Bucket.html)|The S3 bucket created by the construct to hold CloudFront logs. Only populated if the construct creates the bucket (not if an existing bucket is passed in via DistributionProps)|
84+
|cloudFrontLoggingBucketAccessLogBucket?|[`s3.Bucket`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.Bucket.html)|The S3 bucket containing the S3 access logs for the CloudFront log bucket. Only populated if the construct creates the bucket (not if the bucket is passed in via `cloudFrontLoggingBucketProps::serverAccessLogBucket`|
85+
86+
## Default settings
87+
88+
Out of the box implementation of the Construct without any override will set the following defaults:
89+
90+
### Amazon CloudFront
91+
* Configure Access logging for CloudFront Distribution
92+
* Enable automatic injection of best practice HTTP security headers in all responses from CloudFront Distribution
93+
* CloudFront originPath set to `'/'`
94+
* Create an Origin Access Identity to access S3 bucket
95+
96+
### Amazon S3 Bucket
97+
* Configure Access logging for S3 Bucket
98+
* Enable server-side encryption for S3 Bucket using AWS managed KMS Key
99+
* Enforce encryption of data in transit
100+
* Turn on the versioning for S3 Bucket
101+
* Block public access for S3 Bucket
102+
* Retain the S3 Bucket when deleting the CloudFormation stack
103+
* Applies Lifecycle rule to move noncurrent object versions to Glacier storage after 90 days
104+
105+
## Architecture
106+
![Architecture Diagram](architecture.png)
107+
108+
***
109+
&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"parallelRegions": [
3+
"us-east-1"
4+
],
5+
"disable-update-workflow": true,
6+
"update-on-failed": false
7+
}

0 commit comments

Comments
 (0)