I have 4 existing AWS EC2 instances that have been running well.
I changed the instance type on all of them at the same time and following the same process.
I went from t3.small to t3.large as well as the EBS type, going from gp2 to gp3.
It worked for 3 instances but 1 is now having this error:
EC2 can't retrieve the platform because the AMI was either deleted or made private.
I cannot SSH anymore with this instance nor "Connect" to it via the AWS Console, but it's still running well.
I tried reverting to t3.small, and launch the AWSSupport-TroubleshootSSH automation script, but none worked.
Any clues on how to fix this besides launching a new instance? Thank you!
Actually I am getting below error while trying to launch 2nd EC2 instance. I am using AWS free tier. From some blogs I come to know we can launch 20 instance without requesting for limit increase. but I am not able to launch 2nd instance itself. Please let me know if I am missing any other factor which should be considered. I am using Ohio region.
Your quota allows for 0 more running instance(s). You requested at
least 1
Can anyone suggest on this?
The count 20 depends on the instance type. For example if your instance type is p2.xlarge instance then you can run only one EC2 instance.
Please find the list of instance type and limit here.
If your instance type is eligible for 20 and you cannot spin up 20 instances, then You can request for a limit increase.
I use Terraform to launch 6 new m3.medium EC2 instances via different Auto Scaling Groups.
4 out of 6 have state: running but status_check: Insufficient data or 1/2 checks passed. Basically only 2 launch correctly.
It seems really strange behaviour and I was wondering if anyone else encountered it.
Does it have to do with some limit of this type in specific region/AZ ?
Any pointer would be appreciated.
I am experimenting with Amazon EC2.
When I signup to EC2 and launched the console - I got a Default Instance already running.
I terminated the Default Instance and Launched Another instance - Windows 2008 with .net and SQL.
Now the issue is - I have 2 Instances running.
Unable to stop or Terminate the Defaul-Environment Instance.
I have setup the complete environment in the other instance - if I terminate that, all the setting will be lost.
I am afraid since 2 instances are running - I will be out of the free tier usage in 15 days only - and they will start charging.
Kindly advise.
Thanks
Saurabh
If you don't want to lose your environment you can create an Image (AMI) for the instance where you have all your environment. Like this:
Later, you can launch a new instance with the Image that you created. That instance will be an exact copy of the one that you create the Image (AMI) from.
The free tier only applies to a single instance, so if you have two instances running you will get charged for the second instance anyways.
I have spent many hours to figure out why my CloudFormation template failed using WaitCondition. The template error out: WaitCondition timed out. Received 0 conditions when expecting 1 . Note that I did make sure that my AMI has cfn-signal command preinstall in my AMI.
I have attached following screenshot of my template:
I googled and found some people have the same issue like: http://virtuallyhyper.com/2013/02/cloudformation-waitcondition-timed-out-error/ . However, in my case, the cfn-signal command does exist. So until now I still don't know how to fix the issue.
Thanks
Ok, the problem is because you're using an auto-scaling launch config. Wait signals only really work when creating a real instance. Otherwise cloud formation creating the scaling group, and is waiting for an instance that is only created after your scaling group decides it needs to scale up one or more instances. Unfortunately, because the rest of the scaling group is waiting for a signal to be signalled (by a concrete instance), the scaling group never registers, therefore never creates the instance. Kind of a deadlock - or at the very list - an exceedingly long period of time forcing the timeout.
Cloud Formation won't complete registration of the scaling group until the wait is signalled
The wait will only signal after the registration of the scaling group AND an instance is created.
If you remove the launch config, and have it create a concrete instance - then your wait condition will signal.
Did the instance get launched on EC2 ? If yes, can your instance reach your node which is running the Cloud formation ? I ran into these issues and discovered that since I was behind a firewall, the AWS instance cannot reach my node and the node times out waiting for the instance to connect back.
You shouldn't use sudo in UserData scripts. They are run as root.
I have a couple of ideas:
In all the examples I've seen, and in my own templates, I use the full path to cfn-init:
/opt/aws/bin/cfn-init
/opt/aws/bin/cfn-signal
Have you tried to use the cfn-init command without the "-c install"?
I encountered the same problem and tried everything above. I changed the wait timeout to 3000 and was successful.