Thursday, 7 July 2022

Amazon Relational Database Service ( Amazon RDS ) : Theory

 Amazon Relational Database Service(Amazon RDS)

Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate and scale relational databases in the cloud. It provides cost-efficient and resizable capabilities while automating time-consuming administration tasks such as hardware provisioning, database setup, patching, and backup. It frees you up to focus on your applications so that you can provide them with the fast performance, high availability, security and compatibility they need.

Amazon RDS is available on multiple database instance types - optimized for memory, performance or I/O - and gives you six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database and SQL Server Huh. You can use the AWS Database Migration Service to migrate easily or replicate your existing databases to Amazon RDS.

What is Amazon RDS?

Amazon Relational Database Service (RDS) is a managed SQL database service provided by Amazon Web Services (AWS). Amazon RDS supports an array of database engines to store and organize data. It also helps in relational database management tasks like data migration, backup, recovery and patching.

Amazon RDS facilitates the deployment and maintenance of relational databases in the cloud. Cloud administrators use Amazon RDS to set up, operate, manage, and scale relational instances of cloud databases. Amazon RDS itself is not a database; It is a service used to manage relational databases.

How does Amazon RDS work?

Databases store large amounts of data that applications can draw upon to help them perform various tasks. A relational database uses tables to store data and is called relational because it organizes data points with defined relationships.

Administrators control Amazon RDS with the AWS Management Console, Amazon RDS API calls, or the AWS command-line interface. They use these interfaces to deploy database instances to which users can apply specific settings.

Amazon provides several instance types with different resources, such as CPU, memory, storage options, and networking capability. Each type comes in a variety of sizes to suit the needs of different workloads.

RDS users can use AWS Identity and Access Management to define and set permissions to access RDS databases.

Amazon RDS Features

Amazon RDS features include the following:

Replication. RDS uses the replication feature to create read replicas, and these are read-only copies of the database instances that the application uses without changing the original production database. Administrators can also enable automatic failover across multiple availability zones through RDS multi-edge deployment and synchronous data replication.

Amazon Relational Database Service

RDS provides three types of storage:

A general-purpose solid-state drive (SSD). Amazon recommends this storage as the default choice.

Provisioned input-output operations per second (IOPS). SSD storage for I/O-intensive workloads.

Magnetic. A lower-cost option.

Monitoring. The Amazon CloudWatch service enables managed monitoring, and it lets users view capacity and I/O metrics.

Patching. RDS provides patches for whichever database engine the user chooses.

Backups. Another feature is failure detection and recovery. RDS provides managed instance backups with transaction logs to enable point-in-time recovery. Users pick a retention period and restore databases to any time during that period. They also can manually take snapshots of instances that remain until they are manually deleted.

Amazon Relational Database Service

RDS lets users specify the time and duration of the backup processes. They also can choose how long to retain backups and snapshots.

  • Incremental billing. Users pay a monthly fee for the instances they launch.
  • RDS uses public-key encryption to secure automated backups, read replicas, data snapshots and other data stored at rest.

What are the benefits and drawbacks of Amazon RDS?

