Home > other >  Is there a way to use EC2 instance before status check is finished?
Is there a way to use EC2 instance before status check is finished?

Time:12-14

I'm building a system which will start number of EC2 instances, and do some calculations on them. Problem is that it takes somewhat around 10-12 minutes before those instances are spun up with all status checks finished. Is there a way to shorten that time somehow or at least be able to use those instances in parallel while those status checks are in progress, cause it's not that usable if i have to wait more than 10 minutes every time i want to run something on that instance?

CodePudding user response:

Yes, you can start using the instance before the status checks.

The fastest way to do this is to supply a startup script via User Data (Linux, Windows). This script will run as soon as the Operating System has finished booting.

The status checks are performed by the Amazon EC2 service external to the instance by inspecting the virtual machine and its networking connections. They do not impact the actual operation of the instance, so you can ignore their status.

Windows instances take a long time on their first boot since they go through the Windows sysprep process, while Linux instances are very fast to boot.

CodePudding user response:

How heavy is your calculations? May be you don't need the ec2s at all. Perfect scenario for Serverless. Scales well as well.

  • Related