AWS Virtual Private Network + Load Balancer
π π π π π
#AWS Certified Cloud Practitioner Foundational
β β β
My Personal AWS VPC from scratch connecting subnets, creating Internet Gateway, Route Tables, Subnet Associations and ssh into the server.
Steps Involved:
-
β Create 1 VPC in AWS Console
-
β Create 2 subnets then attatch them to the VPC created
-
β Give the subnets IPv4 CIDRs
-
β Create internet gateway so we have internet
-
β Attatch internet gateway to VPC
-
β Go to VPC's main route table and edit the routes
-
β give the destination the universal IP address and target the internet Gateway and save changes
-
β go to subnet associations and add the 2 subnets created and save associations
-
β now go to the EC2 (Virtual servers in the cloud) dashboard and create an Instance (launch instance)
-
β name the server and choose a distrubution
-
β create new key pair (if one isnt already available) if so select it
-
β under networking settings edit and select the VPC and subnet created
-
β enable auto-assign public IP address
-
β ssh protocol should be TCP port 22
-
β launch instance and repeat for 2nd instance
-
β for windows it will be RDP instead of ssh and the port will be 3389
-
β go to the instance you want to run and select connect
-
β for the ssh client open a terminal on Apple (different for windows will document later)
-
β cd into the folder the key pair is in and run the commands
-
β run chmod 400 + name of key pair (to ensure key is not publicly visible)
-
β run ssh -i "key pair name" ec2-user@ + IP given
-
β select yes on the dialog prompt
-
β you should see Amazon Linux 2 AMI logo if done correctly
-
β run logout to close connection and get back to your shell
-
β for windows server select instance and go to RDP client
-
β select password and upload private key to decrypt
-
β decrypt password
-
β copy password
-
β download remote desktop file
-
β open download remote desktop file
-
β paste password to launch instance
-
β select yes to continue on pop up dialouge box
-
β you should see your instance live
-
Figure how to ping from one server to another
-
Write a Blog Post on Hashnode about the experience.
My version of the code found Below
https://github.com/BenjaminBurton/AWS-VPC-Setup/blob/main/README.md
- β create load balancer using classic load balancer
- β name load balancer
- β attatch VPC inside create LB inside dropdown
- β add the subnets by selecting the plus icons next to them under available subnets Actions
- β next assign security groups
- β create a new security group (type http)
- β next configure security settings
- β next configure health check (ignore warning on page)
- β next add EC2 instance
- β select both instances created
- β next add tags
- β review and create
- β create
- β
- β Write about experience in Blog post on HashNode
-
β Actively Finding resolution to Issue with pinging back and forth
-
β Under Construction