Im successfully using environment variables on my serverless.yaml file with:
This solution doesnt work on serverless.test.yaml. I am testing there apis which are protected with api key.
Attempt to define that secret x-api-key doesnt work for me (getting FORBIDDEN 403):
running from the CLI:
SLS_DEV_API_KEY=SECRET sls test
If I use the actual key string it works, so I assume I am not reading the environment var correctly.
Would appreciate your help