I want to connect two EC2 instances with each other so that they can communicate with each other.
One will have Wordpress installed, and the 2nd will have a database configured (e.g. Mysql/Mariadb).
I found the problem in the way we can connect 2 EC2 instances with each other by using private IP.
To connect from the Amazon EC2 consoleOpen the Amazon EC2 console. In the left navigation pane, choose Instances and select the instance to which to connect. Choose Connect. On the Connect To Your Instance page, choose EC2 Instance Connect (browser-based SSH connection), Connect.
To keep it very simple, For any two programs to communicate with each other over a network, you need two things
Consider you have two EC2 instances. Lets name them
On each of these instances, you must be having some programs between which you want the communication to take place. Also, these programs must be running on a PORT of the instance. For example, tomcat instance runs on port 8080 by default. Lets name our programs:-
Let us first talk about Program1 running on port 1000 of Instance1.
Repeat these steps on Instance2 and you will be good to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With