Eric Illouz
Eric Illouz

Reputation: 21

How to upload my JAVA/Spring boot + MySQL + Angular Project to AWS

i have working about some little project that includes:

Server - JAVA Spring Boot (TomCat,Maven) (Using IntelliJ) + Data - MySQL + Front - Angular

I managed to compile the angular into the Java - so i can reach the website from localhost:8080

I would like to upload the website to AWS, Where do i need to start?

Upvotes: 0

Views: 1413

Answers (1)

Vinay Prajapati
Vinay Prajapati

Reputation: 7504

Quite a broad question though. Still to get you started following are the steps:

  1. Create an AWS account, setup IAM user and verify your billing account. Usually EC2 instances are preferred for computing infra and RDS for db. Best is to do following:

    a) You will need to register an EC2 instance for your servers i.e. UI and backend. RDS for your DB. i) you will need to choose AMI(Amazon Machine Image) i.e. OS to start with and then specify all the required aspects like RAM etc.

    b) If you want load balancing then ALB is preferred.

    c) DB scaling is supported by RDS and hence probably less of a worry. But above is sufficient to get you started.

    d) you probably need routing as well if you want to scale but choice is yours. Route 53 is your bet though.

  2. Now, you have an overhead of installing all the If you want to avoid headache of installing s/w tools on the machine you can do following:

    a) lookup for containerization tools e.g. Docker. Docker gives you flexibility to ship product with dependencies.

    i) Setup local docker and create Dockerfiles and Docker-compose.yaml files. ii) You must create docker-files per dev, test and production environment.

    b) install docker on your EC2 instances or setup it as user script so that it's run by default for your AMI.

You can also look up for ready made AMIs which allows you to do same job in lesser time.

  1. Now, you can ssh into your EC2 instance manually or automated (your choice). Manual command is ssh -i ~/your_file.pem user_name@ip. For ubuntu AMI user name is ubuntu.

  2. Now get your docker images either locally and attach to docker or pull those from docker hub(you will need to look into configuring one).

If you want to deploy ui and backend on separate machines repeat #3 & #4 for both machines.

  1. AWS have got lots of configurations e.g. users, groups and roles. Please read through those and setup appropriately.

This is too much in few lines. But this gives you a gist of in what direction you should be going.

Upvotes: 2

Related Questions