AWS Production-Grade Migration: Resource Cleanup (Part 5)

Learn how to safely clean up AWS resources after migration projects. This comprehensive guide covers systematic resource deletion, cost optimization, and best practices for AWS resource management to prevent unexpected charges.

AWS Production-Grade Migration: Resource Cleanup (Part 5)

Table of Contents

AWS Production-Grade Migration: Resource Cleanup (Part 5)

Overview

In this comprehensive guide, we’ll systematically clean up all AWS resources created during our migration project. Following the proper deletion order is critical to avoid dependency errors and ensure you stop incurring charges. This final phase completes our production-grade migration journey with cost optimization and resource management best practices.

Estimated Time: 30-40 minutes
Region: ap-south-1 (Mumbai)
Difficulty: Beginner


Why This Matters for Cloud Migration

Proper resource cleanup is essential for:

  • Cost optimization - Preventing unexpected charges from forgotten resources
  • Security best practices - Removing unnecessary access points and credentials
  • Resource management - Learning proper AWS resource lifecycle management
  • Production readiness - Understanding cleanup procedures for real-world scenarios
  • Cost consciousness - Developing habits for cost-effective cloud operations

⚠️ Critical Warnings

  1. This is destructive and irreversible! Once deleted, resources cannot be recovered.
  2. Follow the exact order - Deleting resources out of order will fail due to dependencies.
  3. Verify you’re in the correct region - ap-south-1 (Mumbai)
  4. Take final backups if you need to keep any data
  5. Document everything before deletion for your portfolio/resume
  6. Check the “Success” status after each step before proceeding

Cost Impact

Following this guide will eliminate ALL ongoing charges from this project:

Current Daily Costs (if all resources running):

  • Source EC2 (t2.micro): ~$0.28/day
  • Source RDS (db.t3.micro): ~$0.41/day
  • Target EC2 (migrated, t2.micro): ~$0.28/day
  • Target RDS Multi-AZ (db.t3.micro): ~$0.82/day
  • DMS Replication Instance (if running): ~$0.86/day
  • Load Balancer (if created): ~$0.60/day
  • NAT Gateway (if created): ~$1.08/day
  • Total: $3-4/day or $90-120/month

After cleanup: $0/day


Pre-Cleanup Checklist

Before starting deletion, complete these tasks:

Documentation

  • Take screenshots of:
    • MGN console showing completed migration
    • DMS console showing successful data transfer
    • Migration Hub dashboard showing both migrations
    • Architecture diagrams from AWS console
    • Application working in target environment

Backups (if needed)

  • Create final RDS snapshot of production-db (if you want to keep data)
  • Export any important logs from CloudWatch
  • Download application code and configuration
  • Export Migration Hub reports

Verification

  • Confirm you’re done testing
  • Verify all learning objectives met
  • Take notes for your portfolio/resume
  • Copy all resource IDs from phases to a document

Cleanup Order Overview

Phase 1: Stop Active Services (DMS, Replication)
    ↓
Phase 2: Delete Compute Resources (EC2, MGN)
    ↓
Phase 3: Delete Database Resources (RDS, DMS)
    ↓
Phase 4: Delete Network Resources (ALB, VPC Peering)
    ↓
Phase 5: Delete VPC Components (Subnets, IGW, SGs)
    ↓
Phase 6: Verify and Final Cleanup

Phase 1: Stop Active Services

Step 1.1: Delete DMS Resources

⚠️ Do this first to stop DMS charges immediately

Delete Migration Tasks

  1. Go to DMS ConsoleDatabase migration tasks
  2. If any tasks are running, select them and ActionsStop
  3. Wait for status to change to “Stopped”
  4. Select each task:
    • migrate-legacy-to-production
  5. ActionsDelete
  6. Confirm deletion
  7. Wait for deletion to complete

Delete DMS Replication Instance

  1. Go to Replication instances
  2. Select legacy-to-production-replication
  3. ActionsDelete
  4. Confirm deletion
  5. Wait 5-10 minutes for deletion to complete
  6. ✅ Verify: Instance should disappear from list

