Data migration is a significant aspect for businesses shifting to the AWS cloud. It involves moving data from on-premise storage to cloud-based storage, which depends on identifying the appropriate migration strategies based on the business requirements and complexities. This concept is essential for the AWS Certified Cloud Practitioner exam (CLF-C02)
The fundamental strategies for data migration to AWS include database replication and the use of AWS Snowball.
1. Database Replication:
Database replication forms a fundamental aspect of disaster recovery, high availability, and data mobility in the AWS infrastructure. It allows copies of the database to be spread across various AWS servers, reducing the chances of data loss and boosting accessibility and reliability.
Types of Database Replication:
- Master-Slave Replication: The master server modifies the database, and those changes get mirrored to the slave server, ensuring a synchronous operation.
- Multi-Master Replication: All servers are treated equally, and changes can be made to any server, which are then replicated across all in an asynchronous operation.
Here is a simple example to show a master-slave replication using AWS RDS and MySQL:
# Create a read replica in AWS RDS dashboard
aws rds create-db-instance-read-replica –db-instance-identifier myreadreplica –source-db-instance-identifier mydbsource
Once the replica is created, we can promote it to be an independent DB instance.
# Promote the read replica
aws rds promote-read-replica –db-instance-identifier myreadreplica
2. AWS Snowball:
AWS Snowball is a data transport solution that expedites moving terabytes to petabytes of data into and out of AWS using storage appliances designed to be secure during transit.
For example, if an organization wants to move 100TB data to AWS, it can order a Snowball device from AWS, transfer the data to the device, and then send it back to AWS for uploading into the designated S3 buckets.
Example command to create a job for Snowball:
aws snowball create-job –job-type IMPORT
–resources S3BucketArn=arn:aws:s3:::mybucket
–address-id my-address –kms-key-arn arn:aws:kms:us-west-2:111122223333:key/abcd1234-a123-456a-a12b-a123b4cd56ef
–role-arn arn:aws:iam::111122223333:role/snowball-import-service-role
–snowball-capacity-preference STANDARD
–shipping-option SECOND_DAY
–notification SnsTopicArn=arn:aws:sns:us-west-2:111122223333:myTopic
JobTargets=111122223333:mybucket
Comparison between Database Replication and AWS Snowball:
Parameter | Database Replication | AWS Snowball |
---|---|---|
Data Volume | Ideal for low to moderate data volumes | Best for very large data volumes (petabytes of data) |
Speed | Faster as it utilizes AWS’s in-built network capabilities | It can be slower as physical shipment of the Snowball device is involved |
Complexity | Requires set-up and configuration, knowledge about databases | Implementation is straightforward without heavily technical skills |
Cost | Can be expensive but optimal for continuous data replication | Relatively less expensive for one-time large data transfers |
Versatility | Only structured database information | Any data – structured, semi-structured, unstructured |
Both these strategies provide options for data migration. The selection of an appropriate method depends on specific factors such as the amount of data, network speed, proximity to an AWS Region, and regulatory or compliance requirements. A clear understanding of these concepts and procedures will pave the way for success in the AWS Certified Cloud Practitioner Exam (CLF-C02).
Practice Test
True or False: The AWS Snowball service is used for migrating databases.
- True
- False
Answer: False
Explanation: AWS Snowball is a data transport solution that accelerates moving large amounts of data into and out of AWS using physical storage appliances, bypassing the internet. However, Snowball is used for data migration, not specifically database migration.
In the context of AWS, replication is a data migration strategy that involves the creation of duplicate instances of data.
- True
- False
Answer: True
Explanation: Replication, as a data migration strategy, refers to the process of sharing information to ensure consistency between redundant resources, such as software or hardware components, to improve reliability, fault-tolerance, or accessibility.
Multiple Select: Which of the following are appropriate migration strategies in AWS?
- a) Database replication
- b) Lift and Shift
- c) Using AWS Snowmobile
- d) Spin up new instances
Answer: a, b, c
Explanation: All options a (Database replication), b (Lift and Shift), and c (Using AWS Snowmobile) are valid cloud migration strategies. However, option d (Spin up new instances) is more of a method for scaling rather than a migration strategy.
In the AWS Cloud platform, AWS Snowball is primarily used for:
- a) Running instances
- b) Large scale data migrations
- c) Database Replication
- d) Load balancing
Answer: b
Explanation: AWS Snowball is primarily used for large-scale data migrations into and out of the AWS platform.
True or False: AWS Snowball can be used to transfer data volumes up to a few hundred gigabytes.
- True
- False
Answer: True
Explanation: Snowball can transfer large volumes of data even up to several petabytes in size.
True or False: Lift and Shift migration strategy involves some modifications to the applications before or after migration.
- True
- False
Answer: False
Explanation: Lift and Shift migration strategy does not require modifications and the applications are moved to the cloud as they are.
Which AWS service is specially designed for exabyte-scale data transfer?
- a) AWS Snowball
- b) AWS Direct Connect
- c) AWS Snowmobile
- d) AWS Data Pipeline
Answer: c
Explanation: AWS Snowmobile is an exabyte-scale data transfer service used to move extremely large amounts of data to AWS.
True or False: “Replicating” in migration strategy context means creating a copy of the database elsewhere, while both the original and the copy remain synchronized.
- True
- False
Answer: True
Explanation: In the context of database migration, replication refers to the ongoing copying of data from one database (source) to another (destination), maintaining synchronization between the two.
Which of the following AWS Tools would NOT be appropriate for Database Migration?
- a) AWS Schema Conversion Tool
- b) AWS Database Migration Service
- c) AWS CodeDeploy
- d) AWS Snowball
Answer: c
Explanation: AWS CodeDeploy is a deployment service that automates application deployments to several compute services such as Amazon EC2, AWS Fargate, AWS Lambda, and instances running on-premises.
Lift and Shift is a migration strategy that:
- a) Moves applications to the cloud without redesign
- b) Requires major application redesign
- c) Involves recreating the existing infrastructure in the cloud
- d) Involves transferring an entire data center to the cloud
Answer: a
Explanation: Lift and Shift is a migration strategy where applications are moved to the cloud as it is without any modifications to the application design.
Interview Questions
What is the AWS Snowball service used for in terms of data migration?
AWS Snowball is a data transport solution that accelerates moving large amounts of data into and out of AWS using storage appliances designed to be secure for physically transporting to your site.
Which AWS service would you use for database replication as part of a migration strategy?
For database replication in a migration strategy, you would generally use AWS Database Migration Service (DMS).
What are some common migration strategies utilized in AWS?
Common migration strategies in AWS include Rehosting (‘lift and shift’), Re-platforming, Repurchasing, Refactoring / re-architecting, Retire, and Retain.
What is the use of the AWS Schema Conversion Tool in database migration?
AWS Schema Conversion Tool makes heterogeneous database migrations predictable by automatically converting the source database schema and a majority of the database code objects, including views, stored procedures, and functions, to a format compatible with the target database.
What is the purpose of database replication in a migration strategy?
Database replication involves creating and maintaining copies of a database. This can help increase the availability and reliability of data, distribute user access, and facilitate the process of migration.
What method of data transfer would you use if you were migrating a large amount of data to AWS and network conditions were making the process extremely slow?
In such cases, physical data transportation options like AWS Snowball or AWS Snowmobile could be used to physically ship data to the AWS data center.
Which AWS service is designed to simplify database migration while minimizing downtime?
AWS DMS (Database Migration Service) is designed to simplify the migration process and minimize downtime.
How is scalability managed with AWS DMS?
AWS DMS provides the ability to monitor replication tasks in real-time which allows proper assessment to increase or decrease resources as necessary.
What process does AWS recommend to identify appropriate migration strategies?
AWS recommends the Migration Readiness Assessment (MRA), which helps organizations understand where they are in terms of readiness to migrate and provides a plan for increasing migration readiness.
What is the AWS Snowball Edge and how does it differ from AWS Snowball?
AWS Snowball Edge is a data migration and edge computing device with more processing power and a larger storage capacity than AWS Snowball. It also includes on-board storage and compute functionality, allowing you to run applications and analysis on your data at the edge.
Why might AWS Snowmobile be a more appropriate migration strategy than AWS Snowball for some businesses?
AWS Snowmobile is an exabyte-scale data transfer service used to move very large amounts of data to AWS. It is more appropriate than AWS Snowball for businesses needing to transfer datasets of up to 100PB, which would take too long to transfer over the network or with smaller scale services like AWS Snowball.
How does database replication contribute to disaster recovery in AWS?
Database replication can be a crucial component of a disaster recovery strategy as it ensures that a copy of your data is maintained in a separate location, ready for use in case of a disaster scenario.
How is security ensured during data migration using AWS Snowball?
AWS Snowball uses tamper-evident enclosures, 256-bit encryption, and industry-standard Trusted Platform Modules (TPM) to ensure security during data transport.
What types of databases are supported by AWS DMS for migration?
AWS DMS supports the migration of most widely used databases, including Oracle, Microsoft SQL Server, MySQL, MariaDB, PostgreSQL, SAP ASE, and MongoDB.
What is a common use case scenario for using AWS Snowball?
A common use case for AWS Snowball is when you have to migrate large amounts of data to the cloud, especially when you have limited network bandwidth or unreliable network connections that could make a network-based transfer impractical or inefficient.