title: Heroku vs AWS Elastic Beanstalk on Spring Boot Multi-Module Application
body: <p>In heroku, when I create a multi-module application, it creates different instances for each module.
  <a href="https://i.stack.imgur.com/rp6jQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rp6jQ.png" alt="enter image description here" /></a></p>
  <p>But in AWS elastic beanstalk, it creates a single instance and deploy all modules to this instance. I wonder that how can I handle it like heroku?</p>
  <p>My Procfile looks like:</p>
  <pre><code>web: java $JAVA_OPTS -Dserver.port=$PORT -jar web/build/libs/*.jar
  crawler1: java $JAVA_OPTS -jar crawler/build/libs/*.jar
  crawler2: java $JAVA_OPTS -jar crawler/build/libs/*.jar
  crawler3: java $JAVA_OPTS -jar crawler/build/libs/*.jar
  </code></pre>
  <p>And my elastic beanstalk command goes on like:</p>
  <pre><code>        export MY_APP=my-app
          export MY_ENV=my-environment
          eb init $MY_APP -r $AWS_DEFAULT_REGION -p corretto-11
          eb create $MY_ENV --single --instance-types t2.micro --envvars key1=val1 || echo &quot;environment is already created.&quot;
          eb deploy $MY_ENV -l v-${CIRCLE_BUILD_NUM}
  </code></pre>
  <p>Example project: <a href="https://github.com/senolatac/eb-demo" rel="nofollow noreferrer">https://github.com/senolatac/eb-demo</a></p>