7

My question is exactly same as: https://forums.aws.amazon.com/thread.jspa?threadID=140592 , which is unanswered.

How do people usually deploy when they have separate front end application running in say Apache, and a RESTful API running in Tomcat, using Elastic Beanstalk.

Separate Elastic Beanstalk for front end and back end?

Or is there a way to deploy both in the same Elastic Beanstalk?

Anmol Gupta
  • 2,797
  • 9
  • 27
  • 43
  • 1
    Is the front end application static (HTML, CSS etc.) or is it dynamic (php, Java, nodejs etc.)? – Dave Maple Jan 11 '17 at 14:52
  • @DaveMaple FrontEnd is static (HTML, CSS, JS) which sends HTTP requests to backend to get the data in JSON. – Anmol Gupta Jan 11 '17 at 15:21
  • @AnmolGuptafor the front-end as you said that is only static files, you just need to deploy it to an S3 bucket and a CDN for serving the files across the globe, it will work. Here you have a couple relevant links https://medium.com/wolox-driving-innovation/deploy-your-angularjs-app-to-aws-s3-with-ssl-3635a62533ab http://stackoverflow.com/questions/28063945/configure-amazon-s3-static-site-with-angular-js-ui-router-html5modetrue-on-pag – nisevi May 18 '17 at 07:05

1 Answers1

4

Based on your use-case I would recommend you host your static files with S3, your API on Elastic Beanstalk and use Cloudfront to route requests between them.

Similar use case: https://www.codeengine.com/articles/process-form-aws-api-gateway-lambda/

Dave Maple
  • 8,102
  • 4
  • 45
  • 64