Skip to content

EC2 instance disappeared and not accessible (not visible in terminated or stopped as well)

0

cloudtrail logs says "instances [[instance-id]] not in a valid state for account". I need to recover the old machine with all the configured settings and programs. I believe AWS has deleted the instance due to billing but how to recover it back since all is resolved

2 Answers
0

Which API is CloudTrail showing as returning that error, meaning the eventSource and eventName properties of the CloudTrail event?

If the service is ssm.amazonaws.com (AWS Systems Manager), then the first things to check would be that the EC2 instance is running, which you can check in the AWS Management Console under EC2, and that you're making the API call for SSM in the region where the EC2 instance resides.

If the instance is in the "stopped" state, for example, SSM would report that it's in an invalid state for the SSM Agent on the instance to accept requests, simply because the agent software can't be running while the machine is powered off. If the instance isn't showing in the EC2 console at all, then first check the region selection in the console. You can also use the EC2 Global View option in the console to have it scan all the regions in the world and report which of them contain EC2 instances or other resources.

EXPERT

answered a year ago

0

Is it the instance itself you want to recover, or just the EBS volume?

AWS
EXPERT

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.