In this real-world migration task, I worked as the Cloud Specialist responsible for migrating a workload running in a Business DataCenter to AWS.
The application and database were migrated to AWS utilizing the Lift & & Shift (rehost) version, relocating both application and data source data.
I complied with some movement actions: Planning (sizing, requirements, source identifying), Implementation (source provisioning, ideal techniques), Go-live (validation test– Dry-run, last movement– Cutover) and Article Go-live (guarantee the procedure of the application and customer gain access to).
The application was a Flask-based Wiki App backed by a MySQL data source Both the application and data source were moved to AWS making use of a Lift & & Shift (Rehost) method. The goal was to re-host the app with very little changes, guaranteeing the same functionality yet leveraging AWS-managed framework.
Movement Steps
1 Planning
- Sizing & & prerequisites : Select an EC 2 instance (Ubuntu 22 04 to run the application and Amazon RDS (MySQL) for the data source.
- Resource naming : Complied with naming conventions (e.g.,
awsuse 1 db 01
for RDS). - Safety and security planning : Made VPC safety and security groups (e.g.,
EC 2 toRDS-sg
to enable EC 2 ↔ RDS interaction over port 3306
2 Implementation
- Provisioning resources :
- Launched an EC 2 circumstances for the Flask app.
- Provisioned Amazon RDS MySQL for backend data source hosting.
- Ideal methods :
- Shielded SSH keys with
chmod 400
for prepared only legal rights. - Made use of parameterized connection configs in
wiki.py
to stay clear of hardcoding delicate credentials. - Installed native MySQL client collection (
mysqlclient
on EC 2 to deal with Flask– RDS connection error (NoneType cursor).
3 Go-Live
- Dry-run recognition :
- Validated RDS connection from EC 2 with:
mysql -h awsuse 1 db 01 ... -u admin -p
- Verified schema tons by importing
dump.sql
- Checked application locally with
flask run
to ensure app-db assimilation.
Cutover :
- Begun Flask on port 8080 , detached with
nohup
, making it possible for the application to run in the history. - Confirmed paying attention sockets with
ss -ltnp|grep 8080
- Accessed Wiki app from web browser utilizing EC 2 Public IP + Port
4 Post Go-Live
- Validated login (
admin/admin
- Verified tables (
articles
with SQL queries. - Monitored logs with
tail -f flask.out
- Ensured relentless connectivity after EC 2/ RDS reboots.
⚙ Technologies Made use of
- AWS EC 2 — Application hosting (Flask app).
- AWS RDS (MySQL) — Managed relational database service.
- VPC Security Groups — Managed interaction between resources.
- Ubuntu 22 04 LTS — EC 2 operating system.
- Flask + MySQLdb (mysqlclient) — Python web structure with indigenous MySQL bindings.
- Git, pip, Python 3 — Application atmosphere setup.
Secret Obstacles & & Repairs
- Problem : Flask app threw
NoneType
cursor mistakes when attaching to RDS. - Fix : Installed default-libmysqlclient-dev and reinstalled flask-mysqldb to enable native MySQL customer binding.
- Concern : Wrong RDS endpoint caused connection failures.
- Take care of : Fixed to
awsuse 1 db 01 ...
(as opposed toawsuseldb 01
✅ Final Result
- Application efficiently moved to AWS.
- Database and application are fully operational in the cloud.
- Acquired sensible abilities in AWS cloud movement, Flask deployment, MySQL assimilation, and TROUBLESHOOTING!
Aesthetic Proof
- Browser– Wiki app was accessible on
http://
prior to AWS resources were taken down.>: 8080
Lessons Found out
- Always double-check RDS endpoint names
- Native collections are vital for Python– MySQL connectivity.
- Safety teams should be least benefit but still allow important web traffic.
- Tail logs early for fast debugging.
This movement strengthens my C loud Engineering and QA frame of mind : through building, verifying troubleshooting, and providing a working AWS option.