title: Environmental Variables set in Buildspec.yml file not showing in Environment when built (AWS Lambda / CodeStar)
body: <p>First a little bit of background. We are building an application in AWS using CodeStar to control everything. It is being written in Python 3</p>
  
  <p>But despite every attempt we are unable to get the variables we set in the buildspec.yml file to show in the environment when we deploy the code.</p>
  
  <p>For example the following is essentially the buildspec.yml file.</p>
  
  <pre><code>    version: 0.2
  
        env:
          variables:
              PASSWORD: "abc123"
  
        artifacts:
          type: zip
          files:
            - template-export.yml
            - '**/*'
  </code></pre>
  
  <p>When we then build a function which prints the entirety of the Environment variables MY_VAR does not show in the variables. The code we are using is essentially this:</p>
  
  <pre><code>    import os
  
      def handler(event, context):
        PASSWORD1 = str(os.environ["PASSWORD"])
        print(PASSWORD1)
  </code></pre>
  
  <p>As near as I can tell, it currently has a role assigned to it which gives it full permissions.I am sure there is a simple solution to this, but as of now we haven't been able to find it - despite hours spent trying to get it to work</p>
  
  <p>Any assistance or pointers would be greatly appreciated.</p>
  
  <p>Note - this seems very similar to: </p>
  
  <p><a href="https://stackoverflow.com/questions/48632576/aws-lambda-is-not-reading-environment-variables?rq=1">AWS Lambda is not reading environment variables</a> </p>
  
  <p>but we are wanting to set the variables in the yaml file and not via the Lambda configuration area</p>