💰 Cost Impact: Saves ~$26/month

Delete DMS Endpoints

  1. Go to Endpoints
  2. Select legacy-db-source-endpoint
  3. ActionsDelete
  4. Confirm deletion
  5. Repeat for production-db-target-endpoint
  6. ✅ Verify: Both endpoints deleted

Delete DMS Subnet Groups

  1. Go to Subnet groups
  2. Select dms-target-subnet-group
  3. ActionsDelete
  4. Confirm deletion

Step 1.2: Archive MGN Source Servers

  1. Go to Application Migration Service Console
  2. Go to Source servers
  3. Select your source server
  4. If status is “Cutover complete”, proceed
  5. ActionsMark as archived
  6. Confirm archiving
  7. This removes the server from active view but keeps history

💰 Cost Impact: Stops MGN replication charges (if any were still running)


Phase 2: Delete Compute Resources

Step 2.1: Terminate EC2 Instances

Order matters: Terminate in this sequence:

Terminate Test Instances (if any)

  1. Go to EC2 ConsoleInstances
  2. Find instances with names like mgn-test-*
  3. Select them (checkbox)
  4. Instance stateTerminate instance
  5. Confirm by typing “terminate”
  6. Wait for state to change to “Terminated”

Terminate Migrated/Cutover Instance

  1. Find instance: migrated-web-server (or mgn-cutover-*)
  2. Select it
  3. Instance stateTerminate instance
  4. Confirm termination
  5. Wait for state to change to “Terminated”

💰 Cost Impact: Saves ~$8.50/month per instance

Terminate Bastion Host (if created)

  1. Find instance: target-bastion-host
  2. Select it
  3. Instance stateTerminate instance
  4. Confirm termination

Terminate Source Web Server

  1. Find instance: on-prem-web-server
  2. Select it
  3. Instance stateTerminate instance
  4. Confirm termination
  5. Wait for state to change to “Terminated”

⚠️ Wait 5 minutes before proceeding to ensure all instances are fully terminated.

✅ Verify: All instances show “Terminated” status

Step 2.2: Release Elastic IPs (if any)

  1. Go to EC2Elastic IPs
  2. For each Elastic IP not associated with an instance:
  3. Select it
  4. ActionsRelease Elastic IP addresses
  5. Confirm release

💰 Cost Impact: Elastic IPs cost $0.005/hour when not attached (~$3.60/month)

Step 2.3: Delete EC2 Key Pairs (optional)

⚠️ Only do this if you’re completely done with the project

  1. Go to EC2Key Pairs
  2. Select on-prem-web-key
  3. ActionsDelete
  4. Confirm by typing the key pair name
  5. Also delete the .pem/.ppk file from your local computer

Step 2.4: Clean Up MGN Resources

  1. Go to Application Migration Service
  2. Go to SettingsReplication settings template
  3. If any custom templates exist, delete them (default is fine)
  4. The archived source server will remain in history but won’t incur charges

Phase 3: Delete Database Resources

Step 3.1: Create Final Snapshots (Optional)

If you want to keep the data for future reference:

Snapshot Production Database

  1. Go to RDS ConsoleDatabases
  2. Select production-db
  3. ActionsTake snapshot
  4. Snapshot name: production-db-final-snapshot-2025-10-17
  5. Click Take snapshot
  6. Wait for status to show “Available” (5-10 minutes)

Snapshot Source Database

  1. Select legacy-db
  2. ActionsTake snapshot
  3. Snapshot name: legacy-db-final-snapshot-2025-10-17
  4. Click Take snapshot

💰 Cost Impact: Snapshots cost $0.095/GB-month (for ~20GB = ~$2/month) To save costs, delete snapshots after a few days if not needed

Step 3.2: Delete RDS Databases

⚠️ This is irreversible! Data will be permanently lost.

