Skip to content

Remove support for deprecated runtimes and use the latest versions of each supported runtime#156

Merged
GrahamCampbell merged 12 commits intomainfrom
remove-deprecated-runtimes
Apr 19, 2026
Merged

Remove support for deprecated runtimes and use the latest versions of each supported runtime#156
GrahamCampbell merged 12 commits intomainfrom
remove-deprecated-runtimes

Conversation

@GrahamCampbell
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates AWS Lambda runtime support to drop deprecated runtime identifiers and move defaults/docs to the newest supported runtimes, while also removing the legacy create --template flow in favor of URL- or path-based templates.

Changes:

  • Remove deprecated Lambda runtimes from the AWS provider schema and TypeScript types; add/adjust tests to ensure deprecated values are rejected.
  • Update default AWS runtime to nodejs24.x across provider/package logic and tests.
  • Remove built-in recommended template list / examples download path and update create command + docs to use --template-url / --template-path.

Reviewed changes

Copilot reviewed 38 out of 39 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
types/index.d.ts Removes deprecated runtime literals from AwsLambdaRuntime type.
test/unit/lib/templates/recommended-list.test.js Removes unit test for the deleted recommended template list.
test/unit/lib/plugins/package/lib/package-service.test.js Adds getRuntime() default runtime test; adjusts Windows executable-permissions test name.
test/unit/lib/plugins/create/create.test.js Updates create command tests to use --template-path and new error code for missing template source.
test/unit/lib/plugins/aws/provider.test.js Adds coverage for default runtime of AwsProvider#getRuntime().
test/unit/lib/plugins/aws/package/compile/layers.test.js Adds validation test rejecting deprecated compatibleRuntimes.
test/unit/lib/plugins/aws/package/compile/functions.test.js Updates expected default runtimes and adds validation tests rejecting deprecated runtime values.
test/unit/lib/plugins/aws/invoke-local/index.test.js Removes invoke-local tests for deprecated runtimes; updates provided runtime docker test to provided.al2023.
test/unit/lib/plugins/aws/custom-resources/index.test.js Updates expected custom-resource Lambda runtime to nodejs24.x.
test/unit/lib/classes/plugin-manager.test.js Updates create command option schema expectation to template-url.
test/integration/create.test.js Updates integration tests to create from a local template path instead of built-in templates.
test/integration-basic.test.js Switches lifecycle integration test to use a local Node 24 template fixture and updates handler/invoke expectations.
test/fixtures/programmatic/packaging/serverless.yml Updates Go fixture runtime to provided.al2023.
test/fixtures/programmatic/basic-lifecycle-nodejs24/serverless.yml New fixture for Node.js 24 lifecycle integration test.
test/fixtures/programmatic/basic-lifecycle-nodejs24/handler.js New Node 24 handler fixture returning Lambda-proxy style response.
lib/utils/download-template-from-examples.js Deletes legacy template download-from-examples implementation.
lib/templates/recommended-list/index.js Deletes legacy list of recommended templates.
lib/templates/recommended-list/human-readable.js Deletes legacy human-readable template list rendering.
lib/plugins/package/lib/package-service.js Bumps packaging default runtime to nodejs24.x.
lib/plugins/create/create.js Removes --template support; keeps --template-url and --template-path flows.
lib/plugins/aws/provider.js Removes deprecated runtime enums and bumps provider default runtime to nodejs24.x.
lib/plugins/aws/invoke-local/index.js Removes invoke-local branching for deprecated runtimes.
lib/cli/commands-schema/no-service.js Removes create --template option from CLI schema.
docs/guides/workflow.md Updates example create usage to --template-url.
docs/guides/variables.md Updates runtime examples to nodejs24.x.
docs/guides/testing.md Modernizes examples to async/await style and improves wording.
docs/guides/services.md Updates runtime examples to nodejs24.x.
docs/guides/serverless.yml.md Updates runtime examples and documents the new AWS default runtime behavior.
docs/guides/layers.md Updates runtime examples to python3.14.
docs/guides/functions.md Updates runtime examples, adds guidance on default runtimes, and modernizes handler snippets.
docs/guides/credentials.md Updates runtime examples to nodejs24.x.
docs/getting-started.md Updates template creation instructions to serverless create --template-url=....
docs/events/websocket.md Updates examples to async return style and AWS SDK v3 usage; updates runtime examples.
docs/events/cognito-user-pool.md Updates examples to async return style.
docs/events/cloudfront.md Updates example to return response instead of callback usage.
docs/events/apigateway.md Updates examples to async return/throw style; updates runtime examples.
docs/events/alb.md Updates handler signature and fixes minor formatting in example.
docs/cli-reference/print.md Updates runtime examples to nodejs24.x.
docs/cli-reference/create.md Rewrites create docs around remote/local templates; removes built-in template list.
Comments suppressed due to low confidence (2)

