Amazon Relational Database Concepts

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Relational Database Instance

Amazon RDS DB Instances

A RDS database instance (DB instance) can contain multiple user-created databases. The DB instance can be accessed using the same client tools and applications you might use to access a standalone database instance.

DB Instance Lifecycle

Amazon RDS DB Instance Lifecycle

Instance Identifier

Each database instance has a DB instance identifier. This customer-supplied name uniquely identifies the DB instance when interacting with the Amazon RDS API and AWS CLI commands. The DB instance identifier must be unique for that AWS account in an AWS Region. The DB instance identifier can be explicitly specified, in which case CloudFormation converts it to lowercase. If not specified, CloudFormation generates a unique physical ID. Shows up in the endpoint as such: <someid>.ak29cdi3ewg0.ca-central-1.rds.amazonaws.com.

Database Name

The name of the database the RDS instance will expose. The meaning of the database name differs according to the database engine.

For a PostgreSQL RDBMS, is the name of the database to create when the DB instance is created. Is the name of this database, and it is the value that comes after -d in the psql command line. The database name must begin with a letter and contain only alphanumeric characters. It cannot be "db" or any word reserved by the database engine. A database name is not required when creating a DB instance. Databases hosted by the same DB instance must have a unique name within that instance.

For more details see CreateDBInstance.

Additional Databases

To create additional databases, connect to the DB instance and use the SQL command CREATE DATABASE. More details:

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html

Allocated Storage

Represents the allocated storage size, specified in gigabytes (GB). If any value is set in the Iops parameter, allocated storage must be at least 100 GB, which corresponds to the minimum Iops value of 1,000. If Iops value is increased (in 1,000 IOPS increments), then allocated storage value must be also increased. (in 100-GB increments). The value is required, except when DBClusterIdentifier property is specified or when a read replica is created by using the AWS::RDS::DBInstance resource.

Instance Class

Choosing the DB Instance Class

Designates the name of the compute and memory capacity classes for the database instance.

Engine

CreateDBInstance

Engine Version

DescribeDBEngineVersions
aws rds describe-db-engine-versions --engine postgres

Master Username

Amazon RDS creates a master user account for the DB instance as part of the creation process. This master user has permissions to create databases and to perform create, delete, select, update, and insert operations on tables the master user creates. Cannot be "admin" for Postgres.

VPC Association

Amazon Virtual Private Cloud (VPCs) and Amazon RDS
Scenarios for Accessing a DB Instance in a VPC

If a DB instance is created in a VPC, by default it is created in the default VPC of the AWS account.

A DB instance can be deployed in a specific VPC, by picking at least two subnets in the VPC (for HA purposes), declaring them as part of a DB subnet group and then configuring the DB instance with the DB subnet group. The procedure to deploy a RDS instance into a specific VPC is described here:

Deploying a RDS Instance into a Specific VPC

Security Groups

Note that by default the security group does not allow public access.

PostgreSQL Support

PostgreSQL on Amazon RDS

Microsoft SQL Server Support

Microsoft SQL Server on Amazon RDS