Delete Production Database (Multi-AZ)

  1. Go to RDS ConsoleDatabases
  2. Select production-db
  3. ActionsDelete
  4. A dialog appears with options:
    • Create final snapshot:
      • Choose No if you created one in Step 3.1
      • Choose Yes if you skipped Step 3.1
    • Retain automated backups: Uncheck (they cost money)
    • Acknowledgment: Type delete me in the text box
  5. Click Delete
  6. Wait 10-15 minutes for Multi-AZ deletion (takes longer than single-AZ)

💰 Cost Impact: Saves ~$25/month

Delete Source Database

  1. Select legacy-db
  2. ActionsDelete
  3. Configure deletion:
    • Create final snapshot: No (or Yes if you want)
    • Retain automated backups: Uncheck
    • Type delete me
  4. Click Delete
  5. Wait 5-10 minutes for deletion

💰 Cost Impact: Saves ~$12/month

✅ Verify: Both databases should disappear from the list

Step 3.3: Delete RDS Subnet Groups

  1. Go to RDS ConsoleSubnet groups
  2. Select target-production-db-subnet-group
  3. ActionsDelete
  4. Confirm deletion
  5. Repeat for on-prem-db-subnet-group

Step 3.4: Delete Automated Backups (if any remain)

  1. Go to RDS ConsoleAutomated backups
  2. Select any backups listed
  3. ActionsDelete
  4. Confirm deletion

💰 Cost Impact: Backups cost $0.095/GB-month

Step 3.5: Delete Manual Snapshots (if you don’t need them)

⚠️ Only do this if you’re sure you don’t need the data

  1. Go to RDS ConsoleSnapshots
  2. Select each snapshot you created
  3. ActionsDelete snapshot
  4. Confirm deletion

Phase 4: Delete Network Resources

Step 4.1: Delete Application Load Balancer (if created)

  1. Go to EC2 ConsoleLoad Balancers
  2. Select migrated-app-alb (if you created one)
  3. ActionsDelete load balancer
  4. Type confirm to confirm deletion
  5. Click Delete
  6. Wait 2-3 minutes for deletion

💰 Cost Impact: Saves ~$18/month

Step 4.2: Delete Target Groups

  1. Go to EC2Target Groups
  2. Select migrated-web-tg (if you created one)
  3. ActionsDelete
  4. Confirm deletion

Step 4.3: Delete NAT Gateways (if created)

⚠️ NAT Gateways are expensive (~$32/month) - make sure to delete!

  1. Go to VPC ConsoleNAT Gateways
  2. Filter by VPC: aws-target-vpc
  3. Select any NAT Gateways
  4. ActionsDelete NAT gateway
  5. Type delete to confirm
  6. Click Delete
  7. Wait 5 minutes for deletion
  8. Repeat for on-prem-vpc if you created any there

💰 Cost Impact: Saves ~$32/month per NAT Gateway

Release NAT Gateway Elastic IPs

After NAT Gateway deletion:

  1. Go to EC2Elastic IPs
  2. Find any unassociated Elastic IPs (were used by NAT Gateways)
  3. Select each one
  4. ActionsRelease Elastic IP addresses
  5. Confirm release

Step 4.4: Delete VPC Peering Connection

  1. Go to VPC ConsolePeering connections
  2. Select on-prem-to-target-peering
  3. ActionsDelete peering connection
  4. Confirm deletion
  5. ✅ Verify: Status changes to “Deleted”

Phase 5: Delete VPC Components

⚠️ Order is critical in this phase!

Step 5.1: Delete Target VPC (aws-target-vpc)

We’ll delete the target VPC first since it has more components.

Delete Network Interfaces (if any remain)

  1. Go to EC2 ConsoleNetwork Interfaces
  2. Filter by VPC: aws-target-vpc
  3. For each interface with status “Available” (not “In-use”):
  4. Select it
  5. ActionsDelete
  6. Confirm deletion

⚠️ If deletion fails with “in use” error:

  • Wait 5 minutes and retry (terminated instances take time to release interfaces)
  • Check if any Lambda functions or other services are using the VPC

Delete Security Groups (Target VPC)