lib/plugins/create/create.js:64

  • In the --template-path branch, serviceDir falls back to path.join(process.cwd(), this.options.name) when --path is omitted. If the user provides --template-path without --name, this produces a directory named undefined (and the success message will also print ./undefined). Please either require --name when --path is not provided, or default to a safe directory (e.g. process.cwd()/error with a clear message) and adjust the success message accordingly.
      const serviceDir = this.options.path
        ? path.resolve(process.cwd(), untildify(this.options.path))
        : path.join(process.cwd(), this.options.name);
      if (dirExistsSync(serviceDir)) {
        const errorMessage = `A folder named "${serviceDir}" already exists.`;
        throw new ServerlessError(errorMessage, 'TARGET_FOLDER_ALREADY_EXISTS');
      }

lib/cli/commands-schema/no-service.js:60

  • The CLI help text for --template-url says it supports only “GitHub, BitBucket”, but download-template-from-repo also supports GitLab, Bitbucket Server, GitHub Enterprise, and plain .git URLs. Please update the usage string so the help output matches actual supported providers.
    'template-url': {
      usage: 'Template URL for the service. Supports: GitHub, BitBucket',
      shortcut: 'u',
    },

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/getting-started.md Outdated
Comment thread test/unit/lib/plugins/package/lib/package-service.test.js
Comment thread test/unit/lib/plugins/aws/package/compile/functions.test.js Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 38 out of 39 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

lib/plugins/create/create.js:60

  • In the --template-path branch, if the user provides --template-path but omits both --path and --name, serviceDir becomes path.join(process.cwd(), this.options.name) which resolves to a literal .../undefined directory. Add validation to require one of --path/--name (or default to process.cwd() if creating in-place is supported) and throw a clear ServerlessError instead of creating an unexpected folder.
      const serviceDir = this.options.path
        ? path.resolve(process.cwd(), untildify(this.options.path))
        : path.join(process.cwd(), this.options.name);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/plugins/create/create.js
Comment thread lib/plugins/create/create.js Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 42 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

lib/plugins/create/create.js:60

  • When --template-path is provided without --path and without --name, path.join(process.cwd(), this.options.name) will throw (because name is undefined). Either validate that at least one of --path/--name is provided and throw a ServerlessError, or support creating in the current working directory explicitly.
      // Copying template from a local directory
      const serviceDir = this.options.path
        ? path.resolve(process.cwd(), untildify(this.options.path))
        : path.join(process.cwd(), this.options.name);
      if (dirExistsSync(serviceDir)) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/utils/download-template-from-repo.js Outdated
Comment thread lib/plugins/create/create.js Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 42 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

lib/cli/commands-schema/no-service.js:60

  • The create --template-url option help text says it supports "GitHub, BitBucket", but download-template-from-repo also supports GitHub Enterprise, Bitbucket Server, and GitLab URLs. Consider updating the usage string to reflect the actual supported providers (and normalize the capitalization to "Bitbucket") so serverless create --help isn't misleading.
    'template-url': {
      usage: 'Template URL for the service. Supports: GitHub, BitBucket',
      shortcut: 'u',
    },

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/plugins/create/create.js Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 42 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/unit/lib/classes/plugin-manager.test.js Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 42 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/plugins/create/create.js
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 42 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/utils/download-template-from-repo.js Outdated
Comment thread lib/utils/download-template-from-repo.js Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 42 out of 43 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/events/websocket.md Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 42 out of 43 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/plugins/create/create.js
@GrahamCampbell GrahamCampbell merged commit ac3ca65 into main Apr 19, 2026
7 checks passed
@GrahamCampbell GrahamCampbell deleted the remove-deprecated-runtimes branch April 19, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants