Hi, I've a fresh deployment of Metaflow on AWS, de...
# ask-metaflow
s
Hi, I've a fresh deployment of Metaflow on AWS, deployed using the Cloudformation scripts here: https://outerbounds.com/engineering/deployment/aws-managed/cloudformation/ However, there was already an existing deployment of metaflow, on a different AWS account, which has runs and metadata. I want to copy that data over to this new deployment I've created a separate RDS in the new account, restored from a snapshot in old account What's the best way I can update the already deployed Metaflow metadata service in my new account, and have it use this new RDS?
1
a
Use the snapshot of the old AWS RDS from S3 and restore it in the new account? Something like this, although in your case you would need to enable cross account access from Account A to Account B in order to access the data. You can apply the same method when loading the data from the Metaflow S3 buckets.
s
yeah, I'm able to restore a new RDS. How do I update my already deployed metaflow now, to make it point to this new RDS?
a
The Metaflow Service is the backend which connects to the AWS RDS instance, so you will need to change that within the
~/.metaflowconfig/config.json
, which is under
METAFLOW_SERVICE_URL
. Either way you should be creating a new Metaflow configuration via
metaflow configure aws
for this new account.
s
yeah, I've created that already new Metaflow is deployed, which gave me a new service url I want to update the metadata service of this new deployment, and have it use a separate RDS I was wondering if I can change any RDS config somewhere, and have it use the separate db
a
You can update the database and its credentials within the Metaflow Metadata Service, unfortunately I am not that familiar with how to do with via the CFN template as I use Terraform for my setup. You would have to redeploy the Metaflow Metadata Service with new parameters for the database and its credentials(assuming you don’t have things setup within a VPC otherwise it gets much more complicated). Why not just use the new service url and update the AWS RDS instance with snapshot?
s
How do you update a RDS instance with new snapshot? I think only new RDS instance gets created from a snapshot?
a
1. Perform a manual snapshot from the old accounts AWS RDS to a AWS S3. 2. Enable Cross Account access from the new account to the old account to GET data from the AWS S3 bucket with the snapshot. 3. Import the data to the AWS RDS PostgreSQL DB Instance like this.
s
oh, got it. will try this, thanks!