diff --git a/docs/providers/aws/guide/variables.md b/docs/providers/aws/guide/variables.md index 0e48e98e7..f9877b3a3 100644 --- a/docs/providers/aws/guide/variables.md +++ b/docs/providers/aws/guide/variables.md @@ -63,15 +63,15 @@ For example: provider: name: aws environment: - MY_SECRET: ${file(./config.${opt:stage, self:provider.stage, 'dev'}.json):CREDS} + MY_SECRET: ${file(./config.${opt:stage, 'dev'}.json):CREDS} ``` -If `sls deploy --stage qa` is run, the option `stage=qa` is used inside the `${file(./config.${opt:stage, self:provider.stage, 'dev'}.json):CREDS}` variable and it will resolve the `config.qa.json` file and use the `CREDS` key defined. +If `sls deploy --stage qa` is run, the option `stage=qa` is used inside the `${file(./config.${opt:stage, 'dev'}.json):CREDS}` variable and it will resolve the `config.qa.json` file and use the `CREDS` key defined. **How that works:** 1. stage is set to `qa` from the option supplied to the `sls deploy --stage qa` command -2. `${opt:stage, self:provider.stage, 'dev'}` resolves to `qa` and is used in `${file(./config.${opt:stage, self:provider.stage, 'dev'}.json):CREDS}` +2. `${opt:stage, 'dev'}` resolves to `qa` and is used in `${file(./config.${opt:stage, 'dev'}.json):CREDS}` 3. `${file(./config.qa.json):CREDS}` is found & the `CREDS` value is read 4. `MY_SECRET` value is set