Skip to content

Commit 53f3a0a

Browse files
authored
Release 3.3.17 (#152)
1 parent 54039f8 commit 53f3a0a

File tree

95 files changed

+2388
-532
lines changed

Some content is hidden

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

95 files changed

+2388
-532
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@ global-s3-assets
33
regional-s3-assets
44
open-source
55

6+
**/assets/stno_config.js
7+
68
# Generated ouputs
79
console-manifest.json
810
dist
911
source/**/coverage
1012
coverage.xml
13+
.coverage
1114
*pycache*
1215
npm-debug.log
1316
*.zip

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +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+
## [3.3.17] - 2025-06-10
9+
10+
### Security
11+
12+
- Bump `webpack-dev-server` to mitigate [CVE-2025-30360](https://avd.aquasec.com/nvd/cve-2025-30360)
13+
14+
### Changed
15+
16+
- Remove `requirements.txt` in favor of `poetry.lock` for dependency management with poetry
17+
- Refactor `lambda` as standard python package with poetry
18+
819
## [3.3.16] - 2025-05-30
920

1021
### Security

NOTICE.txt

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,7 @@ react-scripts under the MIT license.
635635
jest-serializer under the MIT license.
636636
is-typedarray under the MIT license.
637637
typedarray-to-buffer under the MIT license.
638+
typescript under the Apache-2.0 license.
638639
@pmmmwh/react-refresh-webpack-plugin under the MIT license.
639640
webpack under the MIT license.
640641
eslint-scope under the BSD-2-Clause license.
@@ -1112,6 +1113,7 @@ utila under the MIT license.
11121113
htmlparser2 under the MIT license.
11131114
identity-obj-proxy under the MIT license.
11141115
harmony-reflect under the Apache-2.0 license.
1116+
jest under the MIT license.
11151117
@jest/core under the MIT license.
11161118
@jest/console under the MIT license.
11171119
@jest/reporters under the MIT license.
@@ -1420,6 +1422,7 @@ rxjs under the Apache-2.0 license.
14201422
through under the MIT license.
14211423
is-node-process under the MIT license.
14221424
js-levenshtein under the MIT license.
1425+
@aws-sdk/client-cognito-identity-provider under the Apache-2.0 license.
14231426
@smithy/is-array-buffer under the Apache-2.0 license.
14241427
@smithy/util-buffer-from under the Apache-2.0 license.
14251428
@smithy/util-utf8 under the Apache-2.0 license.
@@ -1464,6 +1467,7 @@ js-levenshtein under the MIT license.
14641467
@smithy/util-defaults-mode-node under the Apache-2.0 license.
14651468
@smithy/credential-provider-imds under the Apache-2.0 license.
14661469
@aws-sdk/token-providers under the Apache-2.0 license.
1470+
winston under the MIT license.
14671471
@colors/colors under the MIT license.
14681472
@dabh/diagnostics under the MIT license.
14691473
colorspace under the MIT license.
@@ -1482,6 +1486,8 @@ one-time under the MIT license.
14821486
fn.name under the MIT license.
14831487
stack-trace under the MIT license.
14841488
winston-transport under the MIT license.
1489+
decode-uri-component under the MIT license.
1490+
ts-node under the MIT license.
14851491
diff under the BSD-3-Clause license.
14861492
@cspotcode/source-map-support under the MIT license.
14871493
@tsconfig/node10 under the MIT license.
@@ -1495,7 +1501,9 @@ yn under the MIT license.
14951501
@jest/expect under the MIT license.
14961502
pure-rand under the MIT license.
14971503
create-jest under the MIT license.
1504+
ts-jest under the MIT license.
14981505
bs-logger under the MIT license.
1506+
aws-sdk-client-mock under the MIT license.
14991507
@aws-sdk/client-s3 under the Apache-2.0 license.
15001508
@aws-crypto/sha1-browser under the Apache-2.0 license.
15011509
@aws-sdk/middleware-bucket-endpoint under the Apache-2.0 license.
@@ -1527,30 +1535,57 @@ nise under the BSD-3-Clause license.
15271535
@sinonjs/text-encoding under the Apache-2.0 license.
15281536
just-extend under the MIT license.
15291537
aws-lambda-powertools under the MIT license.
1530-
typing_extensions
1531-
aws_lambda_typing under the MIT license.
1538+
aws-lambda-typing under the MIT license.
15321539
boto3 under the Apache-2.0 license.
1540+
boto3-stubs under the MIT license.
15331541
botocore under the Apache-2.0 license.
1542+
botocore-stubs under the MIT license.
1543+
certifi under the MPL-2.0 license.
1544+
cffi under the MIT license.
1545+
charset-normalizer under the MIT license.
1546+
colorama under the 0BSD license.
1547+
coverage under the Apache-2.0 license.
1548+
cryptography under the Apache-2.0 license.
1549+
exceptiongroup under the MIT license.
1550+
freezegun under the Apache-2.0 license.
1551+
idna under the 0BSD license.
1552+
iniconfig under the MIT license.
1553+
jinja2 under the 0BSD license.
15341554
jmespath under the MIT license.
1535-
python-dateutil under the Apache-2.0 license.
1536-
six under the MIT license.
1537-
boto3-stubs under the MIT license.
1555+
markupsafe under the 0BSD license.
1556+
mock under the 0BSD license.
15381557
moto under the Apache-2.0 license.
1539-
pytest-mock under the MIT license.
1558+
mypy-boto3-cloudformation under the MIT license.
1559+
mypy-boto3-dynamodb under the MIT license.
1560+
mypy-boto3-ec2 under the MIT license.
1561+
mypy-boto3-lambda under the MIT license.
1562+
mypy-boto3-logs under the MIT license.
1563+
mypy-boto3-organizations under the MIT license.
1564+
mypy-boto3-ram under the MIT license.
1565+
mypy-boto3-rds under the MIT license.
1566+
mypy-boto3-s3 under the MIT license.
1567+
mypy-boto3-sns under the MIT license.
1568+
mypy-boto3-sqs under the MIT license.
1569+
mypy-boto3-stepfunctions under the MIT license.
1570+
mypy-boto3-sts under the MIT license.
1571+
packaging under the Apache-2.0 license.
1572+
pluggy under the MIT license.
1573+
pycparser under the 0BSD license.
15401574
pytest under the MIT license.
1541-
sure under the GNU General Public License v3 or later (GPLv3+) license(s).
1542-
pipdeptree under the MIT license.
1543-
coverage under the Apache-2.0 license.
1544-
freezegun under the Apache-2.0 license.
1545-
typescript under the Apache-2.0 license.
1546-
jest under the MIT license.
1547-
@aws-sdk/client-cognito-identity-provider under the Apache-2.0 license.
1548-
winston under the MIT license.
1549-
decode-uri-component under the MIT license.
1550-
ts-node under the MIT license.
1551-
ts-jest under the MIT license.
1552-
aws-sdk-client-mock under the MIT license.
1553-
typing_extensions
1575+
pytest-mock under the MIT license.
1576+
python-dateutil under the Apache-2.0 license.
1577+
pyyaml under the MIT license.
1578+
requests under the Apache-2.0 license.
1579+
responses under the Apache-2.0 license.
1580+
s3transfer under the Apache-2.0 license.
1581+
six under the MIT license.
1582+
tomli under the MIT license.
1583+
types-awscrt under the MIT license.
1584+
types-s3transfer under the MIT license.
1585+
typing-extensions
1586+
urllib3
1587+
werkzeug under the 0BSD license.
1588+
xmltodict under the MIT license.
15541589

15551590
********************
15561591
OPEN SOURCE LICENSES
@@ -1568,4 +1603,4 @@ MIT - https://opensource.org/license/mit/
15681603
MPL-2.0 - https://www.mozilla.org/MPL/2.0/
15691604
Python-2.0 - https://opensource.org/licenses/Python-2.0
15701605
Unlicense - https://unlicense.org/
1571-
Zlib - http://www.zlib.net/zlib_license.html
1606+
Zlib - http://www.zlib.net/zlib_license.html

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Use the following steps if you want to customize the solution or extend the solu
6363
### Setup
6464

6565
- Python Prerequisite: python=3.11 | pip3=23.2.1
66+
- Poetry >=2.1.3
6667
- Javascript Prerequisite: node=v18.16.0 | npm=9.5.1
6768

6869
Clone the repository and make desired code changes.
@@ -78,10 +79,15 @@ _Note: The following steps have been tested under the preceding pre-requisites._
7879
Run unit tests to ensure that your added customization passes the tests.
7980

8081
```
81-
cd ./source
82-
chmod +x ./run-unit-tests.sh
83-
./run-unit-tests.sh
84-
cd ..
82+
# Python
83+
cd ./source/lambda
84+
poetry install
85+
poetry run pytest
86+
87+
# Nodejs
88+
cd ./source/ui
89+
npm ci
90+
npm run test
8591
```
8692

8793
_✅ Ensure that all unit tests pass. Review the generated coverage report._

deployment/build-s3-dist.sh

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ mkdir -p $template_dist_dir
4545
rm -rf $build_dist_dir
4646
mkdir -p $build_dist_dir
4747

48+
headline "[Prereqs] Validate poetry installed"
49+
if ! command -v poetry &> /dev/null; then
50+
echo "Poetry is not installed, exiting..."
51+
exit 1
52+
fi
53+
4854
headline "[Init] Clean python generated files & folders"
4955
cd $lambda_dir
5056
find . -iname ".venv" -type d | xargs rm -rf
@@ -53,10 +59,25 @@ find . -iname "dist" -type d | xargs rm -rf
5359
find . -type f -name ".pytest_cache" -delete
5460
find . -type f -name ".coverage" -delete
5561

56-
headline "[Init] Initiating virtual environment"
57-
python3 -m venv .venv --upgrade-deps
58-
source .venv/bin/activate
59-
pip3 install -r requirements.txt
62+
headline "[Configure] Poetry"
63+
poetry config virtualenvs.in-project true --local
64+
poetry config virtualenvs.options.no-pip true --local
65+
poetry config virtualenvs.options.always-copy true --local
66+
67+
68+
headline "[Install] Solution python package"
69+
# poetry installs solution in editable mode with symlinks, not apt for packaging
70+
# build solution wheel and install in poetry environment
71+
poetry build -f wheel
72+
poetry run pip install dist/*
73+
74+
headline "[Package] Solution lambda"
75+
rm -rf dist
76+
mkdir -p dist
77+
rsync -a .venv/lib/python3.11/site-packages/ ./dist/ --exclude '*dist-info*' --exclude '*.pyc' --exclude '*__pycache__*'
78+
cd dist
79+
zip -rq "$2.zip" .
80+
cp -R "$2.zip" $build_dist_dir
6081

6182
headline "[Build] Build cognito-trigger function"
6283
echo "cd $source_dir/cognito-trigger"
@@ -65,30 +86,14 @@ echo "npm run build:all"
6586
npm run build:all
6687
cp -R "dist/cognito-trigger.zip" $build_dist_dir
6788

68-
headline "[Build] Lambda zips for STNO Solution"
69-
cd $lambda_dir
70-
for microservices in */ ; do
71-
echo "building $microservices"
72-
microservice_name=$(basename $microservices)
73-
cd $lambda_dir/$microservice_name
74-
mkdir -p dist/$microservice_name
75-
rsync -aq --exclude 'setuptools/' --exclude 'setuptools-*.dist-info/' --exclude 'pkg_resources/' $lambda_dir/.venv/lib/python3.11/site-packages/ ./dist/
76-
cp -R lib __init__.py main.py ./dist/$microservice_name/
77-
cd dist
78-
zip -rq "$microservice_name.zip" .
79-
cp -R "$microservice_name.zip" $build_dist_dir
80-
rm -rf $lambda_dir/$microservice_name/dist
81-
done
82-
deactivate
83-
8489
headline "[Stage] Copy ui files to regional-s3-assets, build console and zip"
8590
cp -R $source_dir/ui $build_dist_dir/
8691
mkdir -p $build_dist_dir/graphql
8792
cp -R $source_dir/ui/src/graphql/schema.graphql $source_dir/ui/src/graphql/resolver $source_dir/ui/src/graphql/function $build_dist_dir/graphql
8893
cd $build_dist_dir/ui/
89-
[ -e node_modules ] && rm -rf node_modules
94+
[ -e node_modules ] && rm -rf node_modules
9095
npm ci
91-
[ -e build ] && rm -r build
96+
[ -e build ] && rm -r build
9297
npm run build
9398
cp -R ./build ../console
9499
cd ../../.. && rm -rf $build_dist_dir/ui
@@ -98,7 +103,7 @@ cd $template_dir/manifest-generator
98103
[ -e node_modules ] && rm -rf node_modules
99104
npm ci
100105
node app.js --target "$build_dist_dir/console" --output "$build_dist_dir/console-manifest.json"
101-
cd $build_dist_dir && zip -rq ./custom_resource.zip ./console-manifest.json
106+
cd $build_dist_dir && zip -rq ./$2.zip ./console-manifest.json
102107
cd ../..
103108

104109
headline "[Stage] Copy templates to global-s3-assets directory"

deployment/network-orchestration-hub.template

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ Mappings:
382382
RetentionPeriod: 90
383383
SourceCode:
384384
General:
385+
LambdaZip: "%SOLUTION_NAME%.zip"
385386
S3Bucket: "%DIST_BUCKET_NAME%"
386387
KeyPrefix: "network-orchestration-for-aws-transit-gateway/%VERSION%"
387388
Version: "%VERSION%"
@@ -814,9 +815,9 @@ Resources:
814815
PARTITION: !Sub ${AWS::Partition}
815816
Code:
816817
S3Bucket: !Join ["-", [!FindInMap ["SourceCode", "General", "S3Bucket"], !Ref "AWS::Region"]]
817-
S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"],"custom_resource.zip"]]
818+
S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], !FindInMap ["SourceCode", "General", "LambdaZip"]]]
818819
Description: Network Orchestration for AWS Transit Gateway - custom resource handler
819-
Handler: custom_resource.main.lambda_handler
820+
Handler: solution.custom_resource.main.lambda_handler
820821
MemorySize: 1536
821822
Role: !Sub ${CustomResourceLambdaFunctionRole.Arn}
822823
Runtime: python3.11
@@ -1055,9 +1056,9 @@ Resources:
10551056
APPLICATION_TAG_VALUE: !GetAtt Application.ApplicationTagValue
10561057
Code:
10571058
S3Bucket: !Join ["-", [!FindInMap ["SourceCode", "General", "S3Bucket"], Ref: "AWS::Region"]]
1058-
S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"],"tgw_vpc_attachment.zip"]]
1059+
S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], !FindInMap ["SourceCode", "General", "LambdaZip"]]]
10591060
Description: Network Orchestration for AWS Transit Gateway - State Machine Handler
1060-
Handler: tgw_vpc_attachment.main.lambda_handler
1061+
Handler: solution.tgw_vpc_attachment.main.lambda_handler
10611062
MemorySize: 1536
10621063
Role: !GetAtt 'StateMachineLambdaFunctionRole.Arn'
10631064
Runtime: python3.11
@@ -2149,9 +2150,9 @@ Resources:
21492150
PARTITION: !Sub ${AWS::Partition}
21502151
Code:
21512152
S3Bucket: !Join ["-", [!FindInMap ["SourceCode", "General", "S3Bucket"], Ref: "AWS::Region"]]
2152-
S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"],"tgw_peering_attachment.zip"]]
2153+
S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], !FindInMap ["SourceCode", "General", "LambdaZip"]]]
21532154
Description: Network Orchestration for AWS Transit Gateway - TGW peering attachment handler
2154-
Handler: tgw_peering_attachment.main.lambda_handler
2155+
Handler: solution.tgw_peering_attachment.main.lambda_handler
21552156
MemorySize: 1536
21562157
Role: !Sub ${TgwPeeringLambdaFunctionRole.Arn}
21572158
Runtime: python3.11

