Deploying Flask app on aws with mysql
- Search RDS and click on Create Database.
- Choose Database creation method as Standard Create and Engine options as MySQL
- Select Edition as MySQL Community and Version as per your choice Version MySQL 8.0.27
- Select Templates as Free tier if you are not using any paying to aws to host a database.
- Give Database instance name,username and password.
- Leave other settings as it is just give public access YES
- Then click on create Database.
- Wait for some minutes unit database gets created.
- Then Click on Database -> Click on Configuaration -> Inbound rules -> Edit inbound rules and edit as below.
- Search for Elastic Beanstalk
- Click on Application -> Create new Application
- Give Application Name and Description and click on create.
-
Click on Environment -> Create new Environment
-
Select Web server Environment.
-
Select application name that you gave before.
-
Give Enviroment name.
-
Select Platform as Managed platform
- Select upload your code and upload your zip file of your code.
- Click on Create Environment(it will take few minutes too create enviroment).
- If health is Ok of the app, then the project is successfully deployed on AWS.
- How zip file should be.
projectt
├── application.py
├── template
│ ├── page.html
│ └── sign_up.html
└── virt