Skip to content
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

remove invalid variable references from the documentation #11785

Merged
merged 2 commits into from
Mar 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/providers/aws/guide/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ service: new-service
provider: aws
custom:
globalSchedule: rate(10 minutes)
newService: ${self:}
# the following will resolve identically in other serverless.yml files so long as they define
# `custom.newService: ${file(<relative-path-to-this-file>/serverless.yml)}`
exportName: ${self:custom.newService.service}-export
# the following example purposely demonstrates the ability for a variable to cross reference another one
serviceName: ${self:service}
exportName: ${self:custom.serviceName}-export
# or simply
# exportName: ${self:service}-export

functions:
hello:
Expand Down Expand Up @@ -134,7 +135,7 @@ The stage used by the Serverless CLI. The `${sls:stage}` variable is a shortcut

## Referencing Environment Variables

To reference environment variables, use the `${env:SOME_VAR}` syntax in your `serverless.yml` configuration file. It is valid to use the empty string in place of `SOME_VAR`. This looks like "`${env:}`" and the result of declaring this in your `serverless.yml` is to embed the complete `process.env` object (i.e. all the variables defined in your environment).
To reference environment variables, use the `${env:SOME_VAR}` syntax in your `serverless.yml` configuration file.

**Note:**

Expand Down