anonn023432
anonn023432

Reputation: 3120

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:

  1. Clone an EB instance
  2. Create a snapshot of my EBS and use that to create a new volume
  3. 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.

Upvotes: 0

Views: 402

Answers (1)

Tarun Lalwani
Tarun Lalwani

Reputation: 146630

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.

Upvotes: 2

Related Questions