There are several pros and cons to using Amazon RDS.

  • Easy to administer: Amazon RDS makes it easy to go from project conception to deployment. Use the Amazon RDS Management Console, the AWS RDS Command-Line Interface, or simple API calls to access the capabilities of a production-ready relational database in minutes. No need for infrastructure provisioning and no need for installing and maintaining database software.
  • Highly scalable: You can scale your database's compute and storage resources with only a few mouse clicks or an API call, often with no downtime. Many Amazon RDS engine types allow you to launch one or more Read Replicas to offload read traffic from your primary database instance.
  • Available and durable: Amazon RDS runs on the same highly reliable infrastructure used by other Amazon Web Services. When you provision a Multi-AZ DB Instance, Amazon RDS synchronously replicates the data to a standby instance in a different Availability Zone (AZ). Amazon RDS has many other features that enhance reliability for critical production databases, including automated backups, database snapshots, and automatic host replacement.
  • Fast: Amazon RDS supports the most demanding database applications. You can choose between two SSD-backed storage options: one optimized for high-performance OLTP applications and the other for cost-effective general-purpose use. In addition, Amazon Aurora provides performance on par with commercial databases at 1/10th the cost.
  • Secure: Amazon RDS makes it easy to control network access to your database. Amazon RDS also lets you run your database instances in Amazon Virtual Private Cloud (Amazon VPC), enabling you to isolate your database instances and connect to your existing IT infrastructure through an industry-standard encrypted IPsec VPN. Many Amazon RDS engine types offer encryption at rest and encryption in transit.
  • Inexpensive: You pay very low rates and only for the resources you consume. In addition, you benefit from the option of On-Demand pricing with no up-front or long-term commitments or even lower hourly rates via our Reserved Instance pricing.
  • Ease of use. Admins don't need to learn specific database management tools, and they also can manage multiple database instances using the management console. RDS is compatible with database engines that users may already be familiar with, such as MySQL and Oracle, and it automates manual backup and recovery processes.
  • Cost-effectiveness. According to AWS, customers only pay for what they use. Also, the time spent maintaining instances is reduced because maintenance tasks, such as backups and patching are automated.

Reading replicas routes read-heavy traffic away from the main database instance, reducing the workload on that one instance.

RDS splits up compute and storage so admins can scale them independently.

Drawbacks

Some downsides of using Amazon RDS include the following:

Lack of root access. Because it is a managed service, users do not have root access to the server running RDS. RDS restricts access for certain procedures to those with advanced privileges.

Downtime. Systems must go offline for some patching and scaling procedures, and the timing of these processes varies. With scaling, compute resources need a few minutes of downtime on average.

Amazon RDS database instances

A database administrator can create, configure, manage and delete an Amazon RDS instance, along with the resources it uses. An Amazon RDS instance is a cloud database environment. Admins can also spin up many databases or schemas; how many depends on the database used.

Amazon RDS limits each customer to a total of 40 database instances per account, and AWS imposes further limitations for Oracle and SQL Server instances. With those database instances, a user generally can only have up to 10.

Amazon RDS database engines

An AWS customer can spin up to six types of database engines within Amazon RDS:

  • Amazon Aurora is a proprietary AWS relational database engine. Amazon Aurora is compatible with MySQL and PostgreSQL.
  • RDS for MariaDBis compatible with Maria DB, an open-source relational database management system (RDBMS) that's an offshoot of MySQL.
  • RDS for MySQL is compatible with the MySQL open-source RDBMS.
  • RDS for Oracle Databaseis compatible with several editions of Oracle Database, including bring-your-own-license and license-included versions.
  • RDS for PostgreSQL is compatible with PostgreSQL open-source object-RDBMS.
  • RDS for SQL Serveris compatible with Microsoft SQL Server, an RDBMS.

Amazon RDS adds support for major and minor versions of database engines over time. It is designed to allow admins to specify an engine version when they create a database instance. In most cases, Amazon RDS can support developer code, applications, and tools already in use with existing databases.

AWS provides other database services, including the following:

  • Amazon DynamoDB key-value and document database for NoSQL databases;
  • Amazon Neptune for graph databases; and
  • AWS Database Migration Service to ease database transfers and transformations.

Amazon RDS use cases

Amazon RDS' scalability, security and availability make it useful for a variety of applications. Some possible uses include the following:

  • Online retailing.These applications manage complex databases that track inventories, transactions and pricing.
  • Mobile and online gaming. RDS supports developers that need to update these applications and users who need high availability continuously.
  • Travel applications. Applications like Airbnb take advantage of RDS' ability to simplify time-consuming database administration tasks and automate database replication. Mobile apps like Airbnb also take advantage of RDS' scalable storage capability.
  • Streaming applications. Applications like Netflix take advantage of RDS's storage scalability and the availability of Amazon RDS, which allows them to handle high demand daily.
  • Finance applications. Like other mobile applications, these applications can use RDS to simplify administrative database tasks and save time and money.

Business-to-business reporting company Enlyft said 6,096 companies were using Amazon RDS in 2021, including The American Red Cross, Penguin Random House and Zendesk. Amazon also reported in 2021 that Airbnb, Intuit and the U.S. The Department of Veterans Affairs is among the organizations that use RDS to support their data workloads.

