Skip to content

Commit 9611bb8

Browse files
Merge from aws/aws-sam-cli/develop
2 parents bde031e + f59ddab commit 9611bb8

27 files changed

Lines changed: 266 additions & 60 deletions

File tree

.github/workflows/closed-issue-message.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
permissions:
1010
issues: write
1111
steps:
12-
- uses: aws-actions/closed-issue-message@v1
12+
- uses: aws-actions/closed-issue-message@v2
1313
with:
1414
# These inputs are both required
1515
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/pr-labeler.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
script: |
2626
const maintainers = [
2727
'aws-sam-cli-bot',
28-
'hawflau', 'mndeveci',
29-
'mildaniel', 'marekaiv',
30-
'lucashuy', 'hnnasit', 'jysheng123', 'bentvelj', 'sidhujus', 'dependabot[bot]'
28+
'seshubaws', 'valerena',
29+
'Vandita2020', 'roger-zhangg',
30+
'mbfreder', 'vicheey', 'rachdry', 'dependabot[bot]'
3131
]
3232
if (maintainers.includes(context.payload.sender.login)) {
3333
github.rest.issues.addLabels({

requirements/base.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jmespath~=1.0.1
66
ruamel_yaml~=0.18.6
77
PyYAML~=6.0
88
cookiecutter~=2.6.0
9-
aws-sam-translator==1.94.0
9+
aws-sam-translator==1.95.0
1010
#docker minor version updates can include breaking changes. Auto update micro version only.
1111
docker~=7.1.0
1212
dateparser~=1.2
@@ -31,7 +31,7 @@ regex!=2021.10.8
3131
tzlocal==5.2
3232

3333
#Adding cfn-lint dependency for SAM validate
34-
cfn-lint~=1.22.2
34+
cfn-lint~=1.25.1
3535

3636
# Type checking boto3 objects
3737
boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray,sqs,kinesis]==1.35.71

requirements/dev.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-r pre-dev.txt
22

3-
coverage==7.6.10; python_version>="3.9"
3+
coverage==7.6.12; python_version>="3.9"
44
coverage==7.6.1; python_version<"3.9"
55
pytest-cov==6.0.0; python_version>="3.9"
66
pytest-cov==5.0.0; python_version<"3.9"
@@ -9,14 +9,14 @@ pytest-cov==5.0.0; python_version<"3.9"
99
# type checking and related stubs
1010
# mypy adds new rules in new minor versions, which could cause our PR check to fail
1111
# here we fix its version and upgrade it manually in the future
12-
mypy==1.14.1
12+
mypy==1.15.0
1313
types-pywin32==308.0.0.20250128; python_version>="3.9"
1414
types-pywin32==308.0.0.20241221; python_version<"3.9"
1515
types-PyYAML==6.0.12.20241230
1616
types-chevron==0.14.2.20250103
17-
types-psutil==6.1.0.20241221
18-
types-setuptools==75.8.0.20250210
19-
types-Pygments==2.19.0.20250107
17+
types-psutil==7.0.0.20250218
18+
types-setuptools==75.8.2.20250305
19+
types-Pygments==2.19.0.20250305
2020
types-colorama==0.4.15.20240311
2121
types-dateparser==1.2.0.20250208
2222
types-docutils==0.21.0.20241128
@@ -25,12 +25,12 @@ types-pyOpenSSL==24.1.0.20240722
2525
# lucashuy: pin `types-request` based on the Python version since newer versions of
2626
# the types require a newer version of requests, which is only installed in newer versions of Python
2727
types-requests==2.31.0.6; python_version<"3.10"
28-
types-requests==2.32.0.20241016; python_version>="3.10"
28+
types-requests==2.32.0.20250301; python_version>="3.10"
2929
types-urllib3==1.26.25.14
3030

3131
# Test requirements
3232

33-
pytest==8.3.4
33+
pytest==8.3.5
3434

3535
parameterized==0.9.0
3636
pytest-xdist==3.6.1
@@ -48,4 +48,4 @@ filelock==3.16.1; python_version<"3.9"
4848
# formatter
4949
black==24.10.0; python_version>="3.9"
5050
black==24.8.0; python_version<"3.9"
51-
psutil==6.1.1
51+
psutil==7.0.0

requirements/pre-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruff==0.9.6
1+
ruff==0.9.9

requirements/reproducible-linux.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ aws-lambda-builders==1.53.0 \
2222
--hash=sha256:ca9ddd99214aef8a113a3fcd7d7fe3951ef0e078478484f03c398a3bdee04ccb \
2323
--hash=sha256:d08bfa947fff590f1bedd16c2f4ec7722cbb8869aae80764d99215a41ff284a1
2424
# via aws-sam-cli (setup.py)
25-
aws-sam-translator==1.94.0 \
26-
--hash=sha256:100e33eeffcfa81f7c45cadeb0ee29596ce829f6b4d2745140f04fa19a41f539 \
27-
--hash=sha256:8ec258d9f7ece72ef91c81f4edb45a2db064c16844b6afac90c575893beaa391
25+
aws-sam-translator==1.95.0 \
26+
--hash=sha256:c9e0f22cbe83c768f7d20a3afb7e654bd6bfc087b387528bd48e98366b82ae40 \
27+
--hash=sha256:fd2b891fc4cbdde1e06130eaf2710de5cc74442a656b7859b3840691144494cf
2828
# via
2929
# aws-sam-cli (setup.py)
3030
# cfn-lint
@@ -129,9 +129,9 @@ cffi==1.17.1 \
129129
--hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \
130130
--hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b
131131
# via cryptography
132-
cfn-lint==1.22.2 \
133-
--hash=sha256:83b3fb9ada7caf94bc75b4bf13999371f74aae39bad92280fd8c9d114ba4006c \
134-
--hash=sha256:dd8f575f3cec51f07940fd2564a20a68377937ccac2d0c25b7f94713a7ccbad2
132+
cfn-lint==1.25.1 \
133+
--hash=sha256:717012566c6034ffa7e60fcf1b350804d093ee37589a1e91a1fd867f33a930b7 \
134+
--hash=sha256:bbf6c2d95689da466dc427217ab7ed8f3a2a4a134df70876cc63e41aaad9385a
135135
# via aws-sam-cli (setup.py)
136136
chardet==5.2.0 \
137137
--hash=sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7 \

requirements/reproducible-mac.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ aws-lambda-builders==1.53.0 \
2222
--hash=sha256:ca9ddd99214aef8a113a3fcd7d7fe3951ef0e078478484f03c398a3bdee04ccb \
2323
--hash=sha256:d08bfa947fff590f1bedd16c2f4ec7722cbb8869aae80764d99215a41ff284a1
2424
# via aws-sam-cli (setup.py)
25-
aws-sam-translator==1.94.0 \
26-
--hash=sha256:100e33eeffcfa81f7c45cadeb0ee29596ce829f6b4d2745140f04fa19a41f539 \
27-
--hash=sha256:8ec258d9f7ece72ef91c81f4edb45a2db064c16844b6afac90c575893beaa391
25+
aws-sam-translator==1.95.0 \
26+
--hash=sha256:c9e0f22cbe83c768f7d20a3afb7e654bd6bfc087b387528bd48e98366b82ae40 \
27+
--hash=sha256:fd2b891fc4cbdde1e06130eaf2710de5cc74442a656b7859b3840691144494cf
2828
# via
2929
# aws-sam-cli (setup.py)
3030
# cfn-lint
@@ -129,9 +129,9 @@ cffi==1.17.1 \
129129
--hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \
130130
--hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b
131131
# via cryptography
132-
cfn-lint==1.22.2 \
133-
--hash=sha256:83b3fb9ada7caf94bc75b4bf13999371f74aae39bad92280fd8c9d114ba4006c \
134-
--hash=sha256:dd8f575f3cec51f07940fd2564a20a68377937ccac2d0c25b7f94713a7ccbad2
132+
cfn-lint==1.25.1 \
133+
--hash=sha256:717012566c6034ffa7e60fcf1b350804d093ee37589a1e91a1fd867f33a930b7 \
134+
--hash=sha256:bbf6c2d95689da466dc427217ab7ed8f3a2a4a134df70876cc63e41aaad9385a
135135
# via aws-sam-cli (setup.py)
136136
chardet==5.2.0 \
137137
--hash=sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7 \

requirements/reproducible-win.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ aws-lambda-builders==1.53.0 \
2222
--hash=sha256:ca9ddd99214aef8a113a3fcd7d7fe3951ef0e078478484f03c398a3bdee04ccb \
2323
--hash=sha256:d08bfa947fff590f1bedd16c2f4ec7722cbb8869aae80764d99215a41ff284a1
2424
# via aws-sam-cli (setup.py)
25-
aws-sam-translator==1.94.0 \
26-
--hash=sha256:100e33eeffcfa81f7c45cadeb0ee29596ce829f6b4d2745140f04fa19a41f539 \
27-
--hash=sha256:8ec258d9f7ece72ef91c81f4edb45a2db064c16844b6afac90c575893beaa391
25+
aws-sam-translator==1.95.0 \
26+
--hash=sha256:c9e0f22cbe83c768f7d20a3afb7e654bd6bfc087b387528bd48e98366b82ae40 \
27+
--hash=sha256:fd2b891fc4cbdde1e06130eaf2710de5cc74442a656b7859b3840691144494cf
2828
# via
2929
# aws-sam-cli (setup.py)
3030
# cfn-lint
@@ -129,9 +129,9 @@ cffi==1.17.1 \
129129
--hash=sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87 \
130130
--hash=sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b
131131
# via cryptography
132-
cfn-lint==1.22.2 \
133-
--hash=sha256:83b3fb9ada7caf94bc75b4bf13999371f74aae39bad92280fd8c9d114ba4006c \
134-
--hash=sha256:dd8f575f3cec51f07940fd2564a20a68377937ccac2d0c25b7f94713a7ccbad2
132+
cfn-lint==1.25.1 \
133+
--hash=sha256:717012566c6034ffa7e60fcf1b350804d093ee37589a1e91a1fd867f33a930b7 \
134+
--hash=sha256:bbf6c2d95689da466dc427217ab7ed8f3a2a4a134df70876cc63e41aaad9385a
135135
# via aws-sam-cli (setup.py)
136136
chardet==5.2.0 \
137137
--hash=sha256:1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7 \

samcli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
SAM CLI version
33
"""
44

5-
__version__ = "1.134.0"
5+
__version__ = "1.135.0"

samcli/commands/local/invoke/cli.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
skip_prepare_infra_option,
1717
terraform_plan_file_option,
1818
)
19+
from samcli.commands.init.init_flow_helpers import get_sorted_runtimes
1920
from samcli.commands.local.cli_common.options import invoke_common_options, local_common_options
2021
from samcli.commands.local.invoke.core.command import InvokeCommand
2122
from samcli.commands.local.lib.exceptions import InvalidIntermediateImageError
2223
from samcli.lib.telemetry.metric import track_command
2324
from samcli.lib.utils.version_checker import check_newer_version
25+
from samcli.local.common.runtime_template import INIT_RUNTIMES
2426
from samcli.local.docker.exceptions import (
2527
ContainerNotStartableException,
2628
DockerContainerCreationFailedException,
@@ -65,6 +67,13 @@
6567
"is not specified, no event is assumed. Pass in the value '-' to input JSON via stdin",
6668
)
6769
@click.option("--no-event", is_flag=True, default=True, help="DEPRECATED: By default no event is assumed.", hidden=True)
70+
@click.option(
71+
"-r",
72+
"--runtime",
73+
type=click.Choice(get_sorted_runtimes(INIT_RUNTIMES)),
74+
help="Lambda runtime used to invoke the function."
75+
+ click.style(f"\n\nRuntimes: {', '.join(get_sorted_runtimes(INIT_RUNTIMES))}", bold=True),
76+
)
6877
@mount_symlinks_option
6978
@invoke_common_options
7079
@local_common_options
@@ -105,6 +114,7 @@ def cli(
105114
hook_name,
106115
skip_prepare_infra,
107116
terraform_plan_file,
117+
runtime,
108118
mount_symlinks,
109119
no_memory_limit,
110120
):
@@ -137,6 +147,7 @@ def cli(
137147
add_host,
138148
invoke_image,
139149
hook_name,
150+
runtime,
140151
mount_symlinks,
141152
no_memory_limit,
142153
) # pragma: no cover
@@ -166,6 +177,7 @@ def do_cli( # pylint: disable=R0914
166177
add_host,
167178
invoke_image,
168179
hook_name,
180+
runtime,
169181
mount_symlinks,
170182
no_mem_limit,
171183
):
@@ -221,7 +233,11 @@ def do_cli( # pylint: disable=R0914
221233
) as context:
222234
# Invoke the function
223235
context.local_lambda_runner.invoke(
224-
context.function_identifier, event=event_data, stdout=context.stdout, stderr=context.stderr
236+
context.function_identifier,
237+
event=event_data,
238+
stdout=context.stdout,
239+
stderr=context.stderr,
240+
override_runtime=runtime,
225241
)
226242

227243
except FunctionNotFound as ex:

0 commit comments

Comments
 (0)