Setting up a webapp in AWS

OPTION A: IF APP IS ALREADY AVAILABLE IN REPO

Create an EC2 instance

Git clone the repo of web app (if already done in local)

Create a venv and install dependencies using requirements.txt

Check if the app is running : configure security group to allow Custom TCP in port 5000. Open run.py and edit as app.run(host="0.0.0.0",port=5000,debug=True)

(Note: Follow the below steps if creating everything in EC2 Instance.)

OPTION B: Setting up the environment in EC2 itself

STEP 1 : Basic Setup

NOTES:

Key Pair:

A key pair in EC2 is like the keys to your virtual computer. Just like you need a key to unlock and start your car, a key pair lets you securely access your EC2 instance.

It's made of two halves: a public key that AWS keeps, and a private key that you download.

When you use the private key, it verifies that you're the one allowed to access that specific virtual machine, keeping everything secure and just for you.

Key pair type and RSA: