AWS EC2 instance status check is ok but server is gone [closed] - amazon-web-services

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
How can I get exact status of AWS EC2 instance?
The instance status tells ok but actually I can't login the server (via SSH).
And Cloudwatch result is like this.
This is the period of when the server is gone.
The server didn't come back until I only stop/restart instance. (reboot didn't make server working)
How and where can I check the status of instance?
And what is the reason of this?
Thank you in advance.

you can use aws cli to see the current status of your EC2 instance using the command:
aws ec2 describe-instance-status --instance-id i-1234567890abcdef0
Because cloudwatch is showing break in graph which means instance was not sending CPU utilization to it for that period of time. Generally happens when there is some load on the applications running on EC2 instance, consumes whole available memory of the instance to halt all the instance processes.
Actual instance status sometimes takes time to reflect on UI when things goes wrong with it.

Related

Stopped aws services [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I created a free account since more time to test aws services. Last week I started 2 ec2 instances and I created an EKS cluster. After one day I found 26€ as billing.
I removed all EC2 instances, the cluster EKS, the users that I created them, the users-group, I deleted every thing from the account. But the billing is still increasing without any running service. Now I have 40€. I created an incident to aws support but I don't now when they will answer me.
Do you have an idea please ? thanks
You can see exactly what you are being billed for by visiting the billing console. If you look at the bills page it will default to the current month.

What is the most economical way to set a cronjob on AWS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
Details: I have a web app on Elastic Beanstalk (web server) and I need several cronjobs to be executed. These cronjobs must connect to AWS RDS. For this, I created an Elastic Beanstalk Worker but I must pay for the worker instance to be available all day when cronjobs only need some minutes.
You can use AWS Lamda with scheduled events for this. To connect to RDS you need to place the Lambda function inside the VPC which RDS resides with required network accessibility.
This will work for short running jobs which does not exceed 5 minutes, which is the AWS Lambda maximum execution time limit.
For long running jobs you can start and stop a EC2 with AWS Lambda scheduled events, using AWS EC2 SDK.
Alternatively you can also use AWS batch scheduled with EC2 spot instances to lower the costs.

"Server refused our key" - After creating a new instance using private AMI [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I needed to upgrade my instance type, so I created an AMI from my t2.micro in us-east-1a.
I then created a new instance based on the above AMI to a t2.medium in us-east-1d.
Both have the exact same Key Name.
Both have the exact same Security Group.
Both are in the exact same VPC.
This is a web server, and the server is running fine as such.
Yet, now when I attempt to login via PuTTY, I get an error "Server refused our key".
I'm using the same Saved Session inside PuTTY and using the same PPK file and login details.
Any ideas on why this would happen?
If you want to upgrade your instance from t2.micro to t2.medium then you don't have to create an AMI for the same. You can do the same without creating an AMI. You need to stop your Instance and just go to Action -> Instance Setting -> Change Instance Type. From where you can upgrade or downgrade your Instance directly. enter image description here

On Demand Linux t2.micro Instance Hour [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I'm hosting several websites on AWS and got the charge of On Demand Linux t2.micro Instance Hour for 690hrs. I've totally no idea about when I asked for this on demand instance. Is it like my free tier instance has used up so it automatically cost the on demand instance?
Also another question is how can I know which website/ec2 instance actually cost me the on demand instance hour. I strongly believe that none of my website has large traffic.
Complete information about your billing in details you may receive on a page https://console.aws.amazon.com/billing/home
Also, check the following - have you launched one more t2.micro instance? You have possibility to use free t2.micro instance for 750 hours per month, it means that you may have only one non-stop working instance per month.
Please, check, maybe you have set up autoscaling group that launched one more instance for you and forgot to disable it?

Limit runtime for Amazon EC2 instance? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
What's a simple way for limiting runtime of an Amazon EC2 instance? I'm getting runaway instances now and then which don't shutdown for various reasons. These can cost a fortune. Is there some sort of commandline flag which says the equivalent of "shut this instance down after 5 hours"?
AFAIK the Auto-Scaling service doesn't have this ability directly.
EDIT: Although if you wanted you could create a group for auto-scaling, and set it to zero instances at a scheduled time - that way once that time is reached, all instances in the group would be shut down.
But if you have any kind of automation involved for starting and stopping these instances, you can use a cron job, Windows scheduled task, or add a delay in whatever script you're using to launch these instances to execute the ec2 instance shutdown command after a specified time period:
PROMPT> ec2-stop-instances i-10a64379
or equivalently construct an HTTP request of the form:
https://ec2.amazonaws.com/?Action=StopInstances&InstanceId.1=i-10a64379&AUTHPARAMS
Another option you have would be to create the task on the AMI itself, so that whenever the instance was started it would shut itself down after 5 hours - this might be cleaner than an outside computer being responsible for it.