- Newest
- Most votes
- Most comments
As long as the security group associated to that instance allows an inbound rule to allow access, it should be possible.
It all depends on your network topology and where the server is located (private subnet, etc..)
You can place your server in a public subnet (a subnet with a direct route to the internet gateway) and assign your server with a public IP or elastic IP.
In order to prevent clients other than your test client to directly access the server, make sure the server's security group inbound rules allow only traffic from the security group associated with the load balancer and the source IP of your test client.
Hi,
In addition to the above approaches, if you are looking to keep your EC2 instance in a private subnet, you can choose to use a Network Load balancer (NLB). A Network Load Balancer distributes incoming TCP and UDP traffic across multiple targets such as Amazon EC2 instances, microservices, and containers.
You can associate a static IP/elastic IP address with a NLB which will make sure the application which is trying to reach this EC2 uses the same IP address for communication.
Further reading here
Hope this helps!
Thanks, Rama
I had to allow access from my ip to the specific port the application is running on before I was able to access it from the ip directly, thank you all so much for pointing me to the right direction. It is sorted now
Relevant content
- asked 2 years ago
- Accepted Answerasked 3 months ago
- asked 5 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago