AWS Copy instance and data - amazon-web-services

I have an AWS instance setup which contains mysql data. I need to copy this to a new instance to run as a development database.
How can I copy the instance and the data? I believe the Create Image function just creates the setup and not the data.
Any help would be much appreciated.
Thanks
Mark

aws ec2 create-image should work - it will create a complete image of your instance, including the mysql data. So one way to do this would be to create an AMI from the current instance, then launch a new instance based upon that AMI.

Related

Copying Data from an AWS RDS instance to another RDS

I would like to copy all the data (all the databases and tables) from a RDS instance to another. Can somebody tell me how can this be done. New to AWS so pardon me if my question is obvious.
If you want to clone your instance, you don't need to copy all data, you can just create a snapshot and create a new instance from this snapshot.
Now if you really want to copy all data, because the target instance already exists or any other reason, you can use AWS DMS to do this for you.
Reference
Creating a DB Snapshot
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateSnapshot.html
Tutorial: Restore a DB Instance from a DB Snapshot
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Tutorials.RestoringFromSnapshot.html
AWS Database Migration Service Step-by-Step Walkthroughs
https://docs.aws.amazon.com/dms/latest/sbs/DMS-SBS-Welcome.html

Cloning one of the Database in AWS RDS in order to get a test DB

I am quiet new to AWS and trying to learn things. I currently have a live production environment and trying to create a test environment. I was able to create an image of an ec2 instance in AWS using the 'Create Image' option in the 'Actions'. Now I am trying to create an image/ duplicate of the RDS Database in AWS in a similar way. Is there any easy way to clone the database so that I don't change any data in the original database and perform modifications only in the test database. Thanks for all your help.
Probably worth reading up on creating snapshots and restoring from a snapshot.
To give you a quick summary; you will take a snapshot of your production RDS DB instance. Then you will launch a new DB instance from this snapshot.
As long as you don't need to launch the new instance in a separate AWS Account, the documentation should tell you all you need to know.

Create a testing copy for EC2 + EB instance

I've my application setup on AWS (EB and EC2). My database is PostgreSQL and it is stored in the EBS service provided by AWS.
I'm going to push a major change to my application (including invasive migrations), to ensure that I don't end up losing data I want to create a copy of my whole application and update the code for that.
The steps I have till now:
Clone an EB instance
Create a snapshot of my EBS and use that to create a new volume
Update the configuration settings of my EB instance to point to the new volume and deploy the new code to the EB instance
I can't find proper documentation for how to do these things on AWS so I'm looking for some confirmation about the steps I have ensure that I don't end up wrecking something.
So the way it works, you create snapshot, create a new EC2 with Disk restored from that snapshot and you have a new EC2 running instance with same DB.
But I would suggest if possible stop the postgresql or the instance before taking a snapshot, this will ensure the state of the DB is intact.
The two EC2 instances will have no relation and changes made in one DB will not impact the other.

Amazon AWS - How to copy and replace instance?

Pretty new with Amazon AWS. I've inherited the setup from another dev, and I've never used AWS before. Need some help with copy and replacing instances. Pretty much there's a dev and a production instance. I need to backup the dev instance and then replace the dev instance with the current production instance.
What I've done so far:
Created Image of test instance. SO it's currently under AMIs.
What I need:
Instructions on how to replace the current dev instance with the production one.
Additional Info:
Both instances have different Public DNS and Public IP.
Anyone got any quick instructions on how to accomplish this?
Thanks!
The 'quick' instructions are to simply create an AMI of the production image (shut it down first), then you use that saved AMI as the basis for creating a new instance. You'll end up with 3 instance, and you can delete your old dev instance once you confirm the new copy of production came up as you wanted - you don't actually 'replace' the dev instance, (you create new and delete the old).
Lots of links to be found for this, but here is one:
http://docs.aws.amazon.com/AWSToolkitVS/latest/UserGuide/tkv-create-ami-from-instance.html

Not able to create AWS instance

I have a running micro strategy instance in AWS (Amazon Web Services). I created a snap shot of my running instance, after which I created a AMI using the snap shot. When i tried to create a new instance with the image I was not able to create it. I am getting a failure message.
My currently running AMI is : ami-b1b9cdd8
MY AMI created from the snapshot : ami-817320e8
Kindly help me on the same
It is not possible to create a (working) AMI from a snapshot of a Windows instance. Instead, create the AMI directly from the instance (not via a snapshot).