Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client = boto3.client('rds', region_name=region)
- source_snaps = client.describe_db_cluster_snapshots(DBClusterIdentifier = 'main-production')['DBClusterSnapshots']
- source_snap = sorted(source_snaps, key=byTimestamp, reverse=True)[0]['DBClusterSnapshotIdentifier']
- response = client.restore_db_cluster_from_snapshot(
- DBClusterIdentifier='main-development',
- SnapshotIdentifier=source_snap,
- Port=port,
- Engine='aurora-postgresql')
- i = client.create_db_instance(
- DBName='main',
- DBInstanceIdentifier='main-development',
- DBInstanceClass='db.r4.large',
- Engine='aurora-postgresql',
- MasterUsername='mab_admin',
- MasterUserPassword='mypassword',
- AllocatedStorage=20,
- DBClusterIdentifier='main-development')
Add Comment
Please, Sign In to add comment