aws-toolkit-vscode icon indicating copy to clipboard operation
aws-toolkit-vscode copied to clipboard

fix(lambda): remove version publish for every lambda deploy

Open reedham-aws opened this issue 3 weeks ago • 5 comments

Problem

Fixes #8372.

Currently, a deploy done using the lambda client will create a new published version of the function without any customer input. This is an issue because a) it is not the expected action for a deploy and b) version creation can take a long time and be expensive for Lambda Managed Instances customers.

The cases in which this happened were:

  1. Quick deploy through either the popup or the toolkit explorer
  2. Direct upload where the user clicks on the node and selects the upload action
  3. Remote invoke hot reloading, which will auto deploy code changes.

Open to reasons to keep this, but I think that versioning isn't necessary in those cases and can end up being confusing. The original PR that added this was in 2020 (#1269), and based on that PR it seems like the original implementer was testing things out.

Solution

Remove the Publish: true field from the UpdateFunctionCodeCommand. Now, all deploys are simply updating the code.


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

reedham-aws avatar Dec 08 '25 18:12 reedham-aws

:hourglass_flowing_sand: I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

github-actions[bot] avatar Dec 08 '25 18:12 github-actions[bot]

:white_check_mark: I finished the code review, and didn't find any security or code quality issues.

:hourglass_flowing_sand: I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

:white_check_mark: I finished the code review, and didn't find any security or code quality issues.

The test failures seem to be flaky and unrelated, I think this is safe to merge.

reedham-aws avatar Dec 15 '25 17:12 reedham-aws

/retryBuilds

ashishrp-aws avatar Dec 15 '25 17:12 ashishrp-aws