How to do it...

  1. 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
  1. 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 ...

Get AWS Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.