Featured RDS Partners

App Associates

Apps Associate is an AWS partner and Oracle specialist in migrating enterprise workloads to the cloud, freeing customers to focus on high-value initiatives. Join our webinar to learn how Apps Associate helps customers move to Amazon Aurora.

Rackspace

Rackspace is an AWS partner that can help you implement modern application development best practices with Amazon Aurora to help you keep pace with customers and business needs. Read the eBook to learn how Rackspace helped TotalTracks automate processes and meet growing demand.

Use cases

Web and mobile applications

Web and mobile applications built to operate at very large scales require databases with high throughput, massive storage scalability, and high availability. Amazon RDS meets the needs of such highly demanding applications with room for future growth. Since Amazon RDS has no licensing constraints, it fits the variable usage patterns of these applications perfectly.

Airbnb

Airbnb chose Amazon RDS because it simplifies most of the time-consuming administrative tasks typically associated with databases. Airbnb uses Multi-Availability Zone (Multi-AZ) deployment to automate its database replication further and increase data durability. Airbnb was able to complete its entire database migration to Amazon RDS with only 15 minutes of downtime.

eCommerce application

Amazon RDS provides small and large eCommerce businesses with a flexible, secure, highly scalable and low-cost database solution for online sales and retailing. Amazon RDS provides a managed database that helps eCommerce companies meet PCI compliance and focuses on creating high-quality customer experiences without worrying about managing the underlying database.

Instacart

Instacart turned to Amazon RDS for its new same-day grocery delivery service to avoid the complexities of building a new production database from scratch. The company can now add millions of new items to its database each month, and its engineering team can focus on developing new features and improving the overall customer experience.

Mobile and Online games

Mobile and online games require a database platform with high throughput and availability. Amazon RDS manages the database infrastructure, so game developers don't have to worry about provisioning, scaling, or monitoring database servers. Amazon RDS provides a familiar database engine that can rapidly increase capacity to meet user demand.

Amazon Aurora and Amazon Aurora Serverless vs Amazon RDS

Amazon Aurora is a database engine created by Amazon. RDS is a service used to manage database engines and instances, including the Amazon Aurora database.

Amazon Aurora Serverless can also be used to manage instances of Amazon Aurora. Its automation features relieve developers from having to launch servers and manually manage database capacity.

With RDS, servers must be manually scaled, which can result in significant downtime. The automatic scaling capability of Aurora Serverless enables rapid deployment with little or no downtime.

One downside of Aurora Serverless is that it only works with Amazon Aurora, MySQL, and PostgreSQL. RDS is compatible with six database engines.

Amazon RDS is suitable for more predictable applications because capacity adjustment takes longer in RDS than in Aurora Serverless.

The takeaway

Amazon RDS helps organizations handle relational database management tasks such as migration, backup, recovery and patching. Some of the main features of Amazon RDS are replication, high-performance storage, and failure detection.

One of the biggest benefits of Amazon RDS is its ease of use, and it lets administrators manage multiple database instances without having to learn other database management tools.

These features allow RDS to help organizations cut costs from time-consuming database administration tasks and manage the hidden costs of using high-performance storage in AWS.

What is the future of Amazon RDS on VMware?

Amazon RDS on VMware provides Amazon's relational database service for on-premises VMware infrastructure and points to the potential future of hybrid cloud services.

Many people used to see VMware and AWS as bitter enemies, but that changed when they announced VMware Cloud on AWS in 2017. The announcement of Amazon RDS on VMware at VMworld 2018 indicated an evolving relationship between the two companies that could point to potential. For greater collaboration between cloud vendors and on-premises infrastructure.

The investment required to move everything to the cloud has proved too expensive for many organizations, so as realistic expectations are set, more and more cloud vendors will try to integrate the features and benefits of the cloud with their on-premises infrastructure.

Amazon RDS aims to make it easy to set up, run and develop relational databases. RDS provides a flexible and easy way to do previously tedious tasks like patching, capacity management and database tuning. Because this is an Amazon service, it only offers on-demand pricing for what you use or pay for reserved, dedicated capacity. Until recently, Amazon limited this service to Amazon Cloud.

