How can I connect to an EC2 instance by SSH to have control access or HTTP to view a web page?


I’m creating my degree final project, and I’m using localstack with terraform to deploy the infrastructure. After learning how it works, I started deploying a few tests and the instances were created successfully in localstack, but I’m not sure how to access by SSH, HTTP and so on in my deployed instances.

The instances were deployed using terraform (tflocal in this case) and I’m asking for help because I can’t find the way to connect with any protocol. I attempted to use the public IP (which allowed me to ping the instances but nothing more), and I also searched for open ports to connect to, but unfortunately, I’ve had no luck.

I searched all over the internet, but I didn’t find an explanation for my question.

I’m hopeful that someone here might be able to provide some help.

If I have had to explain more exactly my issue, there’s no problem


Hello — Which LocalStack edition are you currently using? Are you using the LocalStack Pro or the Community image?

Please note, the Community image supports only mock operations. Therefore, it is not possible to SSH into the emulated instances, as it merely provides a state representation rather than full functionality. On the other hand, the Pro image operates Docker containers in the background, enabling SSH access to the emulated instances.

I hope this clarifies your query!