diff --git a/.github/workflows/validate_pyinstaller.yml b/.github/workflows/validate_pyinstaller.yml
index 4eefae4cb3..bb8202091a 100644
--- a/.github/workflows/validate_pyinstaller.yml
+++ b/.github/workflows/validate_pyinstaller.yml
@@ -21,10 +21,6 @@ jobs:
# due to glibc requirement from github actions
# see example failure: https://github.com/aws/aws-sam-cli/actions/runs/6102715182/job/16561754862?pr=5887
- uses: actions/checkout@v3
- - name: Set up Go
- uses: actions/setup-go@v4
- with:
- go-version: "1.20"
- name: Build PyInstaller
run: |
chmod +x ./installer/pyinstaller/build-linux.sh
@@ -52,15 +48,13 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- - name: Set up Go
- uses: actions/setup-go@v5
- with:
- go-version: "1.20"
- name: Build PyInstaller
run: |
chmod +x ./installer/pyinstaller/build-mac.sh
./installer/pyinstaller/build-mac.sh aws-sam-cli-macos-x86_64.zip
- name: Basic tests for PyInstaller
+ env:
+ SAM_INIT_RUNTIME: "python3.8"
run: |
unzip .build/output/aws-sam-cli-macos-x86_64.zip -d sam-installation
sudo ./sam-installation/install
diff --git a/installer/pyinstaller/build-linux.sh b/installer/pyinstaller/build-linux.sh
index 04fac68975..c096508abb 100755
--- a/installer/pyinstaller/build-linux.sh
+++ b/installer/pyinstaller/build-linux.sh
@@ -38,9 +38,9 @@ mkdir -p .build/output/pyinstaller-output
mkdir -p .build/output/openssl
cd .build/output/openssl
-curl "https://www.openssl.org/source/openssl-1.1.1t.tar.gz" --output openssl-1.1.1.tar.gz
+curl "https://www.openssl.org/source/openssl-1.1.1w.tar.gz" --output openssl-1.1.1.tar.gz
tar xzf openssl-1.1.1.tar.gz
-cd openssl-1.1.1t
+cd openssl-1.1.1w
./config --prefix=/opt/openssl && make && make install
cd ../../..
diff --git a/installer/pyinstaller/build-mac.sh b/installer/pyinstaller/build-mac.sh
index f003274cae..a5d3954752 100755
--- a/installer/pyinstaller/build-mac.sh
+++ b/installer/pyinstaller/build-mac.sh
@@ -30,7 +30,7 @@ if [ "$python_library_zip_filename" = "" ]; then
fi
if [ "$openssl_version" = "" ]; then
- openssl_version="1.1.1o";
+ openssl_version="1.1.1w";
fi
if [ "$python_version" = "" ]; then
diff --git a/requirements/base.txt b/requirements/base.txt
index 38cd50577c..cb7ff7b3e3 100644
--- a/requirements/base.txt
+++ b/requirements/base.txt
@@ -15,7 +15,7 @@ aws_lambda_builders==1.47.0
tomlkit==0.12.4
watchdog==4.0.0
rich~=13.7.1
-pyopenssl~=24.0.0
+pyopenssl~=24.1.0
# Pin to <4.18 to until SAM-T no longer uses RefResolver
jsonschema<4.22
@@ -31,4 +31,4 @@ tzlocal==5.2
cfn-lint~=0.86.0
# Type checking boto3 objects
-boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.34.58
+boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.34.61
diff --git a/requirements/dev.txt b/requirements/dev.txt
index 35aada2903..e257d5481a 100644
--- a/requirements/dev.txt
+++ b/requirements/dev.txt
@@ -7,24 +7,24 @@ pytest-cov==4.1.0
# type checking and related stubs
# mypy adds new rules in new minor versions, which could cause our PR check to fail
# here we fix its version and upgrade it manually in the future
-mypy==1.8.0
-types-pywin32==306.0.0.20240130
-types-PyYAML==6.0.12.12
-types-chevron==0.14.2.20240106
-types-psutil==5.9.5.20240205
-types-setuptools==69.1.0.20240308
-types-Pygments==2.17.0.20240106
-types-colorama==0.4.15.20240205
+mypy==1.9.0
+types-pywin32==306.0.0.20240313
+types-PyYAML==6.0.12.20240311
+types-chevron==0.14.2.20240310
+types-psutil==5.9.5.20240311
+types-setuptools==69.1.0.20240310
+types-Pygments==2.17.0.20240310
+types-colorama==0.4.15.20240311
types-dateparser==1.1.4.20240106
-types-docutils==0.20.0.20240308
-types-jsonschema==4.21.0.20240118
-types-pyOpenSSL==24.0.0.20240228
+types-docutils==0.20.0.20240311
+types-jsonschema==4.21.0.20240311
+types-pyOpenSSL==24.0.0.20240311
# as of types-requests>=2.31.0.7, this now requires `urllib3>2`, pin we are able to upgrade
types-requests==2.31.0.6
types-urllib3==1.26.25.14
# Test requirements
-pytest~=8.0.1
+pytest~=8.1.1
parameterized==0.9.0
pytest-xdist==3.5.0
pytest-forked==1.6.0
diff --git a/requirements/pre-dev.txt b/requirements/pre-dev.txt
index e93be0b37b..92cf633071 100644
--- a/requirements/pre-dev.txt
+++ b/requirements/pre-dev.txt
@@ -1 +1 @@
-ruff==0.3.1
+ruff==0.3.2
diff --git a/requirements/pyinstaller-build.txt b/requirements/pyinstaller-build.txt
index 7ad508bb29..3263bdcbf5 100644
--- a/requirements/pyinstaller-build.txt
+++ b/requirements/pyinstaller-build.txt
@@ -1,3 +1,3 @@
# Executable binary builder requirements
setuptools==69.1.1
-pyinstaller==6.4.0
+pyinstaller==6.5.0
diff --git a/requirements/reproducible-linux.txt b/requirements/reproducible-linux.txt
index e4bfa16fbb..19647b5da8 100644
--- a/requirements/reproducible-linux.txt
+++ b/requirements/reproducible-linux.txt
@@ -38,25 +38,25 @@ blinker==1.7.0 \
--hash=sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9 \
--hash=sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182
# via flask
-boto3==1.34.58 \
- --hash=sha256:09e3d17c718bc938a76774f31bc557b20733c0f5f9135a3e7782b55f3459cbdd \
- --hash=sha256:d213a6fea9db6d537b1e65924133d8279ada79a40bc840d4930e1b64be869d4c
+boto3==1.34.61 \
+ --hash=sha256:4b40bf2c8494647c9e88c180537dc9fc0c1047a9fffbb1e5b0da6596f1e59b7b \
+ --hash=sha256:992e994c7e481a5d3259c699574882b79d631a46f7c369bea350b7ccb0651317
# via
# aws-sam-cli (setup.py)
# aws-sam-translator
-boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.34.58 \
- --hash=sha256:14ea85a355f984bd7dc17e39237bfc24c3a55479fbcb87f17c00269bd95a2b44 \
- --hash=sha256:f164e520361d6aa39d295ac09588a6dc6b8efbc4058ada0b796d3bfb0e6e6e98
+boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.34.61 \
+ --hash=sha256:24badf32e31472d4f8326a6e759762bcf902f97e1241611f4167da1530ff6d0f \
+ --hash=sha256:2e1c47bfe00a3401c92fa77ee4560bda6152cc3457f2ac00e4a349c8a853c776
# via aws-sam-cli (setup.py)
-botocore==1.34.58 \
- --hash=sha256:8086a6ea27d0f658505ac81e6d7314e013561469c40db9b5a4692127eb5c97cf \
- --hash=sha256:d75216952886dc513ea1b5e2979a6af08feed2f537e3fc102e4a0a2ead563a35
+botocore==1.34.61 \
+ --hash=sha256:079f3288d38f97fd5656c25c44a94bea0e7090b938abfdeea463eaadb210c4a0 \
+ --hash=sha256:72df4af7e4e6392552c882d48c74e4be9bf7be4cd8d829711b312fbae13d7034
# via
# boto3
# s3transfer
-botocore-stubs==1.34.58 \
- --hash=sha256:7f820ed37a11109744a8c4aeb9f0224c7114b5aaabcbd46fc6c4f60af69faa3e \
- --hash=sha256:830bf3bc6b0a7299f770c0adcbea21fda5d240080024f12ca6d80633a3ce46c4
+botocore-stubs==1.34.61 \
+ --hash=sha256:c8ece27ae6d6204a823a2a6df47128d6f9e1c4e63252e1e11d86f635e98b4159 \
+ --hash=sha256:f2b44cf7eb7c8f2c0f674792ab516a4a187fe2561524d21b89f76309e1812738
# via boto3-stubs
certifi==2024.2.2 \
--hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \
@@ -409,9 +409,9 @@ mypy-boto3-apigateway==1.34.56 \
--hash=sha256:3695503bd9388b3067c1dc1dc4ec1486dcec450dbf1e9889f451120e333b92da \
--hash=sha256:5ab15db30d730198384d6445d50cc1fec98361b85366dd092b10e9b9f4a1a2cb
# via boto3-stubs
-mypy-boto3-cloudformation==1.34.55 \
- --hash=sha256:78c4d25ef7102bd02c8e87d32211ff60a7b474ec546e9948b46f170d341ae0a2 \
- --hash=sha256:de9f4d45d0a4e57bb5ef8b8d7a03476f8ef24ffa253d636cd824cde061227439
+mypy-boto3-cloudformation==1.34.61 \
+ --hash=sha256:33ca97567ceeb691c176d91133d7fd8bcccd63782a17fbd58bf59cc2fbfc3945 \
+ --hash=sha256:7d3e3c7a08273723ff70f5e85ef9b7f3acd629f9aeca1032c6bb541b039e9b47
# via boto3-stubs
mypy-boto3-ecr==1.34.0 \
--hash=sha256:3346c02c22b16068c9acc67d990e32060bf7cdaea5f3d43c50e44308fbbc3439 \
@@ -465,9 +465,9 @@ networkx==3.2.1 \
--hash=sha256:9f1bb5cf3409bf324e0a722c20bdb4c20ee39bf1c30ce8ae499c8502b0b5e0c6 \
--hash=sha256:f18c69adc97877c42332c170849c96cefa91881c99a7cb3e95b7c659ebdc1ec2
# via cfn-lint
-packaging==23.2 \
- --hash=sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5 \
- --hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7
+packaging==24.0 \
+ --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \
+ --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9
# via docker
pbr==6.0.0 \
--hash=sha256:4a7317d5e3b17a3dccb6a8cfe67dab65b20551404c52c8ed41279fa4f0cb4cda \
@@ -568,9 +568,9 @@ pygments==2.17.2 \
--hash=sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c \
--hash=sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367
# via rich
-pyopenssl==24.0.0 \
- --hash=sha256:6aa33039a93fffa4563e655b61d11364d01264be8ccb49906101e02a334530bf \
- --hash=sha256:ba07553fb6fd6a7a2259adb9b84e12302a9a8a75c44046e8bb5d3e5ee887e3c3
+pyopenssl==24.1.0 \
+ --hash=sha256:17ed5be5936449c5418d1cd269a1a9e9081bc54c17aed272b45856a3d3dc86ad \
+ --hash=sha256:cabed4bfaa5df9f1a16c0ef64a0cb65318b5cd077a7eda7d6970131ca2f41a6f
# via aws-sam-cli (setup.py)
python-dateutil==2.9.0.post0 \
--hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \
@@ -938,9 +938,9 @@ types-awscrt==0.20.5 \
--hash=sha256:61811bbf4de95248939f9276a434be93d2b95f6ccfe8aa94e56999e9778cfcc2 \
--hash=sha256:79d5bfb01f64701b6cf442e89a37d9c4dc6dbb79a46f2f611739b2418d30ecfd
# via botocore-stubs
-types-python-dateutil==2.8.19.20240106 \
- --hash=sha256:1f8db221c3b98e6ca02ea83a58371b22c374f42ae5bbdf186db9c9a76581459f \
- --hash=sha256:efbbdc54590d0f16152fa103c9879c7d4a00e82078f6e2cf01769042165acaa2
+types-python-dateutil==2.8.19.20240311 \
+ --hash=sha256:51178227bbd4cbec35dc9adffbf59d832f20e09842d7dcb8c73b169b8780b7cb \
+ --hash=sha256:ef813da0809aca76472ca88807addbeea98b19339aebe56159ae2f4b4f70857a
# via arrow
types-s3transfer==0.10.0 \
--hash=sha256:35e4998c25df7f8985ad69dedc8e4860e8af3b43b7615e940d53c00d413bdc69 \
@@ -1017,9 +1017,9 @@ werkzeug==3.0.1 \
--hash=sha256:507e811ecea72b18a404947aded4b3390e1db8f826b494d76550ef45bb3b1dcc \
--hash=sha256:90a285dc0e42ad56b34e696398b8122ee4c681833fb35b8334a095d82c56da10
# via flask
-wheel==0.42.0 \
- --hash=sha256:177f9c9b0d45c47873b619f5b650346d632cdc35fb5e4d25058e09c9e581433d \
- --hash=sha256:c45be39f7882c9d34243236f2d63cbd58039e360f85d0913425fbd7ceea617a8
+wheel==0.43.0 \
+ --hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \
+ --hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81
# via aws-lambda-builders
# The following packages are considered to be unsafe in a requirements file:
diff --git a/requirements/reproducible-mac.txt b/requirements/reproducible-mac.txt
index 3fd3a558f6..92d8e41c00 100644
--- a/requirements/reproducible-mac.txt
+++ b/requirements/reproducible-mac.txt
@@ -56,25 +56,25 @@ blinker==1.7.0 \
--hash=sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9 \
--hash=sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182
# via flask
-boto3==1.34.58 \
- --hash=sha256:09e3d17c718bc938a76774f31bc557b20733c0f5f9135a3e7782b55f3459cbdd \
- --hash=sha256:d213a6fea9db6d537b1e65924133d8279ada79a40bc840d4930e1b64be869d4c
+boto3==1.34.61 \
+ --hash=sha256:4b40bf2c8494647c9e88c180537dc9fc0c1047a9fffbb1e5b0da6596f1e59b7b \
+ --hash=sha256:992e994c7e481a5d3259c699574882b79d631a46f7c369bea350b7ccb0651317
# via
# aws-sam-cli (setup.py)
# aws-sam-translator
-boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.34.58 \
- --hash=sha256:14ea85a355f984bd7dc17e39237bfc24c3a55479fbcb87f17c00269bd95a2b44 \
- --hash=sha256:f164e520361d6aa39d295ac09588a6dc6b8efbc4058ada0b796d3bfb0e6e6e98
+boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.34.61 \
+ --hash=sha256:24badf32e31472d4f8326a6e759762bcf902f97e1241611f4167da1530ff6d0f \
+ --hash=sha256:2e1c47bfe00a3401c92fa77ee4560bda6152cc3457f2ac00e4a349c8a853c776
# via aws-sam-cli (setup.py)
-botocore==1.34.58 \
- --hash=sha256:8086a6ea27d0f658505ac81e6d7314e013561469c40db9b5a4692127eb5c97cf \
- --hash=sha256:d75216952886dc513ea1b5e2979a6af08feed2f537e3fc102e4a0a2ead563a35
+botocore==1.34.61 \
+ --hash=sha256:079f3288d38f97fd5656c25c44a94bea0e7090b938abfdeea463eaadb210c4a0 \
+ --hash=sha256:72df4af7e4e6392552c882d48c74e4be9bf7be4cd8d829711b312fbae13d7034
# via
# boto3
# s3transfer
-botocore-stubs==1.34.58 \
- --hash=sha256:7f820ed37a11109744a8c4aeb9f0224c7114b5aaabcbd46fc6c4f60af69faa3e \
- --hash=sha256:830bf3bc6b0a7299f770c0adcbea21fda5d240080024f12ca6d80633a3ce46c4
+botocore-stubs==1.34.61 \
+ --hash=sha256:c8ece27ae6d6204a823a2a6df47128d6f9e1c4e63252e1e11d86f635e98b4159 \
+ --hash=sha256:f2b44cf7eb7c8f2c0f674792ab516a4a187fe2561524d21b89f76309e1812738
# via boto3-stubs
certifi==2024.2.2 \
--hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \
@@ -303,9 +303,9 @@ importlib-metadata==7.0.2 \
--hash=sha256:198f568f3230878cb1b44fbd7975f87906c22336dba2e4a7f05278c281fbd792 \
--hash=sha256:f4bc4c0c070c490abf4ce96d715f68e95923320370efb66143df00199bb6c100
# via flask
-importlib-resources==6.1.3 \
- --hash=sha256:4c0269e3580fe2634d364b39b38b961540a7738c02cb984e98add8b4221d793d \
- --hash=sha256:56fb4525197b78544a3354ea27793952ab93f935bb4bf746b846bb1015020f2b
+importlib-resources==6.3.0 \
+ --hash=sha256:166072a97e86917a9025876f34286f549b9caf1d10b35a1b372bffa1600c6569 \
+ --hash=sha256:783407aa1cd05550e3aa123e8f7cfaebee35ffa9cb0242919e2d1e4172222705
# via
# jsonschema
# jsonschema-specifications
@@ -437,9 +437,9 @@ mypy-boto3-apigateway==1.34.56 \
--hash=sha256:3695503bd9388b3067c1dc1dc4ec1486dcec450dbf1e9889f451120e333b92da \
--hash=sha256:5ab15db30d730198384d6445d50cc1fec98361b85366dd092b10e9b9f4a1a2cb
# via boto3-stubs
-mypy-boto3-cloudformation==1.34.55 \
- --hash=sha256:78c4d25ef7102bd02c8e87d32211ff60a7b474ec546e9948b46f170d341ae0a2 \
- --hash=sha256:de9f4d45d0a4e57bb5ef8b8d7a03476f8ef24ffa253d636cd824cde061227439
+mypy-boto3-cloudformation==1.34.61 \
+ --hash=sha256:33ca97567ceeb691c176d91133d7fd8bcccd63782a17fbd58bf59cc2fbfc3945 \
+ --hash=sha256:7d3e3c7a08273723ff70f5e85ef9b7f3acd629f9aeca1032c6bb541b039e9b47
# via boto3-stubs
mypy-boto3-ecr==1.34.0 \
--hash=sha256:3346c02c22b16068c9acc67d990e32060bf7cdaea5f3d43c50e44308fbbc3439 \
@@ -493,9 +493,9 @@ networkx==3.1 \
--hash=sha256:4f33f68cb2afcf86f28a45f43efc27a9386b535d567d2127f8f61d51dec58d36 \
--hash=sha256:de346335408f84de0eada6ff9fafafff9bcda11f0a0dfaa931133debb146ab61
# via cfn-lint
-packaging==23.2 \
- --hash=sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5 \
- --hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7
+packaging==24.0 \
+ --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \
+ --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9
# via docker
pbr==6.0.0 \
--hash=sha256:4a7317d5e3b17a3dccb6a8cfe67dab65b20551404c52c8ed41279fa4f0cb4cda \
@@ -600,9 +600,9 @@ pygments==2.17.2 \
--hash=sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c \
--hash=sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367
# via rich
-pyopenssl==24.0.0 \
- --hash=sha256:6aa33039a93fffa4563e655b61d11364d01264be8ccb49906101e02a334530bf \
- --hash=sha256:ba07553fb6fd6a7a2259adb9b84e12302a9a8a75c44046e8bb5d3e5ee887e3c3
+pyopenssl==24.1.0 \
+ --hash=sha256:17ed5be5936449c5418d1cd269a1a9e9081bc54c17aed272b45856a3d3dc86ad \
+ --hash=sha256:cabed4bfaa5df9f1a16c0ef64a0cb65318b5cd077a7eda7d6970131ca2f41a6f
# via aws-sam-cli (setup.py)
python-dateutil==2.9.0.post0 \
--hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \
@@ -970,9 +970,9 @@ types-awscrt==0.20.5 \
--hash=sha256:61811bbf4de95248939f9276a434be93d2b95f6ccfe8aa94e56999e9778cfcc2 \
--hash=sha256:79d5bfb01f64701b6cf442e89a37d9c4dc6dbb79a46f2f611739b2418d30ecfd
# via botocore-stubs
-types-python-dateutil==2.8.19.20240106 \
- --hash=sha256:1f8db221c3b98e6ca02ea83a58371b22c374f42ae5bbdf186db9c9a76581459f \
- --hash=sha256:efbbdc54590d0f16152fa103c9879c7d4a00e82078f6e2cf01769042165acaa2
+types-python-dateutil==2.8.19.20240311 \
+ --hash=sha256:51178227bbd4cbec35dc9adffbf59d832f20e09842d7dcb8c73b169b8780b7cb \
+ --hash=sha256:ef813da0809aca76472ca88807addbeea98b19339aebe56159ae2f4b4f70857a
# via arrow
types-s3transfer==0.10.0 \
--hash=sha256:35e4998c25df7f8985ad69dedc8e4860e8af3b43b7615e940d53c00d413bdc69 \
@@ -1052,9 +1052,9 @@ werkzeug==3.0.1 \
--hash=sha256:507e811ecea72b18a404947aded4b3390e1db8f826b494d76550ef45bb3b1dcc \
--hash=sha256:90a285dc0e42ad56b34e696398b8122ee4c681833fb35b8334a095d82c56da10
# via flask
-wheel==0.42.0 \
- --hash=sha256:177f9c9b0d45c47873b619f5b650346d632cdc35fb5e4d25058e09c9e581433d \
- --hash=sha256:c45be39f7882c9d34243236f2d63cbd58039e360f85d0913425fbd7ceea617a8
+wheel==0.43.0 \
+ --hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \
+ --hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81
# via aws-lambda-builders
zipp==3.17.0 \
--hash=sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31 \
diff --git a/requirements/reproducible-win.txt b/requirements/reproducible-win.txt
index a1b7d971f9..358639ed53 100644
--- a/requirements/reproducible-win.txt
+++ b/requirements/reproducible-win.txt
@@ -38,25 +38,25 @@ blinker==1.7.0 \
--hash=sha256:c3f865d4d54db7abc53758a01601cf343fe55b84c1de4e3fa910e420b438d5b9 \
--hash=sha256:e6820ff6fa4e4d1d8e2747c2283749c3f547e4fee112b98555cdcdae32996182
# via flask
-boto3==1.34.58 \
- --hash=sha256:09e3d17c718bc938a76774f31bc557b20733c0f5f9135a3e7782b55f3459cbdd \
- --hash=sha256:d213a6fea9db6d537b1e65924133d8279ada79a40bc840d4930e1b64be869d4c
+boto3==1.34.61 \
+ --hash=sha256:4b40bf2c8494647c9e88c180537dc9fc0c1047a9fffbb1e5b0da6596f1e59b7b \
+ --hash=sha256:992e994c7e481a5d3259c699574882b79d631a46f7c369bea350b7ccb0651317
# via
# aws-sam-cli (setup.py)
# aws-sam-translator
-boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.34.58 \
- --hash=sha256:14ea85a355f984bd7dc17e39237bfc24c3a55479fbcb87f17c00269bd95a2b44 \
- --hash=sha256:f164e520361d6aa39d295ac09588a6dc6b8efbc4058ada0b796d3bfb0e6e6e98
+boto3-stubs[apigateway,cloudformation,ecr,iam,kinesis,lambda,s3,schemas,secretsmanager,signer,sqs,stepfunctions,sts,xray]==1.34.61 \
+ --hash=sha256:24badf32e31472d4f8326a6e759762bcf902f97e1241611f4167da1530ff6d0f \
+ --hash=sha256:2e1c47bfe00a3401c92fa77ee4560bda6152cc3457f2ac00e4a349c8a853c776
# via aws-sam-cli (setup.py)
-botocore==1.34.58 \
- --hash=sha256:8086a6ea27d0f658505ac81e6d7314e013561469c40db9b5a4692127eb5c97cf \
- --hash=sha256:d75216952886dc513ea1b5e2979a6af08feed2f537e3fc102e4a0a2ead563a35
+botocore==1.34.61 \
+ --hash=sha256:079f3288d38f97fd5656c25c44a94bea0e7090b938abfdeea463eaadb210c4a0 \
+ --hash=sha256:72df4af7e4e6392552c882d48c74e4be9bf7be4cd8d829711b312fbae13d7034
# via
# boto3
# s3transfer
-botocore-stubs==1.34.58 \
- --hash=sha256:7f820ed37a11109744a8c4aeb9f0224c7114b5aaabcbd46fc6c4f60af69faa3e \
- --hash=sha256:830bf3bc6b0a7299f770c0adcbea21fda5d240080024f12ca6d80633a3ce46c4
+botocore-stubs==1.34.61 \
+ --hash=sha256:c8ece27ae6d6204a823a2a6df47128d6f9e1c4e63252e1e11d86f635e98b4159 \
+ --hash=sha256:f2b44cf7eb7c8f2c0f674792ab516a4a187fe2561524d21b89f76309e1812738
# via boto3-stubs
certifi==2024.2.2 \
--hash=sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f \
@@ -413,9 +413,9 @@ mypy-boto3-apigateway==1.34.56 \
--hash=sha256:3695503bd9388b3067c1dc1dc4ec1486dcec450dbf1e9889f451120e333b92da \
--hash=sha256:5ab15db30d730198384d6445d50cc1fec98361b85366dd092b10e9b9f4a1a2cb
# via boto3-stubs
-mypy-boto3-cloudformation==1.34.55 \
- --hash=sha256:78c4d25ef7102bd02c8e87d32211ff60a7b474ec546e9948b46f170d341ae0a2 \
- --hash=sha256:de9f4d45d0a4e57bb5ef8b8d7a03476f8ef24ffa253d636cd824cde061227439
+mypy-boto3-cloudformation==1.34.61 \
+ --hash=sha256:33ca97567ceeb691c176d91133d7fd8bcccd63782a17fbd58bf59cc2fbfc3945 \
+ --hash=sha256:7d3e3c7a08273723ff70f5e85ef9b7f3acd629f9aeca1032c6bb541b039e9b47
# via boto3-stubs
mypy-boto3-ecr==1.34.0 \
--hash=sha256:3346c02c22b16068c9acc67d990e32060bf7cdaea5f3d43c50e44308fbbc3439 \
@@ -469,9 +469,9 @@ networkx==3.2.1 \
--hash=sha256:9f1bb5cf3409bf324e0a722c20bdb4c20ee39bf1c30ce8ae499c8502b0b5e0c6 \
--hash=sha256:f18c69adc97877c42332c170849c96cefa91881c99a7cb3e95b7c659ebdc1ec2
# via cfn-lint
-packaging==23.2 \
- --hash=sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5 \
- --hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7
+packaging==24.0 \
+ --hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \
+ --hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9
# via docker
pbr==6.0.0 \
--hash=sha256:4a7317d5e3b17a3dccb6a8cfe67dab65b20551404c52c8ed41279fa4f0cb4cda \
@@ -572,9 +572,9 @@ pygments==2.17.2 \
--hash=sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c \
--hash=sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367
# via rich
-pyopenssl==24.0.0 \
- --hash=sha256:6aa33039a93fffa4563e655b61d11364d01264be8ccb49906101e02a334530bf \
- --hash=sha256:ba07553fb6fd6a7a2259adb9b84e12302a9a8a75c44046e8bb5d3e5ee887e3c3
+pyopenssl==24.1.0 \
+ --hash=sha256:17ed5be5936449c5418d1cd269a1a9e9081bc54c17aed272b45856a3d3dc86ad \
+ --hash=sha256:cabed4bfaa5df9f1a16c0ef64a0cb65318b5cd077a7eda7d6970131ca2f41a6f
# via aws-sam-cli (setup.py)
python-dateutil==2.9.0.post0 \
--hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \
@@ -958,9 +958,9 @@ types-awscrt==0.20.5 \
--hash=sha256:61811bbf4de95248939f9276a434be93d2b95f6ccfe8aa94e56999e9778cfcc2 \
--hash=sha256:79d5bfb01f64701b6cf442e89a37d9c4dc6dbb79a46f2f611739b2418d30ecfd
# via botocore-stubs
-types-python-dateutil==2.8.19.20240106 \
- --hash=sha256:1f8db221c3b98e6ca02ea83a58371b22c374f42ae5bbdf186db9c9a76581459f \
- --hash=sha256:efbbdc54590d0f16152fa103c9879c7d4a00e82078f6e2cf01769042165acaa2
+types-python-dateutil==2.8.19.20240311 \
+ --hash=sha256:51178227bbd4cbec35dc9adffbf59d832f20e09842d7dcb8c73b169b8780b7cb \
+ --hash=sha256:ef813da0809aca76472ca88807addbeea98b19339aebe56159ae2f4b4f70857a
# via arrow
types-s3transfer==0.10.0 \
--hash=sha256:35e4998c25df7f8985ad69dedc8e4860e8af3b43b7615e940d53c00d413bdc69 \
@@ -1041,9 +1041,9 @@ werkzeug==3.0.1 \
--hash=sha256:507e811ecea72b18a404947aded4b3390e1db8f826b494d76550ef45bb3b1dcc \
--hash=sha256:90a285dc0e42ad56b34e696398b8122ee4c681833fb35b8334a095d82c56da10
# via flask
-wheel==0.42.0 \
- --hash=sha256:177f9c9b0d45c47873b619f5b650346d632cdc35fb5e4d25058e09c9e581433d \
- --hash=sha256:c45be39f7882c9d34243236f2d63cbd58039e360f85d0913425fbd7ceea617a8
+wheel==0.43.0 \
+ --hash=sha256:465ef92c69fa5c5da2d1cf8ac40559a8c940886afcef87dcf14b9470862f1d85 \
+ --hash=sha256:55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81
# via aws-lambda-builders
# The following packages are considered to be unsafe in a requirements file:
diff --git a/samcli/__init__.py b/samcli/__init__.py
index 37c5ab641b..c467d927d1 100644
--- a/samcli/__init__.py
+++ b/samcli/__init__.py
@@ -2,4 +2,4 @@
SAM CLI version
"""
-__version__ = "1.112.0"
+__version__ = "1.113.0"
diff --git a/samcli/commands/local/cli_common/invoke_context.py b/samcli/commands/local/cli_common/invoke_context.py
index 9255761143..20b30f6744 100644
--- a/samcli/commands/local/cli_common/invoke_context.py
+++ b/samcli/commands/local/cli_common/invoke_context.py
@@ -393,10 +393,13 @@ def local_lambda_runner(self) -> LocalLambdaRunner:
if self._local_lambda_runner:
return self._local_lambda_runner
+ real_path = str(os.path.dirname(os.path.abspath(self._template_file)))
+
self._local_lambda_runner = LocalLambdaRunner(
local_runtime=self.lambda_runtime,
function_provider=self._function_provider,
cwd=self.get_cwd(),
+ real_path=real_path,
aws_profile=self._aws_profile,
aws_region=self._aws_region,
env_vars_values=self._env_vars_value,
diff --git a/samcli/commands/local/lib/local_lambda.py b/samcli/commands/local/lib/local_lambda.py
index e2d0e80b9e..2996b1f187 100644
--- a/samcli/commands/local/lib/local_lambda.py
+++ b/samcli/commands/local/lib/local_lambda.py
@@ -45,6 +45,7 @@ def __init__(
local_runtime: LambdaRuntime,
function_provider: SamFunctionProvider,
cwd: str,
+ real_path: str,
aws_profile: Optional[str] = None,
aws_region: Optional[str] = None,
env_vars_values: Optional[Dict[Any, Any]] = None,
@@ -72,6 +73,7 @@ def __init__(
self.local_runtime = local_runtime
self.provider = function_provider
self.cwd = cwd
+ self.real_path = real_path
self.aws_profile = aws_profile
self.aws_region = aws_region
self.env_vars_values = env_vars_values or {}
@@ -195,9 +197,12 @@ def get_invoke_config(self, function: Function) -> FunctionConfig:
env_vars = self._make_env_vars(function)
code_abs_path = None
+ code_real_path = None
if function.packagetype == ZIP:
code_abs_path = resolve_code_path(self.cwd, function.codeuri)
LOG.debug("Resolved absolute path to code is %s", code_abs_path)
+ code_real_path = resolve_code_path(self.real_path, function.codeuri)
+ LOG.debug("Resolved real code path to %s", code_real_path)
function_timeout = function.timeout
@@ -222,6 +227,7 @@ def get_invoke_config(self, function: Function) -> FunctionConfig:
timeout=function_timeout,
env_vars=env_vars,
runtime_management_config=function.runtime_management_config,
+ code_real_path=code_real_path,
)
def _make_env_vars(self, function: Function) -> EnvironmentVariables:
diff --git a/samcli/lib/build/constants.py b/samcli/lib/build/constants.py
index 5c8b4ebb11..d9c7ccff88 100644
--- a/samcli/lib/build/constants.py
+++ b/samcli/lib/build/constants.py
@@ -14,6 +14,7 @@
"dotnetcore2.0",
"dotnetcore2.1",
"dotnetcore3.1",
+ "java8",
"python2.7",
"python3.6",
"python3.7",
diff --git a/samcli/lib/build/workflow_config.py b/samcli/lib/build/workflow_config.py
index d48adbac7c..ff6dbecb5b 100644
--- a/samcli/lib/build/workflow_config.py
+++ b/samcli/lib/build/workflow_config.py
@@ -97,7 +97,6 @@ def get_layer_subfolder(build_workflow: str) -> str:
"nodejs18.x": "nodejs",
"nodejs20.x": "nodejs",
"ruby3.2": "ruby/lib",
- "java8": "java",
"java11": "java",
"java8.al2": "java",
"java17": "java",
@@ -166,14 +165,6 @@ def get_workflow_config(
"go1.x": BasicWorkflowSelector(GO_MOD_CONFIG),
# When Maven builder exists, add to this list so we can automatically choose a builder based on the supported
# manifest
- "java8": ManifestWorkflowSelector(
- [
- # Gradle builder needs custom executable paths to find `gradlew` binary
- JAVA_GRADLE_CONFIG._replace(executable_search_paths=[code_dir, project_dir]),
- JAVA_KOTLIN_GRADLE_CONFIG._replace(executable_search_paths=[code_dir, project_dir]),
- JAVA_MAVEN_CONFIG,
- ]
- ),
"java11": ManifestWorkflowSelector(
[
# Gradle builder needs custom executable paths to find `gradlew` binary
diff --git a/samcli/lib/init/local_manifest.json b/samcli/lib/init/local_manifest.json
index 2f706700a2..07a5280aad 100644
--- a/samcli/lib/init/local_manifest.json
+++ b/samcli/lib/init/local_manifest.json
@@ -37,24 +37,6 @@
"useCaseName": "Hello World Example"
}
],
- "java8": [
- {
- "directory": "template/cookiecutter-aws-sam-hello-java-gradle",
- "displayName": "Hello World Example: Gradle",
- "dependencyManager": "gradle",
- "appTemplate": "hello-world",
- "packageType": "Zip",
- "useCaseName": "Hello World Example"
- },
- {
- "directory": "template/cookiecutter-aws-sam-hello-java-gradle",
- "displayName": "Hello World Example: Maven",
- "dependencyManager": "maven",
- "appTemplate": "hello-world",
- "packageType": "Zip",
- "useCaseName": "Hello World Example"
- }
- ],
"java8.al2": [
{
"directory": "template/cookiecutter-aws-sam-hello-java-gradle",
diff --git a/samcli/lib/utils/architecture.py b/samcli/lib/utils/architecture.py
index b420a3eaee..262f13a93c 100644
--- a/samcli/lib/utils/architecture.py
+++ b/samcli/lib/utils/architecture.py
@@ -24,7 +24,6 @@
"python3.11": [ARM64, X86_64],
"python3.12": [ARM64, X86_64],
"ruby3.2": [ARM64, X86_64],
- "java8": [X86_64],
"java8.al2": [ARM64, X86_64],
"java11": [ARM64, X86_64],
"java17": [ARM64, X86_64],
diff --git a/samcli/lib/utils/file_observer.py b/samcli/lib/utils/file_observer.py
index 230f47a7a6..9fe0cbe339 100644
--- a/samcli/lib/utils/file_observer.py
+++ b/samcli/lib/utils/file_observer.py
@@ -120,7 +120,7 @@ def _get_zip_lambda_function_paths(function_config: FunctionConfig) -> List[str]
list[str]
List of lambda functions' source code paths to be observed
"""
- code_paths = [function_config.code_abs_path]
+ code_paths = [function_config.code_real_path]
if function_config.layers:
# Non-local layers will not have a codeuri property and don't need to be observed
code_paths += [layer.codeuri for layer in function_config.layers if layer.codeuri]
diff --git a/samcli/local/common/runtime_template.py b/samcli/local/common/runtime_template.py
index d223dfe771..ba7052c49d 100644
--- a/samcli/local/common/runtime_template.py
+++ b/samcli/local/common/runtime_template.py
@@ -56,13 +56,13 @@
],
"java": [
{
- "runtimes": ["java11", "java8", "java8.al2", "java17", "java21"],
+ "runtimes": ["java11", "java8.al2", "java17", "java21"],
"dependency_manager": "maven",
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-java-maven"),
"build": True,
},
{
- "runtimes": ["java11", "java8", "java8.al2", "java17", "java21"],
+ "runtimes": ["java11", "java8.al2", "java17", "java21"],
"dependency_manager": "gradle",
"init_location": os.path.join(_templates, "cookiecutter-aws-sam-hello-java-gradle"),
"build": True,
@@ -108,7 +108,6 @@ def get_local_lambda_images_location(mapping, runtime):
"java17",
"java11",
"java8.al2",
- "java8",
# nodejs runtimes in descending order
"nodejs20.x",
"nodejs18.x",
@@ -138,7 +137,6 @@ def get_local_lambda_images_location(mapping, runtime):
"java17": "amazon/java17-base",
"java11": "amazon/java11-base",
"java8.al2": "amazon/java8.al2-base",
- "java8": "amazon/java8-base",
"nodejs20.x": "amazon/nodejs20.x-base",
"nodejs18.x": "amazon/nodejs18.x-base",
"nodejs16.x": "amazon/nodejs16.x-base",
@@ -156,7 +154,6 @@ def get_local_lambda_images_location(mapping, runtime):
# - this is why later Lambda runtimes can be mapped to earlier Schemas Code Languages
# event schema registry supports only java8, python3.6, dotnet6, and Go1 for code binding
SAM_RUNTIME_TO_SCHEMAS_CODE_LANG_MAPPING = {
- "java8": "Java8",
"java8.al2": "Java8",
"java11": "Java8",
"java17": "Java8",
diff --git a/samcli/local/docker/lambda_debug_settings.py b/samcli/local/docker/lambda_debug_settings.py
index 13bb82ccc5..7251da1851 100644
--- a/samcli/local/docker/lambda_debug_settings.py
+++ b/samcli/local/docker/lambda_debug_settings.py
@@ -53,16 +53,6 @@ def get_debug_settings(debug_port, debug_args_list, _container_env_vars, runtime
# The value of entrypoint_mapping is a callable instead of DebugSettings
# so that DebugSetting objects are not always created.
entrypoint_mapping = {
- Runtime.java8.value: lambda: DebugSettings(
- entry,
- container_env_vars={
- "_JAVA_OPTIONS": "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,quiet=y,"
- f"address={debug_port} -XX:MaxHeapSize=2834432k -XX:MaxMetaspaceSize=163840k "
- "-XX:ReservedCodeCacheSize=81920k -XX:+UseSerialGC -XX:-TieredCompilation "
- "-Djava.net.preferIPv4Stack=true -Xshare:off" + " ".join(debug_args_list),
- **_container_env_vars,
- },
- ),
Runtime.java8al2.value: lambda: DebugSettings(
entry,
container_env_vars={
diff --git a/samcli/local/docker/lambda_image.py b/samcli/local/docker/lambda_image.py
index 8ed1bfd6e4..0fd301a16e 100644
--- a/samcli/local/docker/lambda_image.py
+++ b/samcli/local/docker/lambda_image.py
@@ -42,7 +42,6 @@ class Runtime(Enum):
python311 = "python3.11"
python312 = "python3.12"
ruby32 = "ruby3.2"
- java8 = "java8"
java8al2 = "java8.al2"
java11 = "java11"
java17 = "java17"
@@ -172,7 +171,7 @@ def build(self, runtime, packagetype, image, layers, architecture, stream=None,
base_image = f"{self._INVOKE_REPO_PREFIX}/{runtime_image_tag}"
# Temporarily add a version tag to the emulation image so that we don't pull a broken image
- if platform.system().lower() == "windows" and runtime in [Runtime.go1x.value, Runtime.java8.value]:
+ if platform.system().lower() == "windows" and runtime in [Runtime.go1x.value]:
LOG.info("Falling back to a previous version of the emulation image")
base_image = f"{base_image}.2023.08.02.10"
diff --git a/samcli/local/lambdafn/config.py b/samcli/local/lambdafn/config.py
index ed9ada46e9..cadbfbd9d3 100644
--- a/samcli/local/lambdafn/config.py
+++ b/samcli/local/lambdafn/config.py
@@ -32,6 +32,7 @@ def __init__(
timeout=None,
runtime_management_config=None,
env_vars=None,
+ code_real_path=None,
):
"""
Parameters
@@ -80,6 +81,7 @@ def __init__(
self.packagetype = packagetype
self.handler = handler
self.code_abs_path = code_abs_path
+ self.code_real_path = code_real_path
self.layers = layers
self.memory = memory or self._DEFAULT_MEMORY
self.architecture = architecture
diff --git a/samcli/runtime_config.json b/samcli/runtime_config.json
index aebd1cedd0..4cdb10d532 100644
--- a/samcli/runtime_config.json
+++ b/samcli/runtime_config.json
@@ -1,3 +1,3 @@
{
- "app_template_repo_commit": "54427ad6bd6773f9b0d434a416414aa9d2982178"
+ "app_template_repo_commit": "a29a1c93b76b951f3073e479d7c126a96e18ecac"
}
diff --git a/schema/samcli.json b/schema/samcli.json
index d006978ef1..bf1b66044a 100644
--- a/schema/samcli.json
+++ b/schema/samcli.json
@@ -23,7 +23,7 @@
"properties": {
"parameters": {
"title": "Parameters for the init command",
- "description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.12, python3.11, python3.10, ruby3.2\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.",
+ "description": "Available parameters for the init command:\n* no_interactive:\nDisable interactive prompting for init parameters. (fail if any required values are missing)\n* architecture:\nArchitectures for Lambda functions.\n\nArchitectures: ['arm64', 'x86_64']\n* location:\nTemplate location (git, mercurial, http(s), zip, path).\n* runtime:\nLambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.12, python3.11, python3.10, ruby3.2\n* package_type:\nLambda deployment package type.\n\nPackage Types: Zip, Image\n* base_image:\nLambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base\n* dependency_manager:\nDependency manager for Lambda runtime.\n\nDependency managers: bundler, cli-package, gradle, maven, mod, npm, pip\n* output_dir:\nDirectory to initialize AWS SAM application.\n* name:\nName of AWS SAM Application.\n* app_template:\nIdentifier of the managed application template to be used. Alternatively, run '$sam init' without options for an interactive workflow.\n* no_input:\nDisable Cookiecutter prompting and accept default values defined in the cookiecutter config.\n* extra_context:\nOverride custom parameters in the template's cookiecutter.json configuration e.g. {\"customParam1\": \"customValue1\", \"customParam2\":\"customValue2\"}\n* tracing:\nEnable AWS X-Ray tracing for application.\n* application_insights:\nEnable CloudWatch Application Insights monitoring for application.\n* structured_logging:\nEnable Structured Logging for application.\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.\n* save_params:\nSave the parameters provided via the command line to the configuration file.",
"type": "object",
"properties": {
"no_interactive": {
@@ -48,7 +48,7 @@
"runtime": {
"title": "runtime",
"type": "string",
- "description": "Lambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, java8, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.12, python3.11, python3.10, ruby3.2",
+ "description": "Lambda runtime for application.\n\nRuntimes: dotnet8, dotnet6, go1.x, java21, java17, java11, java8.al2, nodejs20.x, nodejs18.x, nodejs16.x, provided, provided.al2, provided.al2023, python3.9, python3.8, python3.12, python3.11, python3.10, ruby3.2",
"enum": [
"dotnet6",
"dotnet8",
@@ -56,7 +56,6 @@
"java11",
"java17",
"java21",
- "java8",
"java8.al2",
"nodejs16.x",
"nodejs18.x",
@@ -84,7 +83,7 @@
"base_image": {
"title": "base_image",
"type": "string",
- "description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base",
+ "description": "Lambda base image for deploying IMAGE based package type.\n\nBase images: amazon/dotnet6-base, amazon/dotnet8-base, amazon/go-provided.al2-base, amazon/go-provided.al2023-base, amazon/go1.x-base, amazon/java11-base, amazon/java17-base, amazon/java21-base, amazon/java8.al2-base, amazon/nodejs16.x-base, amazon/nodejs18.x-base, amazon/nodejs20.x-base, amazon/python3.10-base, amazon/python3.11-base, amazon/python3.12-base, amazon/python3.8-base, amazon/python3.9-base, amazon/ruby3.2-base",
"enum": [
"amazon/dotnet6-base",
"amazon/dotnet8-base",
@@ -94,7 +93,6 @@
"amazon/java11-base",
"amazon/java17-base",
"amazon/java21-base",
- "amazon/java8-base",
"amazon/java8.al2-base",
"amazon/nodejs16.x-base",
"amazon/nodejs18.x-base",
diff --git a/tests/integration/buildcmd/test_build_cmd.py b/tests/integration/buildcmd/test_build_cmd.py
index ed38e60b80..a5939b30c5 100644
--- a/tests/integration/buildcmd/test_build_cmd.py
+++ b/tests/integration/buildcmd/test_build_cmd.py
@@ -871,34 +871,6 @@ def _prepare_application_environment(self):
class TestBuildCommand_Java(BuildIntegJavaBase):
@parameterized.expand(
[
- (
- "java8",
- "8",
- BuildIntegJavaBase.USING_GRADLE_PATH,
- BuildIntegJavaBase.EXPECTED_FILES_PROJECT_MANIFEST_GRADLE,
- BuildIntegJavaBase.EXPECTED_GRADLE_DEPENDENCIES,
- ),
- (
- "java8",
- "8",
- BuildIntegJavaBase.USING_GRADLEW_PATH,
- BuildIntegJavaBase.EXPECTED_FILES_PROJECT_MANIFEST_GRADLE,
- BuildIntegJavaBase.EXPECTED_GRADLE_DEPENDENCIES,
- ),
- (
- "java8",
- "8",
- BuildIntegJavaBase.USING_GRADLE_KOTLIN_PATH,
- BuildIntegJavaBase.EXPECTED_FILES_PROJECT_MANIFEST_GRADLE,
- BuildIntegJavaBase.EXPECTED_GRADLE_DEPENDENCIES,
- ),
- (
- "java8",
- "8",
- BuildIntegJavaBase.USING_MAVEN_PATH,
- BuildIntegJavaBase.EXPECTED_FILES_PROJECT_MANIFEST_MAVEN,
- BuildIntegJavaBase.EXPECTED_MAVEN_DEPENDENCIES,
- ),
(
"java8.al2",
"8",
@@ -1030,34 +1002,6 @@ def test_building_java_in_container(
@parameterized.expand(
[
- (
- "java8",
- "8",
- BuildIntegJavaBase.USING_GRADLE_PATH,
- BuildIntegJavaBase.EXPECTED_FILES_PROJECT_MANIFEST_GRADLE,
- BuildIntegJavaBase.EXPECTED_GRADLE_DEPENDENCIES,
- ),
- (
- "java8",
- "8",
- BuildIntegJavaBase.USING_GRADLEW_PATH,
- BuildIntegJavaBase.EXPECTED_FILES_PROJECT_MANIFEST_GRADLE,
- BuildIntegJavaBase.EXPECTED_GRADLE_DEPENDENCIES,
- ),
- (
- "java8",
- "8",
- BuildIntegJavaBase.USING_GRADLE_KOTLIN_PATH,
- BuildIntegJavaBase.EXPECTED_FILES_PROJECT_MANIFEST_GRADLE,
- BuildIntegJavaBase.EXPECTED_GRADLE_DEPENDENCIES,
- ),
- (
- "java8",
- "8",
- BuildIntegJavaBase.USING_MAVEN_PATH,
- BuildIntegJavaBase.EXPECTED_FILES_PROJECT_MANIFEST_MAVEN,
- BuildIntegJavaBase.EXPECTED_MAVEN_DEPENDENCIES,
- ),
(
"java8.al2",
"8",
@@ -2103,8 +2047,8 @@ def test_with_wrong_builder_specified_python_runtime(self, use_container):
# runtime is chosen based off current python version.
runtime = self._get_python_version()
- # BuildMethod is set to the java8, this should cause failure.
- overrides = {"Runtime": runtime, "CodeUri": "Provided", "Handler": "main.handler", "BuildMethod": "java8"}
+ # BuildMethod is set to the java17, this should cause failure.
+ overrides = {"Runtime": runtime, "CodeUri": "Provided", "Handler": "main.handler", "BuildMethod": "java17"}
manifest_path = os.path.join(self.test_data_path, "Provided", "requirements.txt")
cmdlist = self.get_command_list(
@@ -2157,12 +2101,24 @@ class TestBuildWithDedupBuilds(DedupBuildIntegBase):
"HelloWorld::HelloWorld.SecondFunction::FunctionHandler",
"dotnet6",
),
- (False, "Java/gradlew/8", "aws.example.Hello::myHandler", "aws.example.SecondFunction::myHandler", "java8"),
+ (
+ False,
+ "Java/gradlew/8",
+ "aws.example.Hello::myHandler",
+ "aws.example.SecondFunction::myHandler",
+ "java8.al2",
+ ),
(False, "Node", "main.lambdaHandler", "main.secondLambdaHandler", "nodejs20.x"),
(False, "Python", "main.first_function_handler", "main.second_function_handler", "python3.9"),
(False, "Ruby", "app.lambda_handler", "app.second_lambda_handler", "ruby3.2"),
# container
- (True, "Java/gradlew/8", "aws.example.Hello::myHandler", "aws.example.SecondFunction::myHandler", "java8"),
+ (
+ True,
+ "Java/gradlew/8",
+ "aws.example.Hello::myHandler",
+ "aws.example.SecondFunction::myHandler",
+ "java8.al2",
+ ),
(True, "Node", "main.lambdaHandler", "main.secondLambdaHandler", "nodejs20.x"),
(True, "Python", "main.first_function_handler", "main.second_function_handler", "python3.9"),
(True, "Ruby", "app.lambda_handler", "app.second_lambda_handler", "ruby3.2"),
@@ -2276,12 +2232,24 @@ class TestBuildWithCacheBuilds(CachedBuildIntegBase):
"HelloWorld::HelloWorld.SecondFunction::FunctionHandler",
"dotnet6",
),
- (False, "Java/gradlew/8", "aws.example.Hello::myHandler", "aws.example.SecondFunction::myHandler", "java8"),
+ (
+ False,
+ "Java/gradlew/8",
+ "aws.example.Hello::myHandler",
+ "aws.example.SecondFunction::myHandler",
+ "java8.al2",
+ ),
(False, "Node", "main.lambdaHandler", "main.secondLambdaHandler", "nodejs20.x"),
(False, "Python", "main.first_function_handler", "main.second_function_handler", "python3.9"),
(False, "Ruby", "app.lambda_handler", "app.second_lambda_handler", "ruby3.2"),
# container
- (True, "Java/gradlew/8", "aws.example.Hello::myHandler", "aws.example.SecondFunction::myHandler", "java8"),
+ (
+ True,
+ "Java/gradlew/8",
+ "aws.example.Hello::myHandler",
+ "aws.example.SecondFunction::myHandler",
+ "java8.al2",
+ ),
(True, "Node", "main.lambdaHandler", "main.secondLambdaHandler", "nodejs20.x"),
(True, "Python", "main.first_function_handler", "main.second_function_handler", "python3.9"),
(True, "Ruby", "app.lambda_handler", "app.second_lambda_handler", "ruby3.2"),
@@ -2455,12 +2423,24 @@ class TestParallelBuilds(DedupBuildIntegBase):
"HelloWorld::HelloWorld.SecondFunction::FunctionHandler",
"dotnet6",
),
- (False, "Java/gradlew/8", "aws.example.Hello::myHandler", "aws.example.SecondFunction::myHandler", "java8"),
+ (
+ False,
+ "Java/gradlew/8",
+ "aws.example.Hello::myHandler",
+ "aws.example.SecondFunction::myHandler",
+ "java8.al2",
+ ),
(False, "Node", "main.lambdaHandler", "main.secondLambdaHandler", "nodejs20.x"),
(False, "Python", "main.first_function_handler", "main.second_function_handler", "python3.9"),
(False, "Ruby", "app.lambda_handler", "app.second_lambda_handler", "ruby3.2"),
# container
- (True, "Java/gradlew/8", "aws.example.Hello::myHandler", "aws.example.SecondFunction::myHandler", "java8"),
+ (
+ True,
+ "Java/gradlew/8",
+ "aws.example.Hello::myHandler",
+ "aws.example.SecondFunction::myHandler",
+ "java8.al2",
+ ),
(True, "Node", "main.lambdaHandler", "main.secondLambdaHandler", "nodejs20.x"),
(True, "Python", "main.first_function_handler", "main.second_function_handler", "python3.9"),
(True, "Ruby", "app.lambda_handler", "app.second_lambda_handler", "ruby3.2"),
diff --git a/tests/integration/init/test_init_command.py b/tests/integration/init/test_init_command.py
index fc5970a157..76000edf61 100644
--- a/tests/integration/init/test_init_command.py
+++ b/tests/integration/init/test_init_command.py
@@ -132,7 +132,7 @@ def test_init_command_java_maven(self):
get_sam_command(),
"init",
"--runtime",
- "java8",
+ "java21",
"--dependency-manager",
"maven",
"--app-template",
@@ -164,7 +164,7 @@ def test_init_command_java_gradle(self):
get_sam_command(),
"init",
"--runtime",
- "java8",
+ "java21",
"--dependency-manager",
"gradle",
"--app-template",
@@ -228,7 +228,7 @@ def test_init_command_with_extra_context_parameter(self):
get_sam_command(),
"init",
"--runtime",
- "java8",
+ "java21",
"--dependency-manager",
"maven",
"--app-template",
diff --git a/tests/integration/local/invoke/runtimes/test_with_runtime_zips.py b/tests/integration/local/invoke/runtimes/test_with_runtime_zips.py
index 751474b64b..7d8f2413a4 100644
--- a/tests/integration/local/invoke/runtimes/test_with_runtime_zips.py
+++ b/tests/integration/local/invoke/runtimes/test_with_runtime_zips.py
@@ -33,7 +33,7 @@ def setUp(self):
def tearDown(self):
os.remove(self.events_file_path)
- @parameterized.expand([param("Go1xFunction"), param("Java8Function")])
+ @parameterized.expand([param("Go1xFunction"), param("Java21Function")])
@pytest.mark.timeout(timeout=300, method="thread")
def test_runtime_zip(self, function_name):
command_list = InvokeIntegBase.get_command_list(
diff --git a/tests/integration/testdata/buildcmd/template-java-maven-with-layers.yaml b/tests/integration/testdata/buildcmd/template-java-maven-with-layers.yaml
index 14fd2a0c90..38b2ed760d 100644
--- a/tests/integration/testdata/buildcmd/template-java-maven-with-layers.yaml
+++ b/tests/integration/testdata/buildcmd/template-java-maven-with-layers.yaml
@@ -11,7 +11,7 @@ Resources:
Properties:
CodeUri: Java/maven-with-layer/HelloWorldFunction
Handler: helloworld.App::handleRequest
- Runtime: java8
+ Runtime: java17
MemorySize: 512
Layers:
- !Ref HelloWorldLayer
@@ -21,7 +21,7 @@ Resources:
Properties:
ContentUri: Java/maven-with-layer/HelloWorldLayer
CompatibleRuntimes:
- - java8
+ - java17
Metadata:
- BuildMethod: java8
+ BuildMethod: java17
BuildArchitecture: x86_64
diff --git a/tests/integration/testdata/invoke/credential_tests/incontainer/java8/pom.xml b/tests/integration/testdata/invoke/credential_tests/incontainer/java21/pom.xml
similarity index 83%
rename from tests/integration/testdata/invoke/credential_tests/incontainer/java8/pom.xml
rename to tests/integration/testdata/invoke/credential_tests/incontainer/java21/pom.xml
index 09f44bf292..f9009a45d2 100644
--- a/tests/integration/testdata/invoke/credential_tests/incontainer/java8/pom.xml
+++ b/tests/integration/testdata/invoke/credential_tests/incontainer/java21/pom.xml
@@ -7,25 +7,25 @@
jar
A sample STS App created for SAM CLI.
- 1.8
- 1.8
+ 21
+ 21
com.amazonaws
aws-lambda-java-core
- 1.2.0
+ 1.2.2
com.amazonaws
aws-lambda-java-events
- 3.1.0
+ 3.11.0
com.amazonaws
aws-java-sdk-sts
- 1.11.908
+ 1.12.676
@@ -34,7 +34,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.1.1
+ 3.2.4
@@ -48,4 +48,4 @@
-
+
\ No newline at end of file
diff --git a/tests/integration/testdata/invoke/credential_tests/incontainer/java8/src/main/java/sts/App.java b/tests/integration/testdata/invoke/credential_tests/incontainer/java21/src/main/java/sts/App.java
similarity index 100%
rename from tests/integration/testdata/invoke/credential_tests/incontainer/java8/src/main/java/sts/App.java
rename to tests/integration/testdata/invoke/credential_tests/incontainer/java21/src/main/java/sts/App.java
diff --git a/tests/integration/testdata/invoke/credential_tests/incontainer/template.yaml b/tests/integration/testdata/invoke/credential_tests/incontainer/template.yaml
index 378460c682..a3cf574ed2 100644
--- a/tests/integration/testdata/invoke/credential_tests/incontainer/template.yaml
+++ b/tests/integration/testdata/invoke/credential_tests/incontainer/template.yaml
@@ -13,7 +13,7 @@ Resources:
Properties:
CodeUri: java8
Handler: sts.App::handleRequest
- Runtime: java8
+ Runtime: java8.al2
MemorySize: 1024
PythonStsExample:
Type: AWS::Serverless::Function
diff --git a/tests/integration/testdata/invoke/runtimes/java8/pom.xml b/tests/integration/testdata/invoke/runtimes/java21/pom.xml
similarity index 84%
rename from tests/integration/testdata/invoke/runtimes/java8/pom.xml
rename to tests/integration/testdata/invoke/runtimes/java21/pom.xml
index 60aba8fb29..15174a8917 100644
--- a/tests/integration/testdata/invoke/runtimes/java8/pom.xml
+++ b/tests/integration/testdata/invoke/runtimes/java21/pom.xml
@@ -7,20 +7,20 @@
jar
A sample Hello World created for SAM CLI.
- 1.8
- 1.8
+ 21
+ 21
com.amazonaws
aws-lambda-java-core
- 1.2.0
+ 1.2.2
junit
junit
- 4.12
+ 4.13.2
test
@@ -30,7 +30,7 @@
org.apache.maven.plugins
maven-shade-plugin
- 3.1.1
+ 3.2.4
@@ -44,4 +44,4 @@
-
+
\ No newline at end of file
diff --git a/tests/integration/testdata/invoke/runtimes/java8/src/main/java/helloworld/App.java b/tests/integration/testdata/invoke/runtimes/java21/src/main/java/helloworld/App.java
similarity index 100%
rename from tests/integration/testdata/invoke/runtimes/java8/src/main/java/helloworld/App.java
rename to tests/integration/testdata/invoke/runtimes/java21/src/main/java/helloworld/App.java
diff --git a/tests/integration/testdata/invoke/runtimes/java8/target/HelloWorld-1.0.jar b/tests/integration/testdata/invoke/runtimes/java21/target/HelloWorld-1.0.jar
similarity index 100%
rename from tests/integration/testdata/invoke/runtimes/java8/target/HelloWorld-1.0.jar
rename to tests/integration/testdata/invoke/runtimes/java21/target/HelloWorld-1.0.jar
diff --git a/tests/integration/testdata/invoke/runtimes/template.yaml b/tests/integration/testdata/invoke/runtimes/template.yaml
index 329ecb5e54..0f412d148a 100644
--- a/tests/integration/testdata/invoke/runtimes/template.yaml
+++ b/tests/integration/testdata/invoke/runtimes/template.yaml
@@ -10,12 +10,12 @@ Resources:
CodeUri: ./go1.x/main.zip
Timeout: 300
- Java8Function:
+ Java21Function:
Type: AWS::Serverless::Function
Properties:
Handler: helloworld.App::handleRequest
- Runtime: java8
- CodeUri: ./java8/target/HelloWorld-1.0.jar
+ Runtime: java21
+ CodeUri: ./java21/target/HelloWorld-1.0.jar
Timeout: 300
CustomBashFunction:
diff --git a/tests/integration/testdata/sync/infra/before/Java/HelloWorldFunction/pom.xml b/tests/integration/testdata/sync/infra/before/Java/HelloWorldFunction/pom.xml
index 6c18c4e84e..1d042cc6a4 100644
--- a/tests/integration/testdata/sync/infra/before/Java/HelloWorldFunction/pom.xml
+++ b/tests/integration/testdata/sync/infra/before/Java/HelloWorldFunction/pom.xml
@@ -7,8 +7,8 @@
jar
A sample Hello World created for SAM CLI.
- 8
- 8
+ 21
+ 21
diff --git a/tests/integration/testdata/sync/infra/before/Java/HelloWorldLayer/pom.xml b/tests/integration/testdata/sync/infra/before/Java/HelloWorldLayer/pom.xml
index 637bd8fa44..d6dc9a1a02 100644
--- a/tests/integration/testdata/sync/infra/before/Java/HelloWorldLayer/pom.xml
+++ b/tests/integration/testdata/sync/infra/before/Java/HelloWorldLayer/pom.xml
@@ -7,8 +7,8 @@
jar
A sample Hello World created for SAM CLI.
- 8
- 8
+ 17
+ 17
diff --git a/tests/integration/testdata/sync/infra/template-java.yaml b/tests/integration/testdata/sync/infra/template-java.yaml
index a7b75ff016..32e3c77ff3 100644
--- a/tests/integration/testdata/sync/infra/template-java.yaml
+++ b/tests/integration/testdata/sync/infra/template-java.yaml
@@ -16,7 +16,7 @@ Resources:
Properties:
CodeUri: before/Java/HelloWorldFunction
Handler: helloworld.App::handleRequest
- Runtime: java8
+ Runtime: java21
MemorySize: 512
Layers:
- !Ref HelloWorldLayer
@@ -27,7 +27,7 @@ Resources:
LayerName: !Ref HelloWorldLayerName
ContentUri: before/Java/HelloWorldLayer
CompatibleRuntimes:
- - java8
+ - java21
Metadata:
- BuildMethod: java8
+ BuildMethod: java21
BuildArchitecture: x86_64
diff --git a/tests/integration/validate/test_validate_command.py b/tests/integration/validate/test_validate_command.py
index 6a21204384..22a7187c5f 100644
--- a/tests/integration/validate/test_validate_command.py
+++ b/tests/integration/validate/test_validate_command.py
@@ -138,7 +138,6 @@ def test_lint_supported_runtimes(self):
"java21",
"java17",
"java11",
- "java8",
"java8.al2",
"nodejs16.x",
"nodejs18.x",
diff --git a/tests/sanity-check.sh b/tests/sanity-check.sh
index 8f971dbd00..e1ef2c62f6 100755
--- a/tests/sanity-check.sh
+++ b/tests/sanity-check.sh
@@ -2,6 +2,11 @@
set -xeo pipefail
export SAM_CLI_TELEMETRY="${SAM_CLI_TELEMETRY:-0}"
+export SAM_INIT_ARCH="${SAM_INIT_ARCH:-x86_64}"
+export SAM_INIT_RUNTIME="${SAM_INIT_RUNTIME:-python3.11}"
+export SAM_INIT_DEPENDENCY_MANAGER="${SAM_INIT_DEPENDENCY_MANAGER:-pip}"
+export SAM_INIT_APP_TEMPLATE="${SAM_INIT_APP_TEMPLATE:-hello-world}"
+export SAM_INIT_PACKAGE_TYPE="${SAM_INIT_PACKAGE_TYPE:-Zip}"
if [ "$CI_OVERRIDE" = "1" ]; then
sam_binary="sam-beta"
@@ -37,7 +42,7 @@ fi
echo "Starting testing sam binary"
rm -rf sam-app-testing
-"$sam_binary" init --no-interactive -n sam-app-testing --dependency-manager mod --runtime go1.x --app-template hello-world --package-type Zip --architecture x86_64
+"$sam_binary" init --no-interactive -n sam-app-testing --dependency-manager "$SAM_INIT_DEPENDENCY_MANAGER" --runtime "$SAM_INIT_RUNTIME" --app-template "$SAM_INIT_APP_TEMPLATE" --package-type "$SAM_INIT_PACKAGE_TYPE" --architecture "$SAM_INIT_ARCH"
cd sam-app-testing
GOFLAGS="-buildvcs=false" "$sam_binary" build
"$sam_binary" validate
diff --git a/tests/smoke/templates/sar/cfn-nag-pipeline-template.yaml b/tests/smoke/templates/sar/cfn-nag-pipeline-template.yaml
index eb931cf986..e07bd4f8d0 100644
--- a/tests/smoke/templates/sar/cfn-nag-pipeline-template.yaml
+++ b/tests/smoke/templates/sar/cfn-nag-pipeline-template.yaml
@@ -40,6 +40,6 @@ Resources:
CodeUri:
Bucket: <%REPO_BUCKET%>
Key: 3f2189f9-d086-457b-81a8-a68b4cca82dd
- Runtime: java8
+ Runtime: java21
MemorySize: 1024
Transform: AWS::Serverless-2016-10-31
diff --git a/tests/smoke/templates/sar/ffmpeg-lambda-layer-template.yaml b/tests/smoke/templates/sar/ffmpeg-lambda-layer-template.yaml
index ce21275b32..8aa4e97cd3 100644
--- a/tests/smoke/templates/sar/ffmpeg-lambda-layer-template.yaml
+++ b/tests/smoke/templates/sar/ffmpeg-lambda-layer-template.yaml
@@ -14,7 +14,7 @@ Resources:
- nodejs18.x
- python3.9
- ruby3.2
- - java8
+ - java21
- go1.x
ContentUri:
Bucket: <%REPO_BUCKET%>
diff --git a/tests/unit/commands/init/test_cli.py b/tests/unit/commands/init/test_cli.py
index f1cbc55480..3825c30200 100644
--- a/tests/unit/commands/init/test_cli.py
+++ b/tests/unit/commands/init/test_cli.py
@@ -589,7 +589,7 @@ def test_init_cli_with_extra_context_not_overriding_default_parameter(
name=self.name,
app_template=self.app_template,
no_input=self.no_input,
- extra_context='{"project_name": "my_project", "runtime": "java8", "schema_name":"events", "schema_type": "aws"}',
+ extra_context='{"project_name": "my_project", "runtime": "java17", "schema_name":"events", "schema_type": "aws"}',
tracing=False,
application_insights=False,
structured_logging=False,
@@ -635,7 +635,7 @@ def test_init_cli_with_extra_context_input_as_wrong_json_raises_exception(self,
name=self.name,
app_template=self.app_template,
no_input=self.no_input,
- extra_context='{"project_name", "my_project", "runtime": "java8", "schema_name":"events", "schema_type": "aws"}',
+ extra_context='{"project_name", "my_project", "runtime": "java8.al2", "schema_name":"events", "schema_type": "aws"}',
tracing=False,
application_insights=False,
structured_logging=False,
@@ -651,7 +651,7 @@ def test_init_cli_must_set_default_context_when_location_is_provided(self, gener
location="custom location",
pt_explicit=self.pt_explicit,
package_type=self.package_type,
- runtime="java8",
+ runtime="java8.al2",
architecture=X86_64,
base_image=self.base_image,
dependency_manager=None,
@@ -669,7 +669,7 @@ def test_init_cli_must_set_default_context_when_location_is_provided(self, gener
generate_project_patch.assert_called_once_with(
"custom location",
ZIP,
- "java8",
+ "java8.al2",
None,
".",
"test-project",
@@ -677,7 +677,7 @@ def test_init_cli_must_set_default_context_when_location_is_provided(self, gener
{
"schema_name": "events",
"schema_type": "aws",
- "runtime": "java8",
+ "runtime": "java8.al2",
"project_name": "test-project",
"architectures": {"value": [X86_64]},
},
@@ -740,7 +740,7 @@ def test_init_cli_must_only_set_passed_runtime_when_location_is_provided(self, g
location="custom location",
pt_explicit=self.pt_explicit,
package_type=self.package_type,
- runtime="java8",
+ runtime="java8.al2",
architecture=ARM64,
base_image=self.base_image,
dependency_manager=None,
@@ -758,7 +758,7 @@ def test_init_cli_must_only_set_passed_runtime_when_location_is_provided(self, g
generate_project_patch.assert_called_once_with(
"custom location",
ZIP,
- "java8",
+ "java8.al2",
None,
".",
None,
@@ -766,7 +766,7 @@ def test_init_cli_must_only_set_passed_runtime_when_location_is_provided(self, g
{
"schema_name": "events",
"schema_type": "aws",
- "runtime": "java8",
+ "runtime": "java8.al2",
"architectures": {"value": [ARM64]},
},
False,
@@ -980,7 +980,7 @@ def test_init_cli_int_with_image_app_template(
):
init_options_from_manifest_mock.return_value = [
{
- "directory": "java8-image/cookiecutter-aws-sam-hello-java-maven-lambda-image",
+ "directory": "java8.al2-image/cookiecutter-aws-sam-hello-java-maven-lambda-image",
"displayName": "Hello World Lambda Image Example: Maven",
"dependencyManager": "maven",
"appTemplate": "hello-world-lambda-image",
@@ -991,10 +991,10 @@ def test_init_cli_int_with_image_app_template(
get_preprocessed_manifest_mock.return_value = {
"Serverless API": {
- "java8": {
+ "java8.al2": {
"Image": [
{
- "directory": "java8-image/cookiecutter-aws-sam-hello-java-maven-lambda-image",
+ "directory": "java8.al2-image/cookiecutter-aws-sam-hello-java-maven-lambda-image",
"displayName": "Hello World Lambda Image Example: Maven",
"dependencyManager": "maven",
"appTemplate": "hello-world-lambda-image",
@@ -1010,7 +1010,7 @@ def test_init_cli_int_with_image_app_template(
# 2: AWS Quick Start Templates
# 1: Serverless API - Use case
- # Java8
+ # Java8.al2
# Package type - Image
# Hello World Lambda Image Example: Maven
# test-project: response to name
@@ -1028,12 +1028,12 @@ def test_init_cli_int_with_image_app_template(
generate_project_patch.assert_called_once_with(
ANY,
IMAGE,
- "java8",
+ "java8.al2",
"maven",
".",
"test-project",
True,
- {"project_name": "test-project", "runtime": "java8", "architectures": {"value": [X86_64]}},
+ {"project_name": "test-project", "runtime": "java8.al2", "architectures": {"value": [X86_64]}},
False,
False,
True,
@@ -2325,7 +2325,7 @@ def test_init_fails_unsupported_dep_mgr_for_runtime(self, git_repo_clone_mock, c
location=self.location,
pt_explicit=self.pt_explicit,
package_type=self.package_type,
- runtime="java8",
+ runtime="java8.al2",
base_image=self.base_image,
dependency_manager="pip",
output_dir=None,
@@ -2339,7 +2339,7 @@ def test_init_fails_unsupported_dep_mgr_for_runtime(self, git_repo_clone_mock, c
structured_logging=False,
)
expected_error_message = (
- "Lambda Runtime java8 and dependency manager pip does not have an available initialization template."
+ "Lambda Runtime java8.al2 and dependency manager pip does not have an available initialization template."
)
self.assertEqual(str(ex.exception), expected_error_message)
@@ -2774,7 +2774,7 @@ def does_template_meet_filter_criteria(self):
self.assertFalse(template_does_not_meet_filter_criteria(app_template, None, None, template1))
template2 = {
- "directory": "java8/cookiecutter-aws-sam-hello-nodejs",
+ "directory": "java8.al2/cookiecutter-aws-sam-hello-nodejs",
"displayName": "Hello World Example",
"dependencyManager": "Gradle",
"appTemplate": "hello-world",
@@ -2785,7 +2785,7 @@ def does_template_meet_filter_criteria(self):
self.assertTrue(template_does_not_meet_filter_criteria(app_template, package_type, None, template2))
template3 = {
- "directory": "java8/cookiecutter-aws-sam-hello-nodejs",
+ "directory": "java8.al2/cookiecutter-aws-sam-hello-nodejs",
"displayName": "Hello World Example",
"dependencyManager": "Gradle",
"appTemplate": "hello-world",
diff --git a/tests/unit/commands/local/cli_common/test_invoke_context.py b/tests/unit/commands/local/cli_common/test_invoke_context.py
index fce1c37f23..ccdfebaae7 100644
--- a/tests/unit/commands/local/cli_common/test_invoke_context.py
+++ b/tests/unit/commands/local/cli_common/test_invoke_context.py
@@ -625,6 +625,7 @@ def test_must_create_runner(
local_runtime=runtime_mock,
function_provider=ANY,
cwd=cwd,
+ real_path=ANY,
debug_context=None,
env_vars_values=ANY,
aws_profile="profile",
@@ -704,6 +705,7 @@ def test_must_create_runner_using_warm_containers(
local_runtime=runtime_mock,
function_provider=ANY,
cwd=cwd,
+ real_path=ANY,
debug_context=None,
env_vars_values=ANY,
aws_profile="profile",
@@ -789,6 +791,7 @@ def test_must_create_runner_with_container_host_option(
local_runtime=runtime_mock,
function_provider=ANY,
cwd=cwd,
+ real_path=ANY,
debug_context=None,
env_vars_values=ANY,
aws_profile="profile",
@@ -874,6 +877,7 @@ def test_must_create_runner_with_extra_hosts_option(
local_runtime=runtime_mock,
function_provider=ANY,
cwd=cwd,
+ real_path=ANY,
debug_context=None,
env_vars_values=ANY,
aws_profile="profile",
@@ -961,6 +965,7 @@ def test_must_create_runner_with_invoke_image_option(
local_runtime=runtime_mock,
function_provider=ANY,
cwd=cwd,
+ real_path=ANY,
debug_context=None,
env_vars_values=ANY,
aws_profile="profile",
diff --git a/tests/unit/commands/local/lib/test_local_lambda.py b/tests/unit/commands/local/lib/test_local_lambda.py
index 755e6acd0c..a68cfe4a69 100644
--- a/tests/unit/commands/local/lib/test_local_lambda.py
+++ b/tests/unit/commands/local/lib/test_local_lambda.py
@@ -37,11 +37,13 @@ def setUp(self):
self.debug_context = None
self.aws_profile = "myprofile"
self.aws_region = "region"
+ self.real_path = "/real/path"
self.local_lambda = LocalLambdaRunner(
self.runtime_mock,
self.function_provider_mock,
self.cwd,
+ real_path=self.real_path,
env_vars_values=self.env_vars_values,
debug_context=self.debug_context,
aws_profile=self.aws_profile,
@@ -184,6 +186,7 @@ def setUp(self):
self.runtime_mock = Mock()
self.function_provider_mock = Mock()
self.cwd = "/my/current/working/directory"
+ self.real_path = "/real/path"
self.debug_context = None
self.aws_profile = "myprofile"
self.aws_region = "region"
@@ -195,6 +198,7 @@ def setUp(self):
self.runtime_mock,
self.function_provider_mock,
self.cwd,
+ real_path=self.real_path,
env_vars_values=self.env_vars_values,
debug_context=self.debug_context,
)
@@ -387,11 +391,13 @@ def setUp(self):
self.debug_context = None
self.env_vars_values = {}
self.aws_region = "region"
+ self.real_path = "/real/path"
self.local_lambda = LocalLambdaRunner(
self.runtime_mock,
self.function_provider_mock,
self.cwd,
+ real_path=self.real_path,
env_vars_values=self.env_vars_values,
debug_context=self.debug_context,
)
@@ -457,9 +463,10 @@ def test_must_work(self, FunctionConfigMock, is_debugging_mock, resolve_code_pat
architecture=ARM64,
full_path=function.full_path,
runtime_management_config=function.runtime_management_config,
+ code_real_path=codepath,
)
- resolve_code_path_patch.assert_called_with(self.cwd, function.codeuri)
+ resolve_code_path_patch.assert_called_with(self.real_path, function.codeuri)
self.local_lambda._make_env_vars.assert_called_with(function)
@patch("samcli.commands.local.lib.local_lambda.resolve_code_path")
@@ -526,9 +533,10 @@ def test_timeout_set_to_max_during_debugging(
architecture=X86_64,
full_path=function.full_path,
runtime_management_config=function.runtime_management_config,
+ code_real_path=codepath,
)
- resolve_code_path_patch.assert_called_with(self.cwd, "codeuri")
+ resolve_code_path_patch.assert_called_with(self.real_path, "codeuri")
self.local_lambda._make_env_vars.assert_called_with(function)
@@ -541,11 +549,13 @@ def setUp(self):
self.aws_profile = "myprofile"
self.aws_region = "region"
self.env_vars_values = {}
+ self.real_path = "/real/path"
self.local_lambda = LocalLambdaRunner(
self.runtime_mock,
self.function_provider_mock,
self.cwd,
+ real_path=self.real_path,
env_vars_values=self.env_vars_values,
debug_context=self.debug_context,
)
@@ -729,11 +739,13 @@ def setUp(self):
self.env_vars_values = {}
self.container_host = "localhost"
self.container_host_interface = "127.0.0.1"
+ self.real_path = "/real/path"
self.local_lambda = LocalLambdaRunner(
self.runtime_mock,
self.function_provider_mock,
self.cwd,
+ real_path=self.real_path,
env_vars_values=self.env_vars_values,
debug_context=self.debug_context,
container_host=self.container_host,
@@ -776,11 +788,13 @@ def setUp(self):
self.aws_profile = "myprofile"
self.aws_region = "region"
self.env_vars_values = {}
+ self.real_path = "/real/path"
self.local_lambda = LocalLambdaRunner(
self.runtime_mock,
self.function_provider_mock,
self.cwd,
+ real_path=self.real_path,
env_vars_values=self.env_vars_values,
debug_context=self.debug_context,
)
@@ -793,6 +807,7 @@ def test_must_be_off(self):
self.runtime_mock,
self.function_provider_mock,
self.cwd,
+ self.real_path,
env_vars_values=self.env_vars_values,
debug_context=None,
)
diff --git a/tests/unit/lib/build_module/test_workflow_config.py b/tests/unit/lib/build_module/test_workflow_config.py
index 50f5ec4db9..10b9fe0765 100644
--- a/tests/unit/lib/build_module/test_workflow_config.py
+++ b/tests/unit/lib/build_module/test_workflow_config.py
@@ -112,7 +112,11 @@ def test_must_work_for_ruby(self, runtime):
self.assertFalse(result.must_mount_with_write_in_container)
@parameterized.expand(
- [("java8", "build.gradle", "gradle"), ("java8", "build.gradle.kts", "gradle"), ("java8", "pom.xml", "maven")]
+ [
+ ("java8.al2", "build.gradle", "gradle"),
+ ("java8.al2", "build.gradle.kts", "gradle"),
+ ("java8.al2", "pom.xml", "maven"),
+ ]
)
@patch("samcli.lib.build.workflow_config.os")
def test_must_work_for_java(self, runtime, build_file, dep_manager, os_mock):
@@ -146,7 +150,7 @@ def test_must_get_workflow_for_esbuild(self):
self.assertIn(Event("BuildWorkflowUsed", "nodejs-npm-esbuild"), EventTracker.get_tracked_events())
self.assertFalse(result.must_mount_with_write_in_container)
- @parameterized.expand([("java8", "unknown.manifest")])
+ @parameterized.expand([("java8.al2", "unknown.manifest")])
@patch("samcli.lib.build.workflow_config.os")
def test_must_fail_when_manifest_not_found(self, runtime, build_file, os_mock):
os_mock.path.join.side_effect = lambda dirname, v: v
diff --git a/tests/unit/lib/schemas/test_schemas_code_manager.py b/tests/unit/lib/schemas/test_schemas_code_manager.py
index c67f5ed636..78987a2a61 100644
--- a/tests/unit/lib/schemas/test_schemas_code_manager.py
+++ b/tests/unit/lib/schemas/test_schemas_code_manager.py
@@ -10,7 +10,7 @@
class TestSchemaCodeManager(TestCase):
def setUp(self):
- self.runtime = "java8"
+ self.runtime = "java8.al2"
self.registry_name = "aws.events"
self.schema_name = "EC2InstanceChangeNotification"
self.schema_full_name = "aws.EC2InstanceChangeNotification"
@@ -76,7 +76,7 @@ def test_download_source_code_binding_when_exception_occurs(self, schemas_api_ca
def test_merge_generated_code(self, unzip_mock, json_loads_mock):
json_loads_mock.return_value = {
"project_name": "Your EventBridge Starter app",
- "runtime": "java8",
+ "runtime": "java8.al2",
"function_name": "HelloWorldFunction",
"AWS_Schema_registry": "aws.events",
"AWS_Schema_name": "EC2InstanceStateChangeNotification",
diff --git a/tests/unit/lib/utils/test_architecture.py b/tests/unit/lib/utils/test_architecture.py
index e8c777fa84..b97183862b 100644
--- a/tests/unit/lib/utils/test_architecture.py
+++ b/tests/unit/lib/utils/test_architecture.py
@@ -58,7 +58,6 @@ def test_must_pass_for_support_runtime_architecture(self, runtime, arch, package
@parameterized.expand(
[
- ("java8", ARM64),
("go1.x", ARM64),
("provided", ARM64),
]
diff --git a/tests/unit/lib/utils/test_file_observer.py b/tests/unit/lib/utils/test_file_observer.py
index 7fb76b6100..2ff0ff1dc5 100644
--- a/tests/unit/lib/utils/test_file_observer.py
+++ b/tests/unit/lib/utils/test_file_observer.py
@@ -738,21 +738,23 @@ def test_watch_ZIP_lambda_function(self):
lambda_function = Mock()
lambda_function.packagetype = ZIP
lambda_function.code_abs_path = "path1"
+ lambda_function.code_real_path = "path2"
lambda_function.layers = []
self.lambda_function_observer.watch(lambda_function)
self.assertEqual(
self.lambda_function_observer._observed_functions,
{
- ZIP: {"path1": [lambda_function]},
+ ZIP: {"path2": [lambda_function]},
IMAGE: {},
},
)
- self.file_observer_mock.watch.assert_called_with("path1")
+ self.file_observer_mock.watch.assert_called_with("path2")
def test_watch_ZIP_lambda_function_with_layers(self):
lambda_function = Mock()
lambda_function.packagetype = ZIP
lambda_function.code_abs_path = "path1"
+ lambda_function.code_real_path = "path2"
layer1_mock = Mock()
layer1_mock.codeuri = "layer1_path"
layer2_mock = Mock()
@@ -764,7 +766,7 @@ def test_watch_ZIP_lambda_function_with_layers(self):
self.lambda_function_observer._observed_functions,
{
ZIP: {
- "path1": [lambda_function],
+ "path2": [lambda_function],
"layer1_path": [lambda_function],
"layer2_path": [lambda_function],
},
@@ -774,7 +776,7 @@ def test_watch_ZIP_lambda_function_with_layers(self):
self.assertEqual(
self.file_observer_mock.watch.call_args_list,
[
- call("path1"),
+ call("path2"),
call("layer1_path"),
call("layer2_path"),
],
@@ -784,6 +786,7 @@ def test_watch_ZIP_lambda_function_with_non_local_layers(self):
lambda_function = Mock()
lambda_function.packagetype = ZIP
lambda_function.code_abs_path = "path1"
+ lambda_function.code_real_path = "path2"
layer1_mock = LayerVersion(arn="arn", codeuri="layer1_path")
layer2_mock = LayerVersion(arn="arn2", codeuri=None)
@@ -793,7 +796,7 @@ def test_watch_ZIP_lambda_function_with_non_local_layers(self):
self.lambda_function_observer._observed_functions,
{
ZIP: {
- "path1": [lambda_function],
+ "path2": [lambda_function],
"layer1_path": [lambda_function],
},
IMAGE: {},
@@ -802,7 +805,7 @@ def test_watch_ZIP_lambda_function_with_non_local_layers(self):
self.assertEqual(
self.file_observer_mock.watch.call_args_list,
[
- call("path1"),
+ call("path2"),
call("layer1_path"),
],
)
@@ -836,12 +839,14 @@ def setUp(self, ImageObserverMock, FileObserverMock):
self.zip_lambda_function1 = Mock()
self.zip_lambda_function1.packagetype = ZIP
self.zip_lambda_function1.code_abs_path = "path1"
+ self.zip_lambda_function1.code_real_path = "path1"
self.zip_lambda_function1.layers = []
self.lambda_function_observer.watch(self.zip_lambda_function1)
self.zip_lambda_function2 = Mock()
self.zip_lambda_function2.packagetype = ZIP
self.zip_lambda_function2.code_abs_path = "path2"
+ self.zip_lambda_function2.code_real_path = "path2"
layer1_mock = Mock()
layer1_mock.codeuri = "layer1_path1"
layer2_mock = Mock()
@@ -852,6 +857,7 @@ def setUp(self, ImageObserverMock, FileObserverMock):
self.zip_lambda_function3 = Mock()
self.zip_lambda_function3.packagetype = ZIP
self.zip_lambda_function3.code_abs_path = "path3"
+ self.zip_lambda_function3.code_real_path = "path3"
self.zip_lambda_function3.layers = [layer1_mock]
self.lambda_function_observer.watch(self.zip_lambda_function3)
@@ -996,12 +1002,14 @@ def setUp(self, ImageObserverMock, FileObserverMock):
self.zip_lambda_function1 = Mock()
self.zip_lambda_function1.packagetype = ZIP
self.zip_lambda_function1.code_abs_path = "path1"
+ self.zip_lambda_function1.code_real_path = "path1"
self.zip_lambda_function1.layers = []
self.lambda_function_observer.watch(self.zip_lambda_function1)
self.zip_lambda_function2 = Mock()
self.zip_lambda_function2.packagetype = ZIP
self.zip_lambda_function2.code_abs_path = "path2"
+ self.zip_lambda_function2.code_real_path = "path2"
layer1_mock = Mock()
layer1_mock.codeuri = "layer1_path1"
layer2_mock = Mock()
@@ -1012,6 +1020,7 @@ def setUp(self, ImageObserverMock, FileObserverMock):
self.zip_lambda_function3 = Mock()
self.zip_lambda_function3.packagetype = ZIP
self.zip_lambda_function3.code_abs_path = "path3"
+ self.zip_lambda_function3.code_real_path = "path3"
self.zip_lambda_function3.layers = [layer1_mock]
self.lambda_function_observer.watch(self.zip_lambda_function3)
diff --git a/tests/unit/local/docker/test_lambda_container.py b/tests/unit/local/docker/test_lambda_container.py
index 8db35a3f90..0b0841999c 100644
--- a/tests/unit/local/docker/test_lambda_container.py
+++ b/tests/unit/local/docker/test_lambda_container.py
@@ -33,7 +33,6 @@
Runtime.java21.value,
Runtime.java17.value,
Runtime.java11.value,
- Runtime.java8.value,
Runtime.java8al2.value,
Runtime.dotnet6.value,
Runtime.go1x.value,
diff --git a/tests/unit/local/docker/test_lambda_debug_settings.py b/tests/unit/local/docker/test_lambda_debug_settings.py
index 751240d94f..21e85ef129 100644
--- a/tests/unit/local/docker/test_lambda_debug_settings.py
+++ b/tests/unit/local/docker/test_lambda_debug_settings.py
@@ -6,7 +6,6 @@
from samcli.local.docker.lambda_debug_settings import DebuggingNotSupported, LambdaDebugSettings, Runtime
_DEBUG_RUNTIMES = [
- Runtime.java8,
Runtime.java8al2,
Runtime.java11,
Runtime.java17,
diff --git a/tests/unit/local/docker/test_lambda_image.py b/tests/unit/local/docker/test_lambda_image.py
index f1bdbdfcb5..346064d5e3 100644
--- a/tests/unit/local/docker/test_lambda_image.py
+++ b/tests/unit/local/docker/test_lambda_image.py
@@ -24,7 +24,6 @@ class TestRuntime(TestCase):
("python3.8", "python:3.8-x86_64"),
("python3.9", "python:3.9-x86_64"),
("ruby3.2", "ruby:3.2-x86_64"),
- ("java8", "java:8"),
("java8.al2", "java:8.al2-x86_64"),
("java11", "java:11-x86_64"),
("java17", "java:17-x86_64"),