Creating an instance from an AMI created from a six year old instance

0

We acquired a company that has an EC2 web app in the that company's AWS account. The previous company did not have source code or backups for the web app, the root PEM file, and it has not been updated/patched in six years. This app was built by a third-party and the third-party is no longer available/alive. All the data is stored in a MySQL Db in the EC2 image. We don't have logins to that either. We do have access to the AWS account. The EC2 in question uses "paravirtual", not HVM. The kernel is "aki-880531cd " and the instance is m3.xlarge. Region is west-us-1. Instance is not encrypted.

My goal is to create an AMI and build an instance in our AWS account and do our best to secure it via networking controls until we can make additional business decisions. We need to get it under our control.

I was able to create a private AMI and build an EC2 instance in our corporate account from this EC2 image. Choosing m3.xlarge allows the image to create, but it dies stops immediately with "user initiated stop." I am not stopping it as a user - it stops itself. The instance shows HVM, not paravirtual. I think it needs to be paravirtual but I don't see that as an option.

If I build the image and pick the actual kernel mentioned above along with m3.xlarge, I get an error about cannot create multiple instances. My searching reports that the user initiated stop often happens due to the wrong virtualization. The AMI seems to be created as HVM though the instance is not.

Can any recommend either a primary or alternative solution?

IRP-100
asked 7 months ago199 views
1 Answer
0
Accepted Answer

Hi IRP,

First and foremost, ensure you take a snapshot of the current EC2 instance and its associated EBS volumes. This acts as a safeguard against any inadvertent data loss.

Regaining Access to MySQL Database: If you don't have the credentials for the MySQL database:

  • Consider forensic methods to recover the MySQL root password. Typically, you'd stop the MySQL service, restart it with --skip-grant-tables, then log in as root, and change the password.
  • Once you've gained access, secure a backup using mysqldump.

Addressing the PV Instance Type:

  • Paravirtual (PV) instances, being older, have largely been superseded by HVM. Directly transitioning from PV to HVM can be challenging.
  • A practical approach involves creating a new EC2 instance with HVM virtualization. Then, manually migrate application and database files from the old PV instance to this new HVM instance.
profile picture
answered 7 months 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.

Guidelines for Answering Questions