Step 1 – Find the security group name of both serversĮvery instance will have a Security Group assigned by default, which is called, well, “default”.īut the best practice is to always create a custom security group based on the role a server would perform.
Let’s take an example of a Webserver to Database server connection to show how to connect two ec2 instances. Here at, we provide AWS Management & Maintenance services to several web hosts, digital marketers, and other online businesses.Īs part of our services, we often setup inter-server connections such as: How to connect two ec2 instances – With an example