How to get a Terraform object into an AWS Lambda environment

Solution 1:

In python, you will have to get json string and convert it to dict:

import json

def bar:
  for k in json.loads(os.environ["foo"]):
     print(k)