Module 8: Databases – AWS RDS
Module objectives
After completing this module, you should be able to:
• Explain Amazon Relational Database Service (Amazon RDS)
• Identify the functionality in Amazon RDS
• Explain Amazon DynamoDB
• Identify the functionality in Amazon DynamoDB
• Explain Amazon Redshift
• Explain Amazon Aurora
• Perform tasks in an RDS database, such as launching, configuring, and interacting
                                                                                      2
Module 8: Databases
Section 1: Amazon Relational Database Service
Amazon Relational Database Service
                Amazon Relational Database
                  Service (Amazon RDS)
                                             4
Unmanaged versus managed services
         Unmanaged:                          Managed:
  Scaling, fault tolerance, and    Scaling, fault tolerance, and
  availability are managed by     availability are typically built in
               you.                        to the service.
                                                                        5
 Challenges of relational databases
• Server maintenance and energy footprint
• Software installation and patches
• Database backups and high availability
• Limits on scalability
• Data security
• Operating system (OS) installation and patches
                                                   6
Amazon RDS
  Managed service that sets up and operates a relational database in the
                                 cloud.
                                                   AWS Cloud
      Users               Application
                           Servers                 Amazon RDS
                                                                           7
From on-premises databases to Amazon RDS
                                         Database in Amazon Elastic                 Database in Amazon RDS or
  On-premises database
                                        Compute Cloud (Amazon EC2)                       Amazon Aurora
    Application optimization                Application optimization                Application optimization
    Scaling                                 Scaling                                 Scaling
    High Availability                       High Availability                       High Availability
    Database backups                        Database backups                        Database backups
    Database software patches               Database software patches               Database software patches
    Database software installs              Database software installs      AWS     Database software installs
    Operation system patches                Operation system patches     provides   Operation system patches
    Operating system install                Operating system install                Operating system install
    Server maintenance                      Server maintenance                      Server maintenance
    Rack and stack servers                  Rack and stack servers                  Rack and stack servers
    Power, HVAC, network                    Power, HVAC, network                    Power, HVAC, network
                                    AWS
                                 provides
                                                                                                                 8
    Managed services responsibilities
You manage:
•    Application optimization
AWS manages:
•    OS installation and patches
•    Database software installation and patches
•    Database backups
•    High availability
                                                  Amazon RDS
•    Scaling
•    Power and racking and stacking servers
•    Server maintenance
                                                               9
Amazon RDS DB instances
Amazon RDS
                                                                               =
                                                                            MySQL
                     DB Instance Class                                 Amazon Aurora
                     • CPU
        M
                     • Memory                                        Microsoft SQL Server
                     • Network performance
                                                                         PostgreSQL
    Amazon RDS DB    DB Instance Storage
     main instance                                                         MariaDB
                     • Magnetic
                     • General Purpose (solid state drive, or SSD)
                     • Provisioned IOPS                                     Oracle
                                                                           DB engines
                                                                                            10
Amazon RDS in a virtual private cloud (VPC)
                  AWS Cloud
                                       Availability Zone
                                 VPC
                                       Public subnet
                      Internet
        Users         gateway                     Amazon EC2
                                       Private subnet
                                                   Amazon RDS
                                                                11
High availability with Multi-AZ deployment
     AWS Cloud
                         Availability Zone 1                         Availability Zone 2
                 VPC
                        Public subnet
                       Amazon EC2       Application
                        Private subnet                              Private subnet
                                               M      Synchronous    S
                          Amazon RDS
                                                                             RDS Standby
                           instance
                                                                               instance
                                                                                           12
High availability with Multi-AZ deployment
2
     AWS Cloud
                         Availability Zone 1                         Availability Zone 2
                 VPC
                        Public subnet
                       Amazon EC2       Application
                        Private subnet                              Private subnet
                                               M      Synchronous    S
                          Amazon RDS
                                                                             RDS Standby
                           instance
                                                                               instance
                                                                                           13
 Amazon RDS read replicas
                                        AWS Cloud
Features                                                   Availability Zone
• Offers asynchronous replication             VPC
                                                     Public subnet
• Can be promoted to master if needed
                                                    Amazon EC2         Application
Functionality
• Use for read-heavy database                        Private subnet
  workloads
                                                           M                   R
• Offload read queries                                 Amazon RDS       Read Replica
                                                        instance         instance
                                                                                       14
Use cases
                               High throughput
 Web and mobile applications   Massive storage scalability
                               High availability
                               Low-cost database
 Ecommerce applications        Data security
                               Fully managed solution
                               Rapidly grow capacity
 Mobile and online games       Automatic scaling
                               Database monitoring
                                                              15
When to Use Amazon RDS
Use Amazon RDS when your application         Do not use Amazon RDS when your
requires:                                    application requires:
•   Complex transactions or complex          •   Massive read/write rates (for example,
    queries                                      150,000 write/second)
•   A medium to high query or write rate –   •   Sharding due to high data size or
    Up to 30,000 IOPS (15,000 reads +            throughput demands
    15,000 writes)
                                             •   Simple GET or PUT requests and
•   No more than a single worker node or         queries that a NoSQL database can
    shard                                        handle
•   High durability                          •   Relational database management
                                                 system (RDBMS) customization
                                                                                      16
Amazon RDS: Clock-hour billing and database
characteristics
Clock-hour billing –
   •   Resources incur charges when running
Database characteristics –
   • Physical capacity of database:
       •   Engine
       •   Size
       •   Memory class
                                              17
Amazon RDS: DB purchase type and multiple
DB instances
DB purchase type –
  • On-Demand Instances
      •   Compute capacity by the hour
   • Reserved Instances
      •   Low, one-time, upfront payment for database instances that are reserved with
          a 1-year or 3-year term
Number of DB instances –
  • Provision multiple DB instances to handle peak loads
                                                                                         18
 Amazon RDS: Storage
Provisioned storage –
   • No charge
      •   Backup storage of up to 100 percent of database storage for an active
          database
   • Charge (GB/month)
      •   Backup storage for terminated DB instances
Additional storage –
  • Charge (GB/month)
      •   Backup storage in addition to provisioned storage
                                                                                  19
Amazon RDS: Deployment type and data
transfer
Requests –
   • The number of input and output requests that are made to the database
Deployment type—Storage and I/0 charges vary, depending on whether you deploy to –
   • Single Availability Zone
   • Multiple Availability Zones
Data transfer –
   • No charge for inbound data transfer
   • Tiered charges for outbound data transfer
                                                                                     20
                • With Amazon RDS, you can set up,
Section 1 key     operate, and scale relational
takeaways         databases in the cloud.
                • Features –
                   • Managed service
                   • Accessible via the console, AWS Command Line
                     Interface (AWS CLI), or application
                     programming interface (API) calls
                   • Scalable (compute and storage)
                   • Automated redundancy and backup are
                     available
                   • Supported database engines:
                       • Amazon Aurora, PostgreSQL, MySQL, MariaDB,
                         Oracle, Microsoft SQL Server
           21