Amazon RDS on VMware is in Technical Preview, so all the details about how the platform works are currently unavailable. If it's anything like the native Amazon RDS, you'll be able to create and manage databases from half a dozen popular database types, including Oracle and Microsoft SQL Server.

Amazon RDS for VMware will enable the affordable, high-availability hybrid deployment, simple database disaster recovery for AWS, and read-only clones of on-premises data in AWS. This partnership could help Amazon customers easily migrate traditional database deployment from their sites and AWS, even sites with difficult licensing requirements. It can also help VMware customers see the benefits of the AWS management stack for databases in traditional infrastructure.

Wednesday, 6 July 2022

AWS Amazon DocumentDB Theory

Amazon DocumentDB : 

While offering a MongoDB-compatible API, DocumentDB is not running MongoDB software, but “Amazon DocumentDB emulates the responses that a client expects from a MongoDB server by implementing the Apache 2.0 open source MongoDB 3.6 API” on top of an undisclosed storage engine. From some information, it looks like it is built on top of the Aurora storage subsystem that is also used by both Aurora MySQL and Aurora PostgreSQL. In fact the following features/limitations are common to both DocumentDB and Aurora:
  • both replicate six copies of data across three AWS Availability Zones
  • both have cluster size limit of 64 TB
  • both do not allow null characters (‘\0’ ) in strings
  • identifiers are limited to 63 letters for both
  • both persist a write-ahead log when writing
  • both don’t need to write full buffer page syncs.

High Availability
Fig. 1: DocumentDB availability
An Amazon DocumentDB cluster consists of two components:
  • Cluster volume: cluster has exactly one cluster volume, which can store up to 64 TB of data.
  • Instances: provide the processing power for the database, writing data to, and reading data from, the cluster storage volume. An Amazon DocumentDB cluster can have 0–16 instances:
  •  – Primary instance: supports read and write operations and performs all data modifications to the cluster volume. Each Amazon DocumentDB cluster has one primary instance.
  •  – Replica instance: supports only read operations. An Amazon DocumentDB cluster can have up to 15 replicas in addition to the primary instance.
Fig. 2: Deployment scenario

If the primary instance fails, an Amazon DocumentDB replica is promoted to the primary instance. There is a brief interruption during which read and write requests made to the primary instance fail with an exception. Amazon estimates this interruption is less than 120 seconds.
You can customise the order in which replicas are promoted to the primary instance after a failure by assigning each replica a priority, note that it is strongly suggested that replicas should be of the same instance class as the primary. It is also really important to create at least one or more Amazon DocumentDB replicas in two or more different Availability Zones, in this way your datastore can survive a zone failure.

Scalability & Replication

By placing replica instances in separate Availability Zones, it is possible to scale reads and increase cluster availability.

Compute and storage scale independently. It is possible to scale reads by deploying additional replicas. Scalability and storage are scalable up-to 64TB. DocumentDB automatically adds 10GB whenever it reaches capacity.

DocumentDB is also able to automatically fail over to a read replica in the event of a failure–typically in less than 30 seconds. Currently Amazon DocumentDB doesn’t support any kind of multi-region setup.

Amazon DocumentDB does not rely on replicating data to multiple instances to achieve durability, data is durable whether it contains a single instance or 15 instances.
All writes are processed by the primary instance that executes a durable write to the cluster volume. It then replicates the state of that write (not the data) to each active replica. Writes to an Amazon DocumentDB cluster are atomic within a single document.

Consistency

Reads from Amazon DocumentDB replicas are eventually consistent with minimal replica lag (AWS says usually less than 100 milliseconds) after the primary instance writes the data:

  • reads from an Amazon DocumentDB cluster’s primary instance have read-after-write consistency
  • reads from a read replica have eventual consistency

It is possible to modify the read consistency level by specifying the read preference for the request or connection (it supports all MongoDB read preferences):

  • primary: reads are always routed to the primary instance
  • primaryPreferred: routes reads to the primary instance under normal operation, in case of failover a replica is used
  • secondary: reads are only routed to a replica, never the primary instance
  • secondaryPreferred: reads are routed to a read replica when one or more replicas are active. If there are no active replica instances in a cluster, the read request is routed to the primary instance
  • nearest: read preference routes reads based solely on the measured latency between the client and all instances in the Amazon DocumentDB cluster

