How can I use environment variables from my local machine to be used in my serverless.yml file?

Summary

The syntax for using environment variables in your serverless.yml is: ${env:VARIABLE_NAME}

So if you want to use an environment variable called “STAGE” in your local environment, it would look like: ${env:STAGE}

Serverless has a really powerful variable system. The full documentation is here:

Related links