Why do Spot Instances(EC2) change from cancelled_terminating to cancelled? - amazon-web-services

I have been struggling with this since last 2 days - A. Trying to create AWS Spot Instance with Deep Learning AMI for Linux (free).
B. Upon launching EC2 Instance it says Spot Instance request successfully created but it fails to create the instance.
C. Using Spot Fleet role, and later have been trying to change it to provide Admin access to this role through Policies.
However, the instance is never created and in the History tab I see Event Type = fleetRequestChange goes from Submitted, active, cancelled_terminating within a minute and later cancelled.
I have been reading through its documentation but don't see a reason for it to fail. Verified the Region and AMI as well. Tried changing bid price and with default recommended option as well. But nothing seems to work.
This is the link I'm referring - AWS setup for Deep Learning
Please skip the initial portion of getting credits and you can directly jump to EC2 instance configuration setup.
Kindly help! I am unable to proceed for the past 2 days.
Thank you!

It worked perfectly fine for me.
Launched the Deep Learning AMI (ami-df77b6a7) in the Oregon region
Spot pricing as documented in the article you referenced
I could ssh into the instance after it launched
One thing you could check... Click the Limits link in your EC2 console to confirm that you can launch this type of instance.
Mine said:
Running On-Demand g2.2xlarge instances: 5

Related

My EBS volume (attached to live instance) and all snap shots vanished

Yesterday I had a nightmarish experience with my AWS account.
In short:‎
‎1.‎ My only running instance was taken out of service in response to an EC2 instance status checks ‎failure at 2021-09-23T19:00:46Z. ‎
‎2.‎ A new instance was started in response to a difference between desired and actual capacity, ‎increasing the capacity from 0 to 1 at 2021-09-23T19:01:06Z.‎
‎3.‎ Volume attached to my running instance was gone along with all data, software etc. nowhere ‎to be found.‎
‎4.‎ All the weekly snap shots of this volume are also gone, so I cannot recreate volume.
‎
I am using AWS services for many many years and it never happened to me. I am very surprised that this can happen on AWS.‎
I have posted the question on AWS EC2 discussion forum. But I noticed that they rarely answer any question.
Should I buy there "Developer Support" for $29 per month but I am not sure even that will solve the problem. And how they will ensure that it does not happen again.
Any advice what should I do in this situation?
PS: Only now I realized the importance of good customer support when choosing cloud service provider.
The message that "A new instance was started in response to a difference between desired and actual capacity" indicates that you were using an Amazon EC2 Auto Scaling Group.
Auto Scaling groups will automatically launch new instances when capacity is required and terminate instances when there is too much capacity. Also, if an instance fails health checks, it will be automatically terminated and replaced with a new instance.
When Auto Scaling terminates an instance, the EC2 instance is 'killed'. Any Amazon EBS volumes attached to the instance will, by default, also be deleted unless Delete on Termination is intentionally turned off.
When operating under an Auto Scaling group, it is not a good idea to store data on the instance itself because instances can be launched and terminated. Data should be stored in a database, or in Amazon S3 or Amazon EFS.
AWS might be able to recover that data if the volumes were recently deleted. Yes, you would need to subscribe to AWS Support to request assistance.
It is unfortunate that your instance was launched under Auto Scaling many years ago, which led to this problem. On the plus side, it shows the reliability of Amazon EC2 since was running without issue for all those years (until now).

How can I connect to a running AWS instance when my dashboard says no instances are running?

I feel like this is a beginner question, but after messing with it for days I'm completely stumped.
I set up an instance on Amazon AWS last year, and I'd like to SSH into the instance to upgrade some software. I am unable to find the original .pem file anywhere, and everything I find to try to solve the problem — including these directions — refer to selecting the running instance on my EC2 Dashboard.
However, when I log in as a root user, it shows there are no running instances. By default it comes up as N. Virginia, but when I check the other US locations none of them show any running resources. My instance's address (the link I use for mySQL and phpMyAdmin, for example) is in the form of ec2-XXX-XXX-XXX-XXX.ca-central-1.compute.amazonaws.com, if that makes any difference.
Any ideas on next steps? I have all the data on the running instance backed up so I can recreate things as necessary. I admit that I'm a beginner with AWS (obviously) but I super-pinky-promise to store my .pem file in a safe place next time...
By default it comes up as N. Virginia, but when I check the other US
locations none of them show any running resources. My instance's
address (the link I use for mySQL and phpMyAdmin, for example) is in
the form of ec2-XXX-XXX-XXX-XXX.ca-central-1.compute.amazonaws.com, if
that makes any difference.
Your instance is running in the AWS Canada region, as indicated by the region name ca-central-1 in the address, which is why you aren't seeing it in any US region.

Amazon EC2 instance passed 1/2 checks

