AWS Networking Project: VPC with a public and a private subnet and an internet gateway. A route table connects the destination 0.0.0.0/0 to the internet gateway for the public subnet. In the public subnet, there is an EC2 instance that can be accessed via SSH through the correct security group settings.Using the EC2 instance in the public subnet, the EC2 instance in the private subnet can be accessed by saving the private key on the EC2 instance in the public subnet. This is done by using a text editor like vim on the EC2 instance in the public subnet, pasting the content of the private key (the .pem file from the local computer) in the newly created file (command “vim private_key.pem”). Then permission of the file needs to be changed with the command “chmod 400 private_key.pem” which will ensure that only your user can access the file.
This type of infrastructure is a bare bones example of project containing a website (which runs on the EC2 instance in the public subnet) and a database (which runs on the EC2 instance in the private subnet).