AWS EC2 Instance starting time

12,024

Solution 1

You do not need to wait for the Instance Status Check to complete before using an Amazon EC2 instance.

Linux instances are frequently ready 60-90 seconds after launch. Windows instances take considerably longer because the AMI has been configured for sysprep, which involves a reboot.

New instances take longer to be ready than existing instances because they typically run code on first startup. So, if you Stop and instance and later Start it again, the instance will be available quite quickly (especially Linux instances).

Solution 2

I'm not sure that "You do not need to wait for the Instance Status Check to complete" is correct, and if the status check failed for any reason you (obviously) have a problem and should investigate before using.

Doing a quick check using a aws jdk script creating a "Nano" instance from a linux image loaded with ubuntu, apache, tomcat, java, mysql etc it took 45 secs to get "running" and 2 mins 15 secs to finish the Status Checks.

Starting an existing "stopped" instance ("Nano") took 18 secs and 2 mins 15 secs to finish the status checks.

Share:
12,024

Related videos on Youtube

Dmitry Spodarets
Author by

Dmitry Spodarets

Updated on June 04, 2022

Comments

  • Dmitry Spodarets
    Dmitry Spodarets almost 2 years

    Sometimes the starting time of the instance takes more than 5 minutes. In this case, the Status Checks takes more than 4 minutes. How can I make the instance run less than a minute, including checking the status?

    • Prashant
      Prashant about 5 years
      Besides using small images and reusing the same image in the same subnet there is not much you can do to speed it up (if you do. It want to use other technologies like containers or Lambdas). You may start instances early to cater for startup time. And I would not rely on the AWS status checks too much, just try your own application health check and depend on that.