AWS Aurora: how to restore a db cluster snapshot via aws cli?

If you create with aws rds create-db-cluster-snapshot then you can't restore with aws rds restore-db-instance-from-db-snapshot. The first creates a DB snapshot and the second restores a Cluster snapshot, different types.

From your question it looks like your restore is correct, maybe you need --database-name specified. Also you could try the restore with only the required parameters, i.e no vpc sg or DB subnet.


This is very counterintuitive. If you restore a cluster from a snapshot, but there are no member instances in the cluster, what operation has actually succeeded? It seems as if all this does is create some kind of logical entity, maybe the backing store, but no instances.

Strange. But, the API documentation does show the cluster members as an empty set in the example response.

<DBClusterMembers/>

So it seems you create a cluster, as you did, then you apparently create instances in the cluster, as explained in an AWS Forum post:

aws rds create-db-instance --db-instance-identifier my-instance --db-instance-class db.r3.large --engine aurora --db-subnet-group-name default-vpc-xxxxxx --db-cluster-identifier my-instance-cluster

https://forums.aws.amazon.com/thread.jspa?messageID=688727

Apparently the console encapsulates multiple API requests behind the same action.


Response from AWS Support:

This is a known issue when using the API calls and our engineers are working on it. Even if the cluster is visible on AWS Console after the creation via CLI it will not create any instance automatically in your Aurora Cluster. In this case, you will need to create a db-instance and associate it to your newly restored cluster. When performing this Action on the AWS Console a new instance is automatically created for the cluster, but the action from the CLI uses separated API calls.

The following documentation provides detailed information on how to create a DB instance: http://docs.aws.amazon.com/cli/latest/reference/rds/create-db-instance.html

You can describe your clusters using the AWS Console or using the CLI: http://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-clusters.html

Here is a command line example that creates the instance and associate it to a fictional cluster: aws rds create-db-instance --engine aurora --db-cluster-identifier yourauroraclusteridentifier --db-instance-class db.t2.medium --db-instance-identifier yourinstanceidentifier

In my case, --db-cluster-identifier is the cluster created from the cluster snapshot.