title: How to pass variable (environment property) from CodeBuild to Beanstalk app in CodePipeline?
body: <p>I have a simple CodePipeline with three stages - source checkout, CodeBuild build docker image using <code>buildspec.yml</code> and producing <code>Dockerrun.json</code> artifact, and deploy to Beanstalk.</p>
  <p>Now I want the application, which runs in the docker, to read a variable (environment property) set by CodeBuild stage during a build--a build number. How can I do that?</p>
  <p>I have set <code>APPLICATION_BUILDNUMBER</code> variable in the <code>buildspec.yml</code> in <code>pre_build:commands</code> and listed it under <code>exported-variables</code>. It then appeared in AWS Console under CodeBuild <em>Build status</em> under Environment Variables tab under <em>Exported environment variables</em> with desired value.</p>
  <p>Now how can I read it in my application running in docker in Beanstalk, which is a Spring Boot app (JAR)?
  When I set the variable <code>APPLICATION_BUILDNUMBER</code> manually in Beanstalk &gt; Configuration &gt; Software &gt;  Environment properties, I can read it easily. But I don't know, how to pass it from CodeBuild.</p>