Operations

It is possible to create an AWS DocumentDB cluster using CloudFormation stack (as described here).

Amazon DocumentDB is a fully managed solution that provides the following features:

  • auto scaling storage (up to 64 TB in 10GB increments)
  • simple compute resource scaling (resources allocated to an instance can be modified by changing instance class)
  • built-in monitoring, fault detection, and failover
  • daily snapshots.
  • An Amazon DocumentDB cluster decouples storage and compute.
  • A cluster consists of Cluster volume and Instances
    • Cluster volume refers to the storage layer that spans multiple Availability Zones. Each Availability Zone has a copy of the cluster data.
    • Instances refers to the compute layer. It provides the processing power needed for the database to write data to, and read data from, the cluster volume. 
  • Amazon DocumentDB Endpoints
    • Cluster endpoint
      • Connects to cluster’s current primary instance.
      • Can be used for both read and write operations.
    • Reader endpoint
      • Connects to one of the available replicas of the cluster.
      • Use for read operations only.
      • If the cluster has more than one replica, the reader endpoint will direct each request to DocumentDB replicas.
    • Instance endpoint
      • Connects to a specific instance in the cluster.
      • Use for specialized workloads that will only affect specific replica instances.

Performance

  • Provides millions of requests per second with millisecond latency and has twice the throughput of MongoDb.

Scaling

  • The minimum storage is 10GB. The Amazon DocumentDB storage will automatically scale up to 64 TB in 10 GB increments without affecting performance.
  • The Amazon DocumentDB cluster can be scaled by modifying the instance class for each instance in the cluster.
  • You can create up to 15 Amazon DocumentDB replicas in the cluster.
  • The replication lag is usually less than 100 milliseconds after the primary instance has written an update.

Reliability

  • The cluster volume provides durability by maintaining six copies of all data across three Availability Zones.
  • Amazon DocumentDB uses asynchronous replication to update the changes made to the primary instance to all of DocumentDB’s read replicas.
  • In most cases, the DocumentDB’s restart time is less than a minute after a database crash.
  • DocumentDB replicas can act as a failover target with no data loss.
  • Supports automatic failover.
  • Supports promotion priority within a cluster. Amazon DocumentDB will promote the replica with the highest priority tier to primary when the primary instance fails.
  • To increase the cluster’s availability, create replicas in multiple Availability Zones. The Amazon DocumentDB will automatically include the replicas when selecting for a failover target in the event of an instance failure.

Backup And Restore

 

Cluster Volume

Local Storage

STORED DATA TYPE

Persistent data

Temporary data

SCALABILITY

Automatically scales out when more space is required

Limited to the DB Instance class

  • Automated backups are always enabled.
  • Supports Point-In-Time restoration, which can be up to 5 minutes in the past.
  • You can restore from a cluster snapshot.
  • Supports sharing of encrypted manual snapshots.
  • Supports cross-region snapshot copying.

Security

  • You can authenticate a connection to a DocumentDB database through standard MongoDb tools with Salted Challenge Response Authentication Mechanism (SCRAM).
  • You can authenticate and authorize the use of DocumentDB management APIs through the use of IAM users, roles, and policies.
  • Data in transit is encrypted using Transport Layer Security (TLS).
  • Data at rest is encrypted using keys you manage through AWS KMS.
  • Amazon DocumentDB supports role based access control ( RBAC ) with built-in roles to enforce the principle of least privileged access.

Pricing

  • You are billed based on four categories
    • On-demand instances
      • Pricing per second with a 10-minute minimum
    • Database I/O
      • Pricing per million I/Os
    • Database Storage
      • Pricing per GB/month
    • Backup Storage
      • Pricing per GB/month

AWS Amazon Timestream Theory :

AMAZON TIMESTREAM : 

