Following the documentation, I tried declaring environment variables in the serverless.yml file under provider:
provider:
cfLogs: true
name: aws
runtime: nodejs4.3
stage: dev
region: eu-west-1
profile: serverless-admin
environmnent:
IS_REMOTE: ${file(./config.yml):IS_REMOTE}
REMOTE_ENV: "YES"
None of these are available to me when trying to get them using process.env.IS_REMOTE or process.env.REMOTE_ENV.
This is the log of trying to console.log them:
2017-01-01 06:22:57.777 (+02:00) undefined REMOTE_ENV: undefined
2017-01-01 06:22:57.777 (+02:00) undefined IS_REMOTE: undefined
This is inside Lambda when using serverless invoke (not locally).
Hope someone can help me figure this out, as it seems like I'm following the docs about right.