Search code examples
reactjsdjangoamazon-elastic-beanstalk

How to creat & deploy react & django project to Elastic Beanstalk?


I want to creat a web application using React as frontend & Djanog as backend, and deploy that web application to Elastic Beanstalk. What should I do (separate frontend from backend folder?) to make Easy deployment to Elastic Beanstalk.

I don't find any resource that provide step by step on deployment of React & Django to Elastic Beanstalk.


Solution

  • You should consider the frontend with React and the backend with Django as two separate projects, with two different deployments, both on AWS, but with different services.

    • the backend, Django, may be on ElasticBeanstalk. Thanks to @p7dxb, you have an example on how to do that.
    • the frontend, React, may be on S3, with CloudFront.

    Different scenarios can lead you to deploy differently. For exemple, with Server Side Rendering, your React App may be deployed in a container on AWS Elastic Container Service. This is a more advanced deployment.