RDS snapshot restore

The goal of rds-snapshot-restore is to automate the AWS RDS restore/creation/modifications process. This without impacting production and leveraging the AWS snapshot and point in time restore capabilities.

Remarks

  • Make sure the deletion protection is on
  • Provide a valid security group id. If the database is marked publicly make sure the SG is created in the correct VPC
  • This script wil delete the previously created database -restoretargetdatabase=

Example to run command:

AWS_PROFILE=yourprofile go run rds_restore.go -database=yourdatabase -restoretargetdatabase=yourdatabase-restore -region=eu-west-1 -securitygroup=sg-123456 -restoredmasterpassword=yourpassword -dbparametergroup=rds-restore

IAM

        "rds:Describe*",
        "rds:List*",
        "rds:CreateDBInstance",
        "rds:DeleteDBInstance",
        "rds:RestoreDBInstanceToPointInTime",
        "rds:ModifyDBInstance",
        "rds:ApplyPendingMaintenanceAction",
        "rds:RebootDBInstance"```