PostgreSQL database to Amazon RDS post-migration clean-up - Database Migration Guide
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

PostgreSQL database to Amazon RDS post-migration clean-up

After you migrate your PostgreSQL database to Amazon RDS for PostgreSQL using homogeneous data migrations in AWS DMS, you can explore several other resources:

After you’ve finished using your migration project, clean up your resources.

To clean up your AWS DMS resources

  • Sign in to the AWS Management Console and open the AWS DMS console.

  • In the navigation pane, choose Migration projects, and choose dm-project. On the Data migrations tab, choose Stop for Actions.

  • After AWS DMS stops your data migration, choose Delete for Actions and confirm your choice.

  • Choose Migration projects, and choose dm-project. Choose Delete for Actions and confirm your choice.

  • Choose Instance profiles, and choose dm-instance-profile. Choose Delete and confirm your choice.

  • Choose Data providers, and then select the check boxes for dm-postgresql-source-provider and dm-postgresql-target-provider. Choose Delete and confirm your choice.

  • Delete your database users that you created in Step 2 and Step 3.

  • Drop the replication slot and the publisher in the source database by using the following code example.

    SELECT pg_drop_replication_slot('migration_subscriber_{ARN}'); DROP PUBLICATION publication_{ARN};

Also, make sure that you delete your database secrets in AWS Secrets Manager, IAM role, IAM policy, and the virtual private cloud (VPC).