Help us understand the problem. What is going on with this article?

Aurora を AWS CLI でスナップショットから復元する

More than 1 year has passed since last update.

Aurora をスナップショットから CLI で復元します。



  1. Aurora クラスターの復元
  2. クラスターへのインスタンスの追加

aurora のスナップショットはどうやらクラスターのスナップショットとして保存されるようで、restore-db-instance-from-db-snapshot では復元できませんでした。

$ aws rds restore-db-instance-from-db-snapshot --cli-input-json file://restore-db-instance-from-db-snapshot.json

An error occurred (DBSnapshotNotFound) when calling the RestoreDBInstanceFromDBSnapshot operation: DBSnapshot not found: test-aurora

1. restore-db-cluster-from-snapshot

$ cat restore-db-cluster-from-snapshot.json
    "AvailabilityZones": [
        "ap-northeast-1a", "ap-northeast-1c", "ap-northeast-1d"
    "DBClusterIdentifier": "test-aurora-cluster",
    "SnapshotIdentifier": "test-aurora",
    "Engine": "aurora-mysql"

$aws rds restore-db-cluster-from-snapshot --cli-input-json file://restore-db-cluster-from-snapshot.json

2. create-db-instance

$ cat create-db-instance.json
    "DBInstanceIdentifier": "test-aurora",
    "DBInstanceClass": "db.t2.small",
    "Engine": "aurora-mysql",
    "PubliclyAccessible": false,
    "DBClusterIdentifier": "test-aurora-cluster",
    "CopyTagsToSnapshot": true

$ aws rds create-db-instance --cli-input-json file://create-db-instance.json
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away