- Type the following command:
aws rds restore-db-instance-from-db-snapshot \ --db-snapshot-identifier <name-of-snapshot-to-restore > \ --db-instance-identifier <name-for-new-db> \ --db-subnet-group-name <your-db-subnet-group> \ --multi-az
- You may have noticed that this command creates a new database in the default security group. This happens because the restore-db-instance-from-db-snapshot doesn't accept a security group ID as a parameter. You'll have to run a second command to assign a nondefault security group to the new database:
aws rds modify-db-instance \ --db-instance-identifier <name-of-newly-restored-db> \ --vpc-security-group-ids <id-of-security-group>
The modify-db-instance command will return an error ...