title: AWS CDK Python - Passing in variables from config.py into lambda.funtion environment option
body: <p>I am attempting to create a Lambda function adding in environment variables from a config.py file.  The variables are created in the <code>config.py</code> file using dict(). I tried using <strong>kwargs.get('variable_from_configpy_file')</strong> but that errored out with <strong>Got 'undefined' for non-optional instance of {&quot;type&quot;:{&quot;primitive&quot;:&quot;string&quot;}}</strong>. How can I import the variable values from the config.py file into the environment option of the lambda.funtion (environment={&quot;key&quot;: &quot;value&quot;,...})? I'm new to python so any ideas would be most appreciated.</p>
  <p>Thanks.</p>