2020년 2월 26일 수요일

Serverless Lambda Environment Variables

# serverless.yml
service: service-name
provider:
  name: aws
  environment:
    FOO: bar

functions:
  hello:
    handler: handler.hello
    FOO2: bar2

# Python handler

import os
...

FOO = os.environ['FOO'])
...


참고 :
https://serverless.com/framework/docs/providers/aws/guide/functions#environment-variables

댓글 없음:

댓글 쓰기