Amazon DynamoDB is a cloud-native NoSQL database offering from Amazon Web Services (AWS). Its performance characteristics, ease of use, and compatibility with existing database engines have made DynamoDB one of the fastest-growing services in AWS history.
In this module, you learn why AWS customers are choosing to migrate to DynamoDB. Many fast-scaling companies such as Lyft, Airbnb, and Redfin are choosing DynamoDB because of its performance characteristics. Enterprise companies such as Samsung, Toyota, and Capital One use DynamoDB for their mission-critical workloads. Serverless-first companies love DynamoDB because it’s easy to scale, provides consistent performance, and works well with ephemeral compute by using AWS Lambda.
DynamoDB is built for internet-scale performance. The rise of the internet has opened up amazing audiences for every application, but it also has pushed legacy infrastructure to the limit. Because of their ad hoc query patterns and difficulty in horizontal scaling, traditional relational databases are struggling to keep up.
NoSQL databases such as DynamoDB are heavily used for high-scale applications. DynamoDB is based on Dynamo, an internal database built by Amazon.com engineers to handle the burdens of Amazon retail. The Amazon.com retail infrastructure relies heavily on DynamoDB to power high-traffic days such as Prime Day and Cyber Monday. In 2019, Amazon.com peaked at more than 45 million DynamoDB requests per second during Prime Day.
The best part about DynamoDB is that its performance is consistent at any scale. DynamoDB scales infinitely with no performance degradation. You get the same response time in your testing environment with 1 GB of data as in your production environment with 10 TB of data.
Database administration is a delicate, important task. You need to ensure you have a readily available instance to promote in the event of instance failure. You have to design and configure a backup-and-recovery plan.
But properly managing your database won't distinguish your company, and it won't earn you a promotion. Uptime, backups, and instance failovers are expected, even though they're difficult to get right.
With a cloud-native database such as DynamoDB, you can reduce the undifferentiated heavy lifting of database operations and focus on the aspects where you can differentiate your company. As a database administrator, this means using your expertise to help with schema design and query optimization. As an application developer, this means focusing on your application rather than your infrastructure. As a company, it means innovating on your product rather than diverting resources to keep your systems running. With DynamoDB, you can focus on the things that matter and drive value.
DynamoDB has a flexible billing model that aligns with your needs. DynamoDB doesn't bill for raw resources such as CPU and RAM. Rather, DynamoDB charges you for storage and for read and write units. This simplifies the capacity planning process. Rather than estimating your usage and then guessing how a given RAM and CPU combination might handle the usage, you can turn your estimates directly into read and write capacity units.
Additionally, you can choose to avoid capacity planning altogether by using on-demand capacity mode. You don't have to provision database capacity in advance. DynamoDB charges you directly for each read and write on your database. You can use on-demand capacity mode to set a baseline for your required capacity, and then seamlessly switch to provisioned capacity mode when you need to.
Modern application development uses microservices to reduce the size of your deployment units and enable more agile development. Often, one microservice requires data from another service, and data is shared from service to service via events.
Legacy databases were not built for a world of microservices. Extracting information about updates from a legacy database requires difficult and complex workarounds that can have negative performance impacts on your source database. DynamoDB has native support for change data capture via DynamoDB Streams. With DynamoDB Streams, you can subscribe to an ordered stream of all updates in your DynamoDB table. Consumers of these streams can update downstream services or send data to analytics systems for internal analysis.
DynamoDB uses AWS Identity and Access Management (IAM) for authorization. IAM has rich capabilities that allow for granular access control on your DynamoDB tables. By using IAM, you can ensure your applications have access to only the tables and API actions they need.
IAM is deeply integrated with AWS compute options such as Amazon EC2, Amazon ECS, and Lambda. You can attach IAM roles directly to AWS compute options, eliminating the need for credential rotation and management inside your application. This results in safer, more secure applications.
IAM allows for fine-grained permissions on your DynamoDB tables. You can use IAM conditions to restrict row-level and attribute-level access to DynamoDB records. These conditions simplify multi-tenancy in your application as well as allow you to protect fields on a user-by-user basis.
Migrating a database from one platform to another is a multistep process. If you are moving an existing database to Aurora, AWS provides a number of services to make your migration easier.
AWS Database Migration Service (AWS DMS) is a service you can use to migrate your database from an existing database to a fully managed database on AWS. AWS DMS handles copying existing data into a new database managed by AWS. Additionally, you can use AWS DMS to replicate data on an ongoing basis, allowing you to determine the best time to switch your application to your new database.
AWS DMS supports migration from 11 different database source endpoints to 15 different database target endpoints. You can even move from one database engine to another, allowing you to move from a licensed commercial database to a cloud-native database such as Aurora. If you do a heterogeneous migration from one database engine to another, you can use the AWS Schema Conversion Tool (AWS SCT) to handle the differences in schemas between the two database engines. While AWS DMS handles the data migration, AWS SCT converts database schemas, stored procedures, and views from one database to another. AWS SCT can greatly simplify your migration to a new database engine.
If you need hands-on assistance with your migration, AWS has a number of options for you. AWS Professional Services has experienced professionals who can work with you to manage your data migration. The AWS Professional Services team has worked with thousands of customers of all sizes to safely plan and execute data migrations to cloud-native databases.
In addition, AWS has an extensive listing of partners in the AWS Partner Network (APN). Tens of thousands of partners are in the APN across the globe, each with a unique focus and capability. These partners have been vetted to ensure proper AWS expertise. Whether you need consulting advice or hands-on technical implementation, you can find an APN Partner that fits your needs.
Finally, if you need additional help with your database migration, AWS has options available for you. The Database Freedom program provides expert advice and migration assistance to qualified customers. Use the knowledge of database migration experts to help you migrate seamlessly.