Newbie to Amazon Web Services here. I launched an instance from a Public AMI and found that I could not ssh into the instance - I received the error "Connection timed out." I checked the security groups to verify that Port 22 was associated with 0.0.0.0/0. Additionally, I checked the route tables to verify that 0.0.0.0/0 is associated with target gateway attached to the VPC.
I find that only 1/2 status checks have passed - the instance status check failed. I have tried stopping and starting the instance as well as terminated and launching a new instance, both to no avail. The error that I see in the system log is:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1).
From this previous question, it appears that this could be a virtualization issue, but I'm not sure if that was due to something I did on my end when launching the instance or something that occurred from the creators of the AMI? Ec2 1/2 checks passed
Any help would be appreciated!
Can you share any more details about how you deployed the instance? Did you use the AWS Management Console, or one of the command line tools or SDKs to deploy it? Which public AMI did you use? Was it one of the ones provided by Amazon?
Depending on your needs, I would make sure that you use one of the AMIs provided by Amazon, such as Ubuntu, Amazon Linux, CentOS, etc. Here's the links to the docs on AMIs, but you can learn quite a bit by just searching for images. Since you mentioned virtualization types though, I'd suggest reading up briefly on the HVM vs. Paravirtual virtualization types on AWS. Each of the instance types / families uses a certain virtualization type, which is indicated in the chart on this page.
Instance Status Checks
This documentation page covers the instance status checks, which you'll probably want to familiarize yourself with. It's entirely possible that shutting down (not restart, but shutdown) and then starting the instance back up might resolve the instance status check.
Spot Instances - cost savings!
By the way, I'll just mention this since you indicated that you're new to AWS ... if you're just playing around right now, you can save a ton of cost by deploying EC2 Spot Instances, instead of paying the normal, on-demand rates. Depending on current rates, you can save more than 50%, and per-second billing still applies. Although there's the possibility that your EC2 instance could get "interrupted" based on market demand, you can configure your Spot Instance to just "Hibernate" or "Stop" instead of terminating and relaunching. That way, your work is instance state is saved for when it relaunches.
Hope this helps!
1) Use well-known images or contact with the image developer. Perhaps it requires more than one drive or tricky partitioning.
2) make sure you selected proper HVM/PV image according to the instance type.
3) (after checks are passed) make sure the instance has public ip

AWS RDS: Can't get modify of Instance Class to go through

In the AWS RDS Console using an IAM user with full permission, I selected our current RDS instance which is a db.t1.micro, clicked on "Instance Actions" and chose "Modify". I then changed both the MySQL version to 5.6.37 (current version is 5.6.34) and the Instance Class to db.t2.small. I also checked the "Apply Immediately" checkbox, and applied the modification. However, the modification didn't happen.
Instead, I'm seeing the following in the Maintenance Details for the instance:
Maintenance Window: sat:20:00-sat:20:30
Pending Modifications: DB Instance Class: db.t2.small, Engine Version: 5.6.37
Pending Maintenance: None
I figured maybe the "Apply Immediately" didn't go through, so I decided to just wait for the Maintenance window this Saturday. However, nothing happened on Saturday, and the situation remains the same.
This morning I tried using "Modify Instance" again and made sure I for sure selected the "Apply Immediately", but the result is the same.
I also tried to use the command-line interface to upgrade the instance with this command:
aws rds modify-db-instance --db-instance-identifier xxxxx --db-instance-class db.t2.small --apply-immediately
But this gives the following error (perhaps a hint?):
Service rds not available in region US West (Oregon)
The instance I tried to modify is in the US West (Oregon) region.
Any help is appreciated. I'm willing to use a different method to upgrade the instance, but I'm hoping to avoid having to change all the DB address and login settings on our websites and applications.
I solved this issue by stopping the instance with a saved snapshot and then started it again. This cleared out the "Pending Maintenance" but did not actually perform the upgrade. I then went through the "Modify" action again but only chose to modify the instance class. This time the modify happened right away and now it's the correct instance class.

Creating EC2 Amazon instance from AMI

I have a t1 (free) EC2 Amazon instance running for an year already.
I created an AMI from this instance and then tried to create another EC2 t1 instance from this AMI (using right button menu / Launch).
The instance was created, its state has changed to running, but each time I try to retrieve an initial Windows password, I am getting the "Your password is not ready" notification.
I know it may take some time, but it is now 20 hours already since I created an instance. Isn't it too long? Have somebody else experienced such a long delay?
Unfortunately, as I am working with free micro servers, Amazon support is not willing to help me.
You are NOT reading the complete message where it is telling you Your password is not ready.
The custom Windows AMI will inherit the password from the instance which it was created from. Read the message I pointed out above completely. You will find it yourself.