Amazon Timestream is a fast, scalable, fully managed, purpose-built time series database that makes it easy to store and analyze trillions of time series data points per day. Timestream saves you time and cost in managing the lifecycle of time series data by keeping recent data in memory and moving historical data to a cost optimized storage tier based upon user defined policies. Timestream’s purpose-built query engine lets you access and analyze recent and historical data together, without having to specify its location. Amazon Timestream has built-in time series analytics functions, helping you identify trends and patterns in your data in near real-time. Timestream is serverless and automatically scales up or down to adjust capacity and performance. Because you don’t need to manage the underlying infrastructure, you can focus on optimizing and building your applications.

Timestream also integrates with commonly used services for data collection, visualization, and machine learning. You can send data to Amazon Timestream using AWS IoT Core, Amazon Kinesis, Amazon MSK, and open source Telegraf. You can visualize data using Amazon QuickSight, Grafana, and business intelligence tools through JDBC. You can also use Amazon SageMaker with Timestream for machine learning.

Topics

  • Timestream Key Benefits
  • Timestream Use Cases
  • Getting Started With Timestream

Timestream Key Benefits :

The key benefits of Amazon Timestream are:

  • Serverless with auto-scaling - With Amazon Timestream, there are no servers to manage and no capacity to provision. As the needs of your application change, Timestream automatically scales to adjust capacity.

  • Data lifecycle management - Amazon Timestream simplifies the complex process of data lifecycle management. It offers storage tiering, with a memory store for recent data and a magnetic store for historical data. Amazon Timestream automates the transfer of data from the memory store to the magnetic store based upon user configurable policies.

  • Simplified data access - With Amazon Timestream, you no longer need to use disparate tools to access recent and historical data. Amazon Timestream's purpose-built query engine transparently accesses and combines data across storage tiers without you having to specify the data location.

  • Purpose-built for time series - You can quickly analyze time series data using SQL, with built-in time series functions for smoothing, approximation, and interpolation. Timestream also supports advanced aggregates, window functions, and complex data types such as arrays and rows.

  • Always encrypted - Amazon Timestream ensures that your time series data is always encrypted, whether at rest or in transit. Amazon Timestream also enables you to specify an AWS KMS customer managed key (CMK) for encrypting data in the magnetic store.

  • High availability - Amazon Timestream ensures high availability of your write and read requests by automatically replicating data and allocating resources across at least 3 different Availability Zones within a single AWS Region. For more information, see the Timestream Service Level Agreement

  • Durability - Amazon Timestream ensures durability of your data by automatically replicating your memory and magnetic store data across different Availability Zones within a single AWS Region. All of your data is written to disk before acknowledging your write request as complete.


Timestream Use Cases :

Examples of a growing list of use cases for Timestream include:

  • Monitoring metrics to improve the performance and availability of your applications.

  • Storage and analysis of industrial telemetry to streamline equipment management and maintenance.

  • Tracking user interaction with an application over time.

  • Storage and analysis of IoT sensor data.


Getting Started With Timestream :

We recommend that you begin by reading the following sections:

  • Tutorial - To create a database populated with sample data sets and run sample queries.

  • Timestream Concepts - To learn essential Timestream concepts.

  • Accessing Timestream - To learn how to access Timestream using the console, AWS CLI, or API.

  • Quotas - To learn about quotas on the number of Timestream components that you can provision.

To learn how to quickly begin developing applications for Timestream, see the following:

  • Using the AWS SDKs

  • Query Language Reference.



Architecture  :

Amazon Timestream has been designed from the ground up to collect, store, and process time series data at scale. Its serverless architecture supports fully decoupled data ingestion, storage, and query processing systems that can scale independently. This design simplifies each sub-system, making it easier to achieve unwavering reliability, eliminate scaling bottlenecks, and reduce the chances of correlated system failures. Each of these factors becomes more important as the system scales. You can read more about each topic below.









Tuesday, 5 July 2022

AWS DynamoDB Theory :

 AWS DynamoDB :

Amazon DynamoDB is a fully-managed (“serverless”) and NoSQL (nonrelational) database service, available on Amazon Web Services. DynamoDB is highly scalable, meaning you can start really small and grow very big without needing to re-deploy or re-architect. It also offers a flexible model which uses automatic scaling of throughput capacity, this means that it scales compute capacity based on demand, saving money and lowering entry costs. This makes it a great fit for mobile, gaming, IoT, and other high-growth and high-volume applications.

