0
963views
Steps to create production grade application server on AWS
1 Answer
0
11views

Step 1: Choose Linux Image

  • Ubuntu Server 20.04 LTS 64-bit (x86) - Web server
  • Ubuntu Server 20.04 LTS 64-bit (Arm) - Database server

Step 2: Choose Instance type

  • t3a.medium (2 vCPUs, 2.2 GHz, 4 GiB memory, EBS only) - Web server
  • m6g.medium (1 vCPUs, 2.5 GHz, 4 GiB memory, EBS only) - Database server

Step 3.1: Create a VPC (first time only)

  • Naming convention: region-environment-vpcname Example: apsouth1-prod-vpc01
  • IPv4 CIDR block: 172.31.0.0/16
  • Enable DNS hostname
  • Tag: Name: same as the name above apsouth1-prod-vpc01

Step 3.2: Create a subnet (first time only)

  • Naming convention: region-environment-subnetname Example: apsouth1-prod-subnet01
  • IPv4 CIDR block: 172.31.0.0/16
  • Tag: Name: same as the name above apsouth1-prod-subnet01

Step 4: Choose Storage

  • 32 GiB General Purpose (GP2) - Web server
  • 60 GiB General Purpose (GP3) - Database server

Step 5: Add tags

  • Name: apsouth1-prod-web01

Step 6: Add security group (first time)

  • Name: apsouth1-prod-webserver-security
Type Protocol Port range Source Description
SSH TCP 22 custom - 0.0.0.0/0 ssh
ICMP ICMP ALL All custom - 0.0.0.0/0 ping command
HTTP HTTP 80 custom - 0.0.0.0/0 http web traffic
  • Name: apsouth1-prod-dbserver-security
Type Protocol Port range Source Description
SSH TCP 22 custom - 0.0.0.0/0 ssh
ICMP ICMP ALL All custom - 0.0.0.0/0 ping command
Mysql/Aurora TCP 3306 custom - security-id-group-of-webserver Mysql port

Step 7: SSH Key pair

Create new (first time)

  • name: apsouth1-prod-ssh01
  • download .pem file and keep

Step 1: Associate an elastic ip with the instance

Attach a internet gateway to vpc

Create a new elastic ip

Associate the ip to the instance

(Optional) Might need to add mapping in route table of 0.0.0.0/0 to internet gateway

Please log in to add an answer.