title: What exactly is happening when I upload zip file to the elasticbeanstalk?
body: <p>According to the <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.DeployApp.html" rel="nofollow noreferrer">aws elasticbeanstalk doc</a>,</p>
  <p>&quot;While Elastic Beanstalk deploys your file to your Amazon EC2 instances, you can view the deployment status on the environment's overview.&quot;</p>
  <p>But I quite cannot understand what exactly is happening when I upload my source files to the elasticbeanstalk(eb).</p>
  <p>As I know, if we upload zip file to the elasticbeanstalk(eb), it goes to the s3 first.</p>
  <p>But as documentation says, &quot;ec2 deploys those files&quot; with the proper environment.</p>
  <p>For example, if I uploaded .zip file which contains simple index.js (simple nodejs server) and package.json (dependencies listed file) to the elasticbeanstalk, it goes to the s3 storage service. And ec2 deploys it with the proper command like npm install, npm start, etc.</p>
  <p>The question is that, what is exactly happening between s3 upload and ec2 deploy?</p>
  <p>Does elasticbeanstalk makes ec2 instance to access s3 storage and get all the source files from there automatically? otherwise we have to manually connect those two aws resources together?</p>
  <p>I've been searched for this all day, but couldn't find anything including official documentation.</p>
  <p>Any advice, or any url reference might also really be helpful. Thank you.</p>