Migration of a Workload running in a Corporate Data Center to AWS via Amazon EC2, Amazon RDS, AWS CloudShell, VPC, Security Groups and Internet Gateway

Project description:
In another project based in a real-world scenario, I acted as the Cloud Specialist responsible for migrating a workload running in a Corporate DataCenter to AWS.
The application and database were migrated to AWS using the Lift & Shift (rehost) model, moving both application and database data.
The migration of the Wiki followed these steps: Planning (sizing, prerequisites, resource naming), Execution (resource provisioning, best practices), Go-live (validation test — Dry-run, final migration — Cutover) and Post Go-live (ensure the operation of the application and user access).

Terminology
1. AWS (Amazon Web Services) –
2. Bare Metal — is a computer system with a base operating system (OS) or installed applications. It is computer hardware, structure, and components that are installed with either firmware or basic input/output system (BIOS) software utility or no software at all.
3. EBS (Elastic Block Store) is used for block-level storage volumes with Amazon EC2 instances.
4. EC2 (Elastic Compute Cloud) — provides on-demand, scalable computing capacity in the Amazon Web Service Cloud.
a. Allows you to provision Virtual Machines and bare metal hosts in AWS data centers.
b. Reduces hardware costs and faster application deployment. Eliminates the need to invest in hardware.
5. RDS (Relational Database Service) — This web service makes it easier to install, configure, operate, and scale a relational database in the cloud.
a. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages everyday database administration tasks.
b. Amazon Aurora is a fully managed relational database engine built for the cloud and compatible with MySQL and PostgreSQL. Amazon Aurora is part of Amazon RDS.
6. S3 (Simple Storage Service) — is an object service that offers industry-leading scalability, data availability, security, and performance.
7. Virtual Machine — This computing resource uses software instead of a physical computer to run programs and deploy applications.
- Planning
The planning for this lab involved collaborating with the client to ensure that the right sizing, naming, availability, and prerequisites were provided in order to successfully migrate the customer’s application and database.


After giving it some thought, I concluded that Amazon EC2, Amazon RDS, AWS CloudShell, VPC, Security Groups, and Internet Gateway could all be used to implement the solution.
As I went through the scenario, I found that while I had focused a lot on the customer’s pre-requisites (i.e., making their application and database function), I had not given AWS prerequisites enough thought. I made a few mistakes as a result of this that I had not anticipated. The lesson is to stay focused on the requirements for the cloud.
Even so, I did not always have perfect customer focus. After making sure the application had all the requirements installed for it to launch without giving me grief, I was wishing for a container.
2. Execution/Implementation
Key AWS commands leveraged:
aws ec2 create-vpc
aws ec2 create-subnet
aws ec2 create-internet-gateway
aws ec2 attach-internet-gateway
aws ec2 describe-internet-gateways
aws-ecs describe-route-tables
aws ec2 create-route
aws ec2 create-security-group
aws ec2 authorize-security-group-ingress
aws ec2 run-instances
aws rds create-db-subnet-group
aws rds create-db-instance
The above was key to creating the EC2 and the RDS.
I still had to configure the EC2, which leveraged these commands:
sudo apt-get update
sudo apt install
sudo apt-get install
curl
pip3 install
Then, I did final configuration pieces of downloading the application files and database, importing the database and configuring the app to point to the db
wget
After getting the files, I had to configure the database, using source to import the downloaded database dump, with these commands:
mysql
show
create
use
source
select
grant
flush
The application configuration then needed to updated, to point the mysql_host variable to the RDS instance identifier







3. Running the Application
Now, I was finally ready to run the application. Of course this failed.
python3
Initially, my application did not work as expected. There was a gap in the customer requirements where I had not installed pkg-config. [This was actually covered in the lab solution documentation, so it was my attempts to do it without peeking at the answers that did me in.?]
Now, I could browse to the Wiki.
Attempting to login to the EC2 public IP address and access the ABC Company Wiki.


Module 3 — Final migration validation with errors
I obviously missed a step or installed something incorrectly. Working on find a solution.


I got assistance, and here is the fix for my issue.
1. pip uninstall flask
2. pip install flask
Module 3 Project Evidence after the update:
Accessed the public IP address of EC2 via port 8080.
Clicked on the Articles link and was able to view the articles.
http://54.147.142.242:8080/articles

Logged into web page with the admin login.


Adding a new Article to the ABC Company Wiki

New article added to ABC Company Wiki. This completes the lesson for Module 3.

Lessons Learned:
Plan ahead, collect requirements, and confirm everything at all times. It was an easy fix once I got the go-ahead: simply uninstall and reinstall flask. After that, everything operated according to plan. I also learn more GitHub Desktop keyboard shortcuts & git cmd. examples: Press ESC to make sure you are out of the edit mode and then type: (:wq) . I also learn and final validation part. I face problem in ssh-key.pem then i contact to support and solve it perfectly.