0

We have 2 EC2 instances - one for staging and one for production. They have a fairly similar setup.

Since we need to scale (while still staying on EC2), I want to change the type of the production instance from t2.medium to t2.large. My course of actions would be:

  1. Stop the machine
  2. Change the type
  3. Start the machine

Before doing this for production, I experimented for staging moving t2.micro -> t2.medium -> t2.large -> t2.micro - on all the steps the machine stayed accessible shortly after the change.

The production is lost for SSH whenever I switch it to t2.large. By this I mean that after I change to t2.large, it's not reachable anymore with a response:

ssh: connect to host ****.compute.amazonaws.com port 22: Connection refused

If I change it back to t2.medium - the SSH works again.

What might this unavailability be due to?

  • 1
    VM size should make no difference to SSH availability, and it never has for me. I suggest you take a snapshot of the working VM, you can do it on a schedule within the EC2 console using "Lifecycle Manager". Then try a t3.large or t3a.large (A = AMD), newer generation, better performance, cheaper see if it works. Move to a GP3 volume as well, faster and cheaper. But make sure you always do the snapshot before you do anything. – Tim Oct 09 '21 at 08:02
  • 1
    @Tim I indeed figured out that the type of the machine doesn't matter - SSH doesn't work in a random manner, not depending on the type. Thank you for the recommendations – Vladyslav Zavalykhatko Oct 09 '21 at 08:40
  • Might be worth closing the question, then opening another question if you need help. But do look at t3 instance types, t2 are previous generation. – Tim Oct 09 '21 at 17:36

0 Answers0