Skip to content

Commit 9eb915d

Browse files
authored
Merge pull request #334 from aws-solutions/feature/v2.4.1
Update to version v2.4.1
2 parents 2e3c924 + 1a8316b commit 9eb915d

File tree

45 files changed

+8780
-7223
lines changed

Some content is hidden

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

45 files changed

+8780
-7223
lines changed

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Typescript
22
source/*/*.js
3+
source/constructs/**/*.js
34
*.d.ts
4-
*.js
55
!.nightswatch/**/*.js
66
node_modules/
77

@@ -81,4 +81,7 @@ venv.bak/
8181
*.mmdb
8282

8383
#requirement files
84-
source/constructs/**/*requirement*.txt
84+
source/constructs/**/*requirement*.txt
85+
86+
#Build
87+
build

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.4.1] - 2025-07-29
9+
10+
### Security
11+
12+
- Updated form-data package to address [CVE-2025-7783](https://avd.aquasec.com/nvd/2025/cve-2025-7783/)
13+
- Updated urllib3 package to address [CVE-2025-50182](https://avd.aquasec.com/nvd/2025/cve-2025-50182/)
14+
- Updated requests package to address [CVE-2024-47081](https://avd.aquasec.com/nvd/2024/cve-2024-47081/)
15+
816
## [2.4.0] - 2025-05-22
917

10-
### Added
18+
### Added
1119

1220
- Anonymized operational metrics collection
1321

NOTICE.txt

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,6 +1737,46 @@ commonlib under the 0BSD license.
17371737
pyopenssl under the Apache-2.0 license.
17381738
wsgiref under the PSF or ZPL license(s).
17391739
yum-metadata-parser under the MIT license.
1740+
get-proto under the MIT license.
1741+
math-intrinsics under the MIT license.
1742+
is-inside-container under the MIT license.
1743+
default-browser under the MIT license.
1744+
bundle-name under the MIT license.
1745+
run-applescript under the MIT license.
1746+
default-browser-id under the MIT license.
1747+
is-network-error under the MIT license.
1748+
@jest/pattern under the MIT license.
1749+
@jest/get-type under the MIT license.
1750+
@jest/diff-sequences under the MIT license.
1751+
@jest/snapshot-utils under the MIT license.
1752+
unrs-resolver under the MIT license.
1753+
napi-postinstall under the MIT license.
1754+
@unrs/resolver-binding-freebsd-x64 under the MIT license.
1755+
@unrs/resolver-binding-win32-ia32-msvc under the MIT license.
1756+
@unrs/resolver-binding-win32-arm64-msvc under the MIT license.
1757+
@unrs/resolver-binding-linux-arm-musleabihf under the MIT license.
1758+
@unrs/resolver-binding-android-arm-eabi under the MIT license.
1759+
@unrs/resolver-binding-android-arm64 under the MIT license.
1760+
@unrs/resolver-binding-linux-s390x-gnu under the MIT license.
1761+
@unrs/resolver-binding-linux-riscv64-gnu under the MIT license.
1762+
@unrs/resolver-binding-linux-riscv64-musl under the MIT license.
1763+
@unrs/resolver-binding-linux-ppc64-gnu under the MIT license.
1764+
@unrs/resolver-binding-linux-arm-gnueabihf under the MIT license.
1765+
@unrs/resolver-binding-linux-x64-gnu under the MIT license.
1766+
@unrs/resolver-binding-darwin-x64 under the MIT license.
1767+
@unrs/resolver-binding-linux-arm64-musl under the MIT license.
1768+
@unrs/resolver-binding-wasm32-wasi under the MIT license.
1769+
@napi-rs/wasm-runtime under the MIT license.
1770+
@emnapi/core under the MIT license.
1771+
@emnapi/wasi-threads under the MIT license.
1772+
@emnapi/runtime under the MIT license.
1773+
@tybys/wasm-util under the MIT license.
1774+
@unrs/resolver-binding-darwin-arm64 under the MIT license.
1775+
@unrs/resolver-binding-win32-x64-msvc under the MIT license.
1776+
@unrs/resolver-binding-linux-arm64-gnu under the MIT license.
1777+
@unrs/resolver-binding-linux-x64-musl under the MIT license.
1778+
exit-x under the MIT license.
1779+
pygments under the 0BSD license.
17401780

17411781
********************
17421782
OPEN SOURCE LICENSES
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
4+
// Imports
5+
const fs = require('fs');
6+
const _regex = /[\w]*AssetParameters/g; //this regular express also takes into account lambda functions defined in nested stacks
7+
8+
// Paths
9+
const global_s3_assets = '../global-s3-assets';
10+
11+
// For each template in global_s3_assets ...
12+
fs.readdirSync(global_s3_assets).forEach(file => {
13+
14+
// Import and parse template file
15+
const raw_template = fs.readFileSync(`${global_s3_assets}/${file}`);
16+
let template = JSON.parse(raw_template);
17+
18+
// Clean-up Lambda function code dependencies
19+
const resources = (template.Resources) ? template.Resources : {};
20+
const lambdaFunctions = Object.keys(resources).filter(function (key) {
21+
return resources[key].Type === "AWS::Lambda::Function";
22+
});
23+
lambdaFunctions.forEach(function (f) {
24+
const fn = template.Resources[f];
25+
if (fn.Properties.Code.hasOwnProperty('S3Bucket')) {
26+
// Set the S3 key reference
27+
let s3Key = Object.assign(fn.Properties.Code.S3Key);
28+
// https://github.com/aws/aws-cdk/issues/10608
29+
if (!s3Key.endsWith('.zip')) {
30+
fn.Properties.Code.S3Key = `%%SOLUTION_NAME%%/%%VERSION%%/${s3Key}.zip`;
31+
} else {
32+
fn.Properties.Code.S3Key = `%%SOLUTION_NAME%%/%%VERSION%%/${s3Key}`;
33+
}
34+
// Set the S3 bucket reference
35+
fn.Properties.Code.S3Bucket = {
36+
'Fn::Sub': '%%BUCKET_NAME%%-${AWS::Region}'
37+
};
38+
}
39+
});
40+
41+
// Clean-up Lambda Layer code dependencies
42+
const lambdaLayers = Object.keys(resources).filter(function (key) {
43+
return resources[key].Type === "AWS::Lambda::LayerVersion";
44+
})
45+
lambdaLayers.forEach(function (l) {
46+
const layer = template.Resources[l];
47+
if (layer.Properties.Content.hasOwnProperty('S3Bucket')) {
48+
let s3Key = Object.assign(layer.Properties.Content.S3Key);
49+
layer.Properties.Content.S3Key = `%%SOLUTION_NAME%%/%%VERSION%%/${s3Key}`;
50+
layer.Properties.Content.S3Bucket = {
51+
'Fn::Sub': '%%BUCKET_NAME%%-${AWS::Region}'
52+
}
53+
}
54+
})
55+
56+
// Clean-up Custom::CDKBucketDeployment
57+
const bucketDeployments = Object.keys(resources).filter(function (key) {
58+
return resources[key].Type === "Custom::CDKBucketDeployment"
59+
})
60+
bucketDeployments.forEach(function (d) {
61+
const deployment = template.Resources[d];
62+
if (deployment.Properties.hasOwnProperty('SourceBucketNames')) {
63+
let s3Key = Object.assign(deployment.Properties.SourceObjectKeys[0]);
64+
deployment.Properties.SourceObjectKeys = [
65+
`%%SOLUTION_NAME%%/%%VERSION%%/${s3Key}`
66+
]
67+
deployment.Properties.SourceBucketNames = [
68+
{
69+
'Fn::Sub': '%%BUCKET_NAME%%-${AWS::Region}'
70+
}
71+
]
72+
}
73+
})
74+
75+
// Clean-up CustomCDKBucketDeployment Policy
76+
const bucketDeploymentsPolicy = Object.keys(resources).filter(function (key) {
77+
return key.startsWith("CustomCDKBucketDeployment") && resources[key].Type === "AWS::IAM::Policy"
78+
})
79+
80+
bucketDeploymentsPolicy.forEach(function (d) {
81+
const policy = template.Resources[d];
82+
let resources = policy.Properties.PolicyDocument.Statement[0].Resource
83+
resources.forEach((res) => {
84+
res['Fn::Join'].forEach((key) => {
85+
if (key[2] == ':s3:::') {
86+
key[3]['Fn::Sub'] = '%%BUCKET_NAME%%-${AWS::Region}'
87+
}
88+
})
89+
})
90+
})
91+
92+
const nestedStacks = Object.keys(resources).filter(function (key) {
93+
return resources[key].Type === "AWS::CloudFormation::Stack";
94+
});
95+
96+
nestedStacks.forEach(function (f) {
97+
const fn = template.Resources[f];
98+
if (!fn.Metadata.hasOwnProperty("aws:asset:path")) {
99+
throw new Error("Nested stack construct missing file name metadata");
100+
}
101+
fn.Properties.TemplateURL = {
102+
"Fn::Join": [
103+
"",
104+
[
105+
"https://%%TEMPLATE_BUCKET_NAME%%.s3.",
106+
{
107+
Ref: "AWS::URLSuffix",
108+
},
109+
"/",
110+
`%%SOLUTION_NAME%%/%%VERSION%%/${fn.Metadata["aws:asset:path"].slice(0, -".json".length)}`,
111+
],
112+
],
113+
};
114+
115+
const params = fn.Properties.Parameters ? fn.Properties.Parameters : {};
116+
const nestedStackParameters = Object.keys(params).filter(function (key) {
117+
if (key.search(_regex) > -1) {
118+
return true;
119+
}
120+
return false;
121+
});
122+
123+
nestedStackParameters.forEach(function (stkParam) {
124+
fn.Properties.Parameters[stkParam] = undefined;
125+
});
126+
});
127+
128+
// Clean-up parameters section
129+
const parameters = (template.Parameters) ? template.Parameters : {};
130+
const assetParameters = Object.keys(parameters).filter(function (key) {
131+
if (key.search(_regex) > -1) {
132+
return true;
133+
}
134+
return false;
135+
});
136+
assetParameters.forEach(function (a) {
137+
template.Parameters[a] = undefined;
138+
});
139+
140+
// Clean-up BootstrapVersion parameter
141+
if (parameters.hasOwnProperty('BootstrapVersion')) {
142+
parameters.BootstrapVersion = undefined
143+
}
144+
145+
// Clean-up CheckBootstrapVersion Rule
146+
const rules = (template.Rules) ? template.Rules : {};
147+
if (rules.hasOwnProperty('CheckBootstrapVersion')) {
148+
rules.CheckBootstrapVersion = undefined
149+
}
150+
151+
152+
// Output modified template file
153+
const output_template = JSON.stringify(template, null, 2);
154+
fs.writeFileSync(`${global_s3_assets}/${file}`, output_template);
155+
});

deployment/ecr/clo-logging-syslog/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/aws-observability/aws-for-fluent-bit:2.32.5.20250422
1+
FROM public.ecr.aws/aws-observability/aws-for-fluent-bit:2.33.0
22

33
RUN yum update -y && yum install -y unzip
44

deployment/ecr/clo-s3-list-objects/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/lambda/python:3.12.2025.04.03.11 AS builder
1+
FROM public.ecr.aws/lambda/python:3.12.2025.07.27.11 AS builder
22

33
WORKDIR /build
44

@@ -14,7 +14,7 @@ RUN python -m venv .venv && \
1414
cd common-lib && \
1515
poetry build
1616

17-
FROM public.ecr.aws/lambda/python:3.12.2025.04.03.11
17+
FROM public.ecr.aws/lambda/python:3.12.2025.07.27.11
1818

1919
WORKDIR /ws
2020

0 commit comments

Comments
 (0)