deployment/network-orchestration-spoke.template

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Mappings:
3030
Name: "Network-Orchestrator-Event-Bus"
3131
SourceCode:
3232
General:
33+
LambdaZip: "%SOLUTION_NAME%.zip"
3334
S3Bucket: "%DIST_BUCKET_NAME%"
3435
KeyPrefix: "network-orchestration-for-aws-transit-gateway/%VERSION%"
3536
Version: "%VERSION%"
@@ -245,9 +246,9 @@ Resources:
245246
PARTITION: !Sub ${AWS::Partition}
246247
Code:
247248
S3Bucket: !Join ["-", [!FindInMap ["SourceCode", "General", "S3Bucket"], !Ref "AWS::Region"]]
248-
S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"],"custom_resource.zip"]]
249+
S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], !FindInMap ["SourceCode", "General", "LambdaZip"]]]
249250
Description: Network Orchestration for AWS Transit Gateway - custom resource handler
250-
Handler: custom_resource.main.lambda_handler
251+
Handler: solution.custom_resource.main.lambda_handler
251252
MemorySize: 512
252253
Role: !Sub ${CustomResourceLambdaFunctionRole.Arn}
253254
Runtime: python3.11

source/cognito-trigger/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/cognito-trigger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cognito-trigger",
3-
"version": "3.3.16",
3+
"version": "3.3.17",
44
"description": "Triggered when a new user is confirmed in the user pool to allow for custom actions to be taken",
55
"author": {
66
"name": "Amazon Web Services",

source/lambda/.coveragerc

Lines changed: 0 additions & 11 deletions
This file was deleted.

source/lambda/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

0 commit comments

Comments
 (0)