⚠️ Cannot delete the default security group

  1. Go to VPC ConsoleSecurity Groups
  2. Filter by VPC: aws-target-vpc
  3. Select these security groups (in order):
    • target-bastion-sg (if exists)
    • target-dms-sg
    • target-web-sg
    • target-db-sg
  4. For each one:
    • ActionsDelete security groups
    • Confirm deletion

If deletion fails: Security groups reference each other

  • Go to each SG’s Inbound rules
  • Remove any rules that reference other security groups
  • Then retry deletion

Delete Subnets (Target VPC)

  1. Go to VPC ConsoleSubnets
  2. Filter by VPC: aws-target-vpc
  3. Select ALL subnets:
    • Public subnets (2)
    • Private app subnets (2)
    • Private DB subnets (2)
  4. ActionsDelete subnet
  5. Confirm deletion

If deletion fails:

  • Check for remaining network interfaces
  • Check for Lambda functions in the VPC
  • Check for RDS instances (should be deleted in Phase 3)

Delete Route Tables (Target VPC)

  1. Go to VPC ConsoleRoute Tables
  2. Filter by VPC: aws-target-vpc
  3. Select all route tables EXCEPT the default (main) route table
  4. ActionsDelete route table
  5. Confirm deletion

Delete Internet Gateway (Target VPC)

  1. Go to VPC ConsoleInternet Gateways
  2. Find the IGW attached to aws-target-vpc
  3. Select it
  4. ActionsDetach from VPC
  5. Confirm detachment
  6. Wait for status to change to “Detached”
  7. Select it again
  8. ActionsDelete internet gateway
  9. Confirm deletion

Delete VPC (Target VPC)

  1. Go to VPC ConsoleYour VPCs
  2. Select aws-target-vpc
  3. ActionsDelete VPC
  4. Type delete to confirm
  5. Click Delete
  6. ✅ Verify: VPC is deleted

💰 Cost Impact: VPCs themselves are free, but this ensures no hidden resources remain

Step 5.2: Delete Source VPC (on-prem-vpc)

Repeat the same process for the source VPC:

Delete Network Interfaces (Source VPC)

  1. Go to EC2Network Interfaces
  2. Filter by VPC: on-prem-vpc
  3. Delete all interfaces with status “Available”

Delete Security Groups (Source VPC)

  1. Filter by VPC: on-prem-vpc
  2. Delete in order:
    • on-prem-web-sg
    • on-prem-db-sg

Delete Subnets (Source VPC)

  1. Filter by VPC: on-prem-vpc
  2. Select all subnets:
    • on-prem-public-subnet-1a
    • on-prem-private-subnet-1a
  3. ActionsDelete subnet

Delete Route Tables (Source VPC)

  1. Filter by VPC: on-prem-vpc
  2. Delete non-default route tables:
    • on-prem-public-rt
    • on-prem-private-rt (if you renamed it)

Delete Internet Gateway (Source VPC)

  1. Find IGW attached to on-prem-vpc: on-prem-igw
  2. ActionsDetach from VPC
  3. Wait for detachment
  4. ActionsDelete internet gateway

Delete VPC (Source VPC)

  1. Select on-prem-vpc
  2. ActionsDelete VPC
  3. Type delete to confirm
  4. Click Delete
  5. ✅ Verify: VPC is deleted

Phase 6: Clean Up Supporting Services

Step 6.1: Delete CloudWatch Log Groups

  1. Go to CloudWatch ConsoleLogsLog groups
  2. Delete these log groups (if they exist):
    • /aws/dms/tasks/migrate-legacy-to-production
    • /aws/lambda/* (if any were created)
    • /aws/rds/instance/legacy-db/*
    • /aws/rds/instance/production-db/*
  3. For each log group:
    • Select it
    • ActionsDelete log group(s)
    • Confirm deletion

💰 Cost Impact: Log storage costs $0.50/GB-month

Step 6.2: Delete CloudWatch Alarms

  1. Go to CloudWatchAlarmsAll alarms
  2. Select any alarms you created for this project
  3. ActionsDelete
  4. Confirm deletion

Step 6.3: Delete IAM Roles and Users (Optional)

⚠️ Only delete if they were created specifically for this project

Delete DMS IAM Roles

  1. Go to IAM ConsoleRoles
  2. Search for and delete:
    • dms-vpc-role (if it exists and not used by other DMS tasks)
    • dms-cloudwatch-logs-role (if exists)

⚠️ DO NOT delete these default AWS service roles:

  • AWSApplicationMigrationReplicationServerRole
  • AWSApplicationMigrationConversionServerRole
  • These are used by MGN service and may be needed if you use MGN again

Delete MGN IAM User

  1. Go to IAM ConsoleUsers
  2. Select mgn-replication-user
  3. Delete user
  4. Confirm by typing the username

Step 6.4: Clean Up S3 Buckets (if any)

Check if MGN or DMS created any S3 buckets:

  1. Go to S3 Console
  2. Look for buckets with names like:
    • aws-application-migration-service-*
    • dms-*
  3. If you find any:
    • Click on the bucket
    • Empty the bucket first (select all objects and delete)
    • Then Delete the bucket

Step 6.5: Delete Systems Manager Parameters (if any)

  1. Go to Systems ManagerParameter Store
  2. If you stored any database credentials or configuration
  3. Select each parameter
  4. ActionsDelete

Phase 7: Final Verification

Step 7.1: Verify All Resources Deleted

Go through each service and verify nothing remains:

EC2 Resources

  • Instances: All terminated (can take 1 hour to disappear completely)
  • Security Groups: Only default SGs remain
  • Elastic IPs: All released
  • Key Pairs: Deleted (if you chose to)
  • Load Balancers: None remaining
  • Target Groups: None remaining
  • Network Interfaces: Only default/system interfaces remain

VPC Resources

  • VPCs: Only default VPC remains (don’t delete default!)
  • Subnets: Only default subnets remain
  • Route Tables: Only default route tables remain
  • Internet Gateways: Only default IGW remains (if any)
  • NAT Gateways: All deleted
  • VPC Peering: All deleted

RDS Resources

  • Databases: All deleted
  • Snapshots: Deleted or kept intentionally
  • Subnet Groups: All deleted
  • Parameter Groups: Only defaults remain
  • Automated Backups: All deleted

DMS Resources

  • Replication Instances: All deleted
  • Endpoints: All deleted
  • Tasks: All deleted
  • Subnet Groups: All deleted

MGN Resources

  • Source Servers: All archived
  • Launch Templates: Can remain (no cost)
  • Replication Servers: Auto-deleted after cutover finalization

CloudWatch

  • Log Groups: Deleted or kept for reference
  • Alarms: All deleted

IAM

  • Users: mgn-replication-user deleted
  • Roles: Custom roles deleted (keep AWS service roles)

Step 7.2: Check AWS Cost Explorer

  1. Go to Cost Explorer (Services → AWS Cost Management → Cost Explorer)
  2. View Last 7 Days costs
  3. Click Service to filter
  4. Verify these services show declining or $0 costs:
    • Amazon EC2
    • Amazon RDS
    • AWS Database Migration Service
    • Amazon VPC (should always be $0)
    • RDS Data Transfer
  5. Set up a Budget or Alert to notify you if costs exceed $1/day

Step 7.3: Check AWS Billing Dashboard

  1. Go to Billing Dashboard
  2. Click Bills
  3. Select current month
  4. Expand each service and verify:
    • No unexpected charges
    • No running resources you forgot about
  5. Check Free Tier usage to see what resources you used

Step 7.4: Final Resource Inventory

Run these AWS CLI commands to verify (if you have AWS CLI installed):

# Check EC2 instances
aws ec2 describe-instances --region ap-south-1 --query 'Reservations[].Instances[?State.Name!=`terminated`].[InstanceId,State.Name,Tags[?Key==`Name`].Value|[0]]' --output table

# Check RDS instances
aws rds describe-db-instances --region ap-south-1 --query 'DBInstances[].DBInstanceIdentifier' --output table

# Check VPCs (should only see default)
aws ec2 describe-vpcs --region ap-south-1 --query 'Vpcs[?IsDefault==`false`].[VpcId,Tags[?Key==`Name`].Value|[0]]' --output table

# Check NAT Gateways (should be empty)
aws ec2 describe-nat-gateways --region ap-south-1 --query 'NatGateways[?State!=`deleted`].[NatGatewayId,State]' --output table

# Check DMS replication instances (should be empty)
aws dms describe-replication-instances --region ap-south-1 --query 'ReplicationInstances[].ReplicationInstanceIdentifier' --output table

Troubleshooting Deletion Issues

Issue: “DependencyViolation” when deleting subnet

Solution:

  • Network interfaces still exist in the subnet
  • Go to EC2Network Interfaces
  • Filter by subnet ID
  • Delete all available network interfaces
  • Wait 5 minutes and retry subnet deletion

Issue: Cannot delete security group

Solution:

  • Check Inbound rules for references to other security groups
  • Remove those rules first
  • Another resource (EC2, RDS, Lambda) might still be using it
  • Check all services for any remaining resources in the VPC

Issue: Cannot delete VPC - “has dependencies”

Solution:

  • Not all resources deleted yet
  • Systematically go through:
    1. Instances (must be terminated, not just stopped)
    2. RDS databases
    3. Network interfaces
    4. NAT Gateways
    5. Internet Gateway (must be detached)
    6. VPC endpoints (if any)
    7. Lambda functions in VPC

Issue: RDS deletion takes forever

Solution:

  • Multi-AZ databases take 15-20 minutes to delete
  • Final snapshot creation adds 5-10 minutes
  • Check RDS ConsoleEvents for progress
  • If stuck for >30 minutes, contact AWS Support

Issue: Costs still appearing after cleanup

Solution:

  • Some costs are billed retrospectively (show up 1-2 days later)
  • EBS snapshots cost money even after instances deleted
  • Elastic IPs cost money if not released
  • Check Cost ExplorerService for detailed breakdown
  • Delete any remaining snapshots if not needed

Issue: Cannot find a resource to delete

Solution:

  • Make sure you’re in the correct region (ap-south-1)
  • Some resources like EC2 snapshots might be in different regions
  • Use AWS Resource Groups & Tag Editor to find all tagged resources
  • Check CloudFormation stacks (if any were created)

Post-Cleanup Actions

Step 1: Document Your Learning

Create a summary document with:

  • Project Overview: What you built and migrated
  • Services Used: MGN, DMS, RDS Multi-AZ, VPC Peering, EC2
  • Challenges Faced: Any issues you encountered and how you solved them
  • Key Learnings: What you learned about AWS migration services
  • Time and Cost: Total time spent and approximate costs incurred

Step 2: Update Your Portfolio

Add this project to your resume/portfolio:

  • Title: “AWS Cloud Migration using MGN and DMS”
  • Description: “Performed lift-and-shift migration of web application and database from on-premises to AWS using Application Migration Service and Database Migration Service. Implemented Multi-AZ RDS for high availability and VPC peering for secure connectivity.”
  • Technologies: AWS MGN, DMS, RDS PostgreSQL, Multi-AZ, VPC, EC2, CloudWatch, Migration Hub
  • Outcome: Successfully migrated application with zero data loss and minimal downtime

This project gives you hands-on experience for these certifications:

  • AWS Certified Solutions Architect - Associate
  • AWS Certified Database - Specialty
  • AWS Certified Migration - Specialty

Step 4: Practice Again (Optional)

Consider re-doing this project with variations:

  • Migrate to containers (ECS/EKS instead of EC2)
  • Use AWS Systems Manager Session Manager for access
  • Implement blue-green deployment strategy
  • Add CloudFront CDN and Route 53
  • Use AWS Backup for centralized backup management

Cost Summary

Total Project Cost Estimate

Assuming you ran the project for 3 days:

ResourceDaily Cost3-Day Total
Source EC2 (t2.micro)$0.28$0.84
Source RDS (db.t3.micro)$0.41$1.23
Target EC2 (t2.micro)$0.28$0.84
Target RDS Multi-AZ (db.t3.micro)$0.82$2.46
DMS Replication (1 day)$0.86$0.86
MGN (Free tier - 90 days)$0.00$0.00
Data Transfer (minimal)$0.10$0.30
Estimated Total~$2.75/day~$6.50

Final Cost: $5-10 for the entire project (very affordable for hands-on AWS experience!)


Final Checklist

Before closing this cleanup:

  • All EC2 instances terminated
  • All RDS databases deleted
  • All DMS resources removed
  • All VPCs deleted (except default)
  • All NAT Gateways deleted
  • All Elastic IPs released
  • All Load Balancers deleted
  • All unnecessary snapshots deleted
  • All CloudWatch logs cleaned (or kept intentionally)
  • All IAM users created for project deleted
  • Cost Explorer shows declining costs
  • Billing Alerts configured to prevent surprises
  • Project documented for portfolio
  • Screenshots saved for reference
  • Lessons learned documented

Emergency: “I’m Being Charged and Don’t Know Why”

If you’re seeing unexpected charges after cleanup:

Immediate Actions:

  1. Go to Billing DashboardBill Details
  2. Identify the service causing charges
  3. Common culprits:
    • RDS Snapshots - Go to RDS Console → Snapshots → Delete all
    • Elastic IPs - Go to EC2 → Elastic IPs → Release all unattached IPs
    • NAT Gateways - Go to VPC → NAT Gateways → Delete all
    • EBS Volumes - Go to EC2 → Volumes → Delete all “Available” volumes
    • Load Balancers - Go to EC2 → Load Balancers → Delete all
    • DMS Replication Instance - Go to DMS → Replication instances → Delete all

If Still Unsure:

  1. Go to AWS Support Center
  2. Create a Billing Support Case (free for all accounts)
  3. Explain: “I completed a learning project and cleaned up resources, but I’m seeing unexpected charges for [SERVICE]. Can you help identify what resources are still running?”
  4. AWS support typically responds within 24 hours

Nuclear Option: Delete Everything in the Region

⚠️ Last resort only! This will delete ALL resources in ap-south-1

# If you have AWS CLI and want to force-delete everything:
# DO NOT run this if you have production resources in this region!

# List all resources
aws resourcegroupstaggingapi get-resources --region ap-south-1

# Use AWS Nuke tool (third-party) to delete everything
# https://github.com/rebuy-de/aws-nuke

Conclusion

Cleanup Complete!

You have successfully:

  • Removed all migration project resources
  • Stopped all ongoing charges
  • Verified deletion of all components
  • Documented your learning experience
  • Prepared for AWS certifications

Thank you for being cost-conscious and following best practices for AWS resource management!


Additional Resources

AWS Documentation

Cleanup Tools

Cost Management


Conclusion

In this comprehensive guide, we’ve successfully completed the final phase of our AWS migration journey by systematically cleaning up all resources. This hands-on approach demonstrates essential skills for cost optimization and resource management in cloud environments.

What we’ve accomplished:

  • Systematic Resource Cleanup: Safely deleted all migration resources in the correct order
  • Cost Optimization: Eliminated all ongoing charges from the migration project
  • Security Best Practices: Removed unnecessary IAM users and access credentials
  • Resource Management: Learned proper AWS resource lifecycle management
  • Cost Monitoring: Set up billing alerts and cost tracking for future projects
  • Documentation: Created comprehensive cleanup procedures for production use

Key Learning Outcomes:

  • Understanding of AWS resource dependencies and deletion order
  • Hands-on experience with cost optimization and resource management
  • Security best practices for credential and access management
  • Production-ready cleanup procedures for real-world scenarios
  • Cost consciousness and billing management skills

This completes our comprehensive 5-part AWS migration series! You now have end-to-end experience with production-grade cloud migration, from initial setup through final cleanup.


This is Part 5 of a comprehensive AWS migration series. The complete migration journey is now finished! You’ve successfully learned production-grade AWS migration from start to finish.

If you encounter any issues during cleanup, refer to the Troubleshooting section or contact AWS Support.

Table of Contents