The Amazon DynamoDB Advantage

Amazon DynamoDB offers multiple advantages over other NoSQL database management systems such as Apache Cassandra and MongoDB. The integration between DynamoDB and other AWS services is especially beneficial. If you are already an AWS user, it’s a great choice.

SIMPLE SET-UP

As a serverless database service, setting up is easy. Simply open the AWS Management Console and utilize the wizard. Conversely, in order to set up an on-premises MongoDB instance, you need to follow a long list of instructions and may have to resolve authentication errors.

AWS SECURITY

Security for DynamoDB is governed by AWS Identity and Access Management (IAM). You can also use other AWS security features to enhance the controls. Although MongoDB is secure, there have been security breaches in the past due to improper configuration and management.


AMAZON DYNAMODB ACCELERATOR (DAX)

DAX is a fully managed, secure, and scalable DynamoDB cache service. It is suitable for read-intensive workloads and provides major improvements in DynamoDB’s response time. DAX clusters are hosted by and run in Amazon Virtual Private Cloud (Amazon VPC). A DAX client should be installed on the Amazon EC2 instance hosting your application in VPC. All requests are routed via the DAX client, which fetches data, if available, from the DAX cluster (a cache hit).

If data is not available in the cluster, it will be extracted from DynamoDB (a cache miss). Results will be provided to your application via the DAX cluster. Caching data in DAX clusters reduces overall read requests on DynamoDB tables, which can save you money. Companies such as Tinder, Expedia, and Genesys all use DAX to enhance the customer experience by providing sub-millisecond response times to customer queries.

DynamoDB Auto Scaling

  • When you use the AWS Management Console to create a new table, DynamoDB auto scaling is enabled for that table by default.
  • Uses the AWS Application Auto Scaling service to dynamically adjust provisioned throughput capacity on your behalf, in response to actual traffic patterns.
  • You create a scaling policy for a table or a global secondary index. The scaling policy specifies whether you want to scale read capacity or write capacity (or both), and the minimum and maximum provisioned capacity unit settings for the table or index. The scaling policy also contains a target utilization, which is the percentage of consumed provisioned throughput at a point in time.

AWS Training Amazon DynamoDB 3

 

  • DynamoDB auto scaling doesn’t prevent you from manually modifying provisioned throughput settings.
  • If you enable DynamoDB auto scaling for a table that has one or more global secondary indexes, AWS highly recommends that you also apply auto scaling uniformly to those indexes.

Security

  • Encryption
    • Encrypts your data at rest using an AWS Key Management Service (AWS KMS) managed encryption key for DynamoDB.
    • Encryption at rest can be enabled only when you are creating a new DynamoDB table.
    • After encryption at rest is enabled, it can’t be disabled.
    • Uses AES-256 encryption.
    • The following are encrypted:
      • DynamoDB base tables
      • Local secondary indexes
      • Global secondary indexes
    • Authentication and Access Control
      • Access to DynamoDB requires credentials.
      • Aside from valid credentials, you also need to have permissions to create or access DynamoDB resources.
      • Types of Identities
        • AWS account root user
        • IAM user
        • IAM role
    • You can create indexes and streams only in the context of an existing DynamoDB table, referred to as subresources.
    • Resources and subresources have unique Amazon Resource Names (ARNs) associated with them.
    • permissions policy describes who has access to what.
      • Identity-based Policies
        • Attach a permissions policy to a user or a group in your account
        • Attach a permissions policy to a role (grant cross-account permissions)
      • Policy Elements
        • Resource – use an ARN to identify the resource that the policy applies to.
        • Action – use action keywords to identify resource operations that you want to allow or deny.
        • Effect – specify the effect, either allow or deny, when the user requests the specific action.
        • Principal – the user that the policy is attached to is the implicit principal.
    • Web Identity Federation – Customers can sign in to an identity provider and then obtain temporary security credentials from AWS Security Token Service (AWS STS).