-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update sam local invoke to support new runtime options #7885
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vicheey
requested changes
Feb 13, 2025
vicheey
approved these changes
Feb 14, 2025
valerena
reviewed
Feb 28, 2025
samcli/commands/local/invoke/cli.py
Outdated
"-r", | ||
"--runtime", | ||
type=click.Choice(get_sorted_runtimes(INIT_RUNTIMES)), | ||
help="Lambda runtime for application." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can get a better text here. I would suggest:
Lambda runtime used to invoke the function.
(in particular "function" instead of "application")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
valerena
approved these changes
Mar 1, 2025
justinmk3
pushed a commit
to aws/aws-toolkit-vscode
that referenced
this pull request
Mar 6, 2025
## Problem Customers are not able to local invoke with the runtime selected in the webview UI. Currently the runtime used is the one specified on the template. The feature was already added to SAMCLI aws/aws-sam-cli#7885. ## Solution Allows customers to change runtimes when locally invoking in the local invoke webview, without having to change it in their template and rebuilding. Under the hood, the newly added ```--runtime``` option will be appended to the ```samcli``` command.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/local/invoke
sam local invoke command
area/schema
JSON schema file
stage/needs-triage
Automatically applied to new issues and PRs, indicating they haven't been looked at.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why is this change necessary?
Enable testing Lambda functions with a different runtime than specified in the function configuration.
Test using a compatible runtime version: build artifact was in python3.13 and test runtime was python3.11.
Test using an incompatible runtime: build artifact was in python3.13 and test runtime was java11.
Mandatory Checklist
PRs will only be reviewed after checklist is complete
make pr
passesmake update-reproducible-reqs
if dependencies were changedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.