serverless.star¶
Move Serverless Framework services to a new Lambda runtime.
AWS retires Lambda runtimes on a schedule, so this is a recurring fleet-wide change. Edits are line-based, so comments and variables in serverless.yml stay as they were.
| Function | What it does |
|---|---|
files |
Lists the repo's Serverless configs. |
set_runtime |
Sets the Lambda runtime of the provider and of every function that overrides it. |
files¶
Lists the repo's Serverless configs.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
Returns: The sorted paths of every serverless.yml and serverless.yaml outside node_modules.
Example
set_runtime¶
Sets the Lambda runtime of the provider and of every function that overrides it.
Arguments
| Name | Description |
|---|---|
repo |
The repo passed to change(repo). |
runtime |
The new runtime, such as nodejs20.x or python3.12. |
from_runtime |
When set, only this runtime is replaced, so functions on other languages stay as they are. |
Returns: The list of paths that changed.
Example
serverless.yml
Used in: serverless-runtime