Ravindra BagaleCourses & study guides Track your progress

AWS Cloud

AWS Data Migration Interview Questions: MySQL to RDS, MySQL to PostgreSQL, RDS to DynamoDB, DMS, MGN, DataSync and S3 Transfers (20 Questions)

This page has 20 interview questions on moving data and databases to and within AWS. The basics (what DMS, MGN, DataSync and Transfer Family are, and the 7 Rs) are on the DevOps and migration page; here you go deeper into real database moves, data type traps, cutover, rollback and tool choices.

1. An everyday example: moving house

Why does this topic matter?

Migration projects are where many cloud engineers earn their experience, and where data loss or long downtime does the most damage. Interviewers ask for concrete steps, not just service names.

Think of moving house. Some things you carry as they are (rehost: the sofa goes into the new living room). Some you adapt (replatform: new curtains for different windows). Some you replace (refactor: the old gas stove becomes an induction hob, and you learn new cooking habits). You keep living in the old house until the new one is ready (change data capture keeps both in sync), and you only hand back the keys when everything works (cutover and decommission).

How to use this page

  • Practise with small sample databases in a test account; DMS and replication resources cost money while running.
  • Service names and availability change often in this area; dated notes are in the answers. Check the AWS documentation for the latest position.
  • All IDs and names are examples, such as account 111122223333.

2. Fresher level questions

Start here if you are a fresher or have less than two years of experience. Try to answer each question aloud first. Then open it and compare.

Q1. What is the difference between a homogeneous and a heterogeneous database migration? Fresher
PointHomogeneousHeterogeneous
EnginesSame family (MySQL to RDS for MySQL, PostgreSQL to Aurora PostgreSQL)Different (Oracle or MySQL to PostgreSQL, SQL Server to MySQL)
SchemaCopied as isConverted: data types, procedures, functions, triggers
Typical toolsNative tools (mysqldump, pg_dump, native backups, replication), DMSDMS Schema Conversion or SCT, then DMS for data
Application changesUsually connection string onlySQL and code changes, retesting
Risk and effortLowerHigher; plan time for code and testing
Q2. How is migrating from another cloud provider to AWS different from migrating from your own data centre? Fresher
  • Network: the source is already on the internet or a cloud network; you may use VPN, a partner interconnect or Direct Connect through a colocation provider.
  • Cost: the source cloud usually charges data transfer out (egress), which can be large for big datasets; check the source provider's migration egress programmes.
  • Services: managed services (for example managed PostgreSQL, object storage, serverless) must be mapped to AWS equivalents, and some features differ.
  • Tools: DMS works with databases in other clouds if it can connect; MGN works for virtual machines; DataSync can copy from some other cloud object stores.
  • Identity and DNS move too, and contracts may require running both in parallel for a while.
Q3. What are the options to move a MySQL database from EC2 into Amazon RDS, and when do you choose each? Fresher
MethodHowDowntimeBest for
mysqldump (or mydumper) and importLogical export to SQL files, then load into RDSWrites stop for the whole dump and loadSmall databases, simple moves
Restore from S3 (physical backup)Take a Percona XtraBackup backup, upload to S3, create an RDS for MySQL instance from itShort, if combined with replication afterwardsLarge databases where logical import is too slow (check supported MySQL versions)
DMS full load plus CDCDMS copies tables, then applies ongoing changes from the binlogMinutes at cutoverBig or busy databases needing minimal downtime

Native binlog replication from EC2 to RDS (after a dump or S3 restore) is another low-downtime option for homogeneous moves.

Q4. Which MySQL settings must be in place before DMS can capture ongoing changes? Fresher

DMS reads changes from the MySQL binary log, so on the source:

  • log_bin turned on (binary logging enabled).
  • binlog_format = ROW.
  • binlog_row_image = FULL.
  • Binlogs kept long enough for DMS to read them, even after a pause (for example a day or more). On RDS sources, set retention with the rds_set_configuration procedure for binlog retention hours; on EC2, with binlog_expire_logs_seconds.
  • A DMS user with replication privileges (REPLICATION CLIENT, REPLICATION SLAVE) and SELECT on the tables.
mysql -e "SHOW VARIABLES WHERE Variable_name IN ('log_bin','binlog_format','binlog_row_image')"

Output:

log_bin ON / binlog_format ROW / binlog_row_image FULL

The source is ready for CDC.

Q5. How do you copy an encrypted EBS snapshot to another Region for migration or DR? Fresher
aws ec2 copy-snapshot --region eu-west-1 --source-region ap-south-1 --source-snapshot-id snap-0a1b2c3d4e5f67890 --encrypted --kms-key-id arn:aws:kms:eu-west-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab --description "app-data copy for migration"

Output:

{"SnapshotId": "snap-0f9e8d7c6b5a43210"}

A new snapshot is being created in eu-west-1, encrypted with a key in that Region (KMS keys are Regional, unless you use multi-Region keys).

Run the command in the destination Region. To move a whole instance, copy the AMI instead (aws ec2 copy-image), which copies its snapshots. Large first copies take time; later copies of the same volume can be incremental.

Q6. When would you use S3 Batch Replication instead of aws s3 sync to copy existing objects between buckets? Fresher
  • Normal S3 replication only copies new objects written after the rule is set up. S3 Batch Replication replicates existing objects, objects that failed to replicate before, or objects already replicated to another destination.
  • It runs as an S3 Batch Operations job with a manifest and completion report, keeps metadata and version IDs, and handles very large buckets without a machine running copy commands.
  • aws s3 sync is simple for smaller copies, but runs from one machine, does not keep version history, and needs you to handle retries and reports.

Use Batch Replication for large account-to-account or Region-to-Region migrations where the replication rule will stay in place afterwards.

Q7. Which older AWS migration tools have been retired or closed to new customers, and what replaces them? Fresher
  • AWS Server Migration Service (SMS): discontinued on 31 March 2022; AWS Application Migration Service (MGN) replaces it. AWS has since brought MGN under the AWS Transform name, so check current documentation for naming.
  • AWS Migration Hub (including Strategy Recommendations): closed to new customers from 7 November 2025; AWS points to AWS Transform for migration planning and tracking.
  • AWS Snowball Edge: end of sale to new customers from 7 November 2025; alternatives include DataSync over the network, AWS Data Transfer Terminal and AWS Outposts for edge needs.
  • AWS Application Discovery Service moved to maintenance on 7 November 2025.

Existing customers of some of these can keep using them; always check the current status before recommending a tool.

3. Mid level questions

These questions check how you use the service in real projects. Interviewers expect the why, the how and one real example.

Q8. Which data type and behaviour differences cause problems when migrating MySQL to PostgreSQL? Mid level
MySQLPostgreSQLWatch out for
TINYINT(1) used as a flagBOOLEANCode comparing to 0 and 1
AUTO_INCREMENTGENERATED ... AS IDENTITY (or SERIAL)Reset the sequence to max(id)+1 after loading
DATETIME (no time zone)TIMESTAMP, or TIMESTAMPTZ for real instantsDecide how time zones are stored; zero dates like 0000-00-00 are invalid
UNSIGNED INTNo unsigned types; use BIGINT or a CHECK constraintValues above the signed range
Case-insensitive comparisons (common collations)Case-sensitive text comparison by defaultWHERE email = ... may stop matching; use citext or lower()
Backtick identifiersDouble quotes; unquoted names become lowercaseMixed-case table names
Stored procedures in MySQL syntaxPL/pgSQL functions and proceduresRewrite and test each one
Q9. A team already knows the SCT desktop tool. Should a new conversion project use it or the managed DMS Schema Conversion feature? Mid level
PointAWS SCTDMS Schema Conversion
FormDesktop application you installManaged feature in the DMS console and API
JobConvert schema and code objects, assessment reportsSame main job: assess and convert schema and code for supported source and target pairs
ExtrasData extraction agents and some warehouse conversionsNo local install; uses instance profiles and data providers in AWS

AWS now steers new database conversion work towards DMS Schema Conversion, and it may support pairs SCT did not (or the reverse). Check the current supported source and target lists before choosing. Either way, objects that cannot be converted automatically are flagged for manual work.

Q10. How do DMS table mappings select and rename what gets migrated? Mid level

Table mappings are JSON rules attached to a task:

  • Selection rules include or exclude schemas and tables (wildcards allowed).
  • Transformation rules rename schemas, tables or columns, change case, add or remove columns, or add a prefix.
aws dms create-replication-task --replication-task-identifier shop-to-pg --source-endpoint-arn arn:aws:dms:ap-south-1:111122223333:endpoint:SRC1 --target-endpoint-arn arn:aws:dms:ap-south-1:111122223333:endpoint:TGT1 --replication-instance-arn arn:aws:dms:ap-south-1:111122223333:rep:RI1 --migration-type full-load-and-cdc --table-mappings file://mappings.json

The rules in mappings.json decide that, for example, schema shop is included, table audit_log is excluded, and all names are converted to lower case for PostgreSQL.

Q11. Write the cutover runbook for a DMS full load plus CDC migration. Mid level

1. Days before: lower DNS TTLs, confirm validation shows no mismatches, run application tests against the target.

2. Announce a short maintenance window.

3. Stop writes on the source (put the app in maintenance mode or revoke write access).

4. Wait until CDC latency is zero and the last changes have been applied; run final validation (row counts, checksums for key tables).

5. Reset sequences and enable triggers and foreign keys on the target if they were disabled.

6. Switch the application's connection strings or DNS to the target and turn writes back on.

7. Watch errors and latency closely; keep the source untouched (or reverse replication running) for the rollback window.

8. Stop the DMS task only after the rollback window ends.

Q12. How do you choose between DataSync, Transfer Family, Storage Gateway, Direct Connect and offline transfer for moving data? Mid level
NeedGood fit
One-time or scheduled copy of files from NFS, SMB, HDFS or object storage to S3, EFS or FSxAWS DataSync
Partners keep sending files by SFTP, FTPS or AS2AWS Transfer Family
On-premises apps keep using local file or block access while data lives in AWSAWS Storage Gateway (S3 File Gateway, Volume or Tape Gateway)
Steady, private, high-bandwidth network link for ongoing migration and hybrid useAWS Direct Connect
Very large data with too little bandwidthOffline transfer: AWS Data Transfer Terminal, or Snowball for existing customers (Snowball Edge closed to new customers from November 2025)

Often you combine them: Direct Connect as the link and DataSync running over it.

Q13. After moving databases to AWS, how do you choose between DMS, AWS Glue and Kinesis for ongoing data movement into S3? Mid level
ToolBest for
DMS (S3 target)Continuous replication of database changes (CDC) into S3 files, with little code
AWS GlueBatch ETL jobs: transform, join and clean data, write Parquet, catalogue tables for Athena
Kinesis Data StreamsReal-time events from applications with custom consumers
Amazon Data FirehoseDelivering streams into S3 (and other targets) with buffering, format conversion and partitioning, without managing consumers

A common pipeline: DMS or Kinesis lands raw data in S3, Glue jobs transform it into curated tables, and Athena or Redshift queries it.

Q14. What does Cloud Migration Factory on AWS add when you migrate hundreds of servers with MGN? Mid level

Cloud Migration Factory on AWS is an AWS Solution (deployed from a template into your account) that automates the repetitive parts of large rehost migrations:

  • An inventory of servers and applications grouped into waves.
  • Automation scripts to install replication agents, check prerequisites, launch test and cutover instances through MGN, and run post-launch actions.
  • A web interface and API so migration teams follow a standard process.

It does not replace MGN; it orchestrates it at scale. As with any solution template, review its current version and support status before using it.

4. Senior level and scenario questions

These questions check design thinking and troubleshooting. Think aloud. Say what you check first, what you change, and how you prevent it next time.

Q15. How do you migrate a relational schema from RDS to DynamoDB? Senior
  • Start from access patterns, not tables: list every query the application runs (get customer by ID, list a customer's orders by date, find order by number).
  • Design keys and indexes to answer each pattern with a Query or GetItem; denormalise (copy fields such as customer name into order items) instead of joining.
  • Often use single-table design with entity prefixes (CUSTOMER#, ORDER#) where entities are read together.
  • Move data with DMS using a DynamoDB target and object mapping rules (map-record-to-record) to build keys from columns, or with a custom Glue or Lambda job for complex reshaping.
  • Change the application's data layer, test with production-like data, and run both in parallel with dual writes or CDC before cutting over.
Q16. How do you design a rollback path for a heterogeneous migration, such as MySQL to PostgreSQL? Senior
  • Decide the rollback window and the trigger conditions (error rate, data issues, performance) before cutover.
  • Keep the source database intact and run reverse replication: a second DMS task capturing changes from the new PostgreSQL target back to MySQL, with types mapped back correctly.
  • Test the reverse path in rehearsal, including how long it takes to switch back.
  • Avoid schema changes on the target that the source cannot accept during the rollback window.
  • Keep application versions that can talk to both databases, or use feature flags for the data layer.

After the window, stop reverse replication and plan decommissioning.

Q17. Some systems must stay on-premises for two more years during a migration. How do you run a hybrid setup? Senior
  • Connectivity: Direct Connect (with a VPN as backup) and a Transit Gateway so many VPCs reach the data centre.
  • DNS: Route 53 Resolver endpoints so names resolve both ways.
  • Storage: Storage Gateway lets on-premises apps keep using file or block protocols while data lands in S3 or is backed up to AWS.
  • Low latency or data residency needs: AWS Outposts brings AWS infrastructure into the data centre for workloads that must stay there.
  • Identity: a single identity source for both sides (IAM Identity Center with the corporate directory).
  • Operations: one monitoring and patching approach (Systems Manager for hybrid servers).

Plan which applications move in which wave, keeping chatty applications together to avoid cross-site latency.

Q18. Plan moving a MySQL database on EC2 to Aurora PostgreSQL, including application changes. Senior
  • Assess: run DMS Schema Conversion (or SCT) for an assessment report; list procedures, triggers, data types and SQL used by the app.
  • Convert schema, fix flagged items manually (booleans, identity columns, time zones, case sensitivity), and load it in a test Aurora cluster.
  • Change application code: SQL dialect differences, ORM settings, drivers, connection pooling (consider RDS Proxy).
  • Prepare the source for CDC (row-based binlogs), then run DMS full load plus CDC with validation.
  • Performance test with production-like load, add indexes, compare query plans.
  • Rehearse cutover and rollback (reverse replication), then cut over in a short window.
Q19. You must move 50 TB of S3 data from one AWS account and Region to another, with a different KMS key. How? Senior
  • Set up a replication rule from the source bucket to the destination bucket, with the destination KMS key and permissions to decrypt the source key and encrypt with the target key; turn on versioning on both sides.
  • Use S3 Batch Replication to copy existing objects, with a completion report for failures.
  • Grant the replication role access in both accounts (bucket policy and KMS key policies); consider owner override so the destination account owns the objects.
  • Check delete markers, object lock, storage classes and very small objects behave as required.
  • Validate with S3 Inventory reports on both sides (counts and sizes), then switch applications and keep replication running until the cutover is complete.

DataSync is an alternative for one-time copies with built-in verification.

Q20. How do you move a managed PostgreSQL database from another cloud provider to Aurora PostgreSQL with minimal downtime? Senior
  • Network: connect the source to your VPC securely (site-to-site VPN or a partner interconnect) and allow the DMS replication instance or Aurora to reach it; avoid sending data over the open internet without TLS.
  • Choose the method: PostgreSQL native logical replication (publication on the source, subscription on Aurora) if the provider allows it, or DMS full load plus CDC (needs logical decoding enabled on the source, which managed services usually expose as a setting).
  • Move schema first (pg_dump --schema-only), then data, then create remaining indexes and constraints.
  • Watch replication lag, validate row counts and key checksums, and test the application against Aurora.
  • Cut over: stop writes, wait for zero lag, reset sequences (logical replication does not copy sequence values), switch connection strings.
  • Account for the source provider's egress charges and keep the source for a rollback window.

5. Frequently asked questions

Which migration skill is most valuable?

Database migration with minimal downtime: full load plus change data capture, validation, cutover and rollback. It appears in almost every senior interview.

Do I need to learn Snowball?

Know what it was used for, but note that AWS stopped selling Snowball Edge to new customers in November 2025. Learn DataSync, Direct Connect and S3 transfer options first.

What should I practise?

Migrate a small MySQL database on EC2 to RDS with DMS full load plus CDC, change a few rows during the load, validate, and cut over by switching the application's connection string.

6. Quick revision

  • Homogeneous: same engine (MySQL to MySQL); heterogeneous: different engine (MySQL to PostgreSQL) and needs schema conversion.
  • DMS CDC from MySQL needs row-based binary logs kept long enough.
  • MySQL TINYINT(1) usually becomes PostgreSQL BOOLEAN; AUTO_INCREMENT becomes an identity column.
  • Model DynamoDB from access patterns, not from the old tables.
  • Always plan the rollback before the cutover.

This page is one part of the complete AWS interview question set. Open the full list here: All 2052 AWS interview questions.