Reputation: 8165
I have an array in my handler that looks like this
process_list = [ 'Terminate', 'Launch', 'ScheduledActions', 'AlarmNotification' ]
I want to be able to set them in serverless.yaml
Is there an elegant way to do this?
Upvotes: 1
Views: 374
Reputation: 8165
You can do this
serverles.yaml
environment:
MY_LIST: "foo,bar"
handler.py
my_list = os.environ['MY_LIST'].split(",")
Upvotes: 2