Load the contents of .env
into serverless.yml
(Serverless Component V2).
$ npm i -g slsenv
In project root folder which has .env
and serverless.yml
, run:
$ slsenv
Changes are write back to serverless.yml
.
Create .slsenvrc
in project root folder
{
"path": "inputs.functionConf.environment",
"excludes": ["TENCENT_SECRET_ID", "TENCENT_SECRET_KEY"]
}
path
: key path to environmentvariables
excludes
: excluded.env
variables