Amazon Relational Database Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(20 intermediate revisions by the same user not shown)
Line 4: Line 4:


=Relational Database Instance=
=Relational Database Instance=
{{External|[https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.html 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==
{{External|[https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.html 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==
==Database Name==


The database name must begin with a letter and contain only alphanumeric characters. It cannot be "db".
The name of the database the RDS instance will expose. The meaning of the database name differs according to the database [[#Engine|engine]].
 
For a PostgreSQL RDBMS, is the name of the database to create when the DB instance is created. Is the name of this [[PostgreSQL_Concepts#Database|database]], and it is the [[PostgreSQL Connecting to a Database#-d.7C--dbname.3D|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 [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html CreateDBInstance].


==Instance Identifier==
===Additional Databases===


The name for the database instance. 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
To create additional databases, connect to the DB instance and use the SQL command CREATE DATABASE. More details: {{External|https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToPostgreSQLInstance.html}}


==Allocated Storage==
==Allocated Storage==
Line 35: Line 52:
==Master Username==
==Master Username==


Cannot be "admin" for Postgres.
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==
==VPC Association==
Line 42: Line 59:
{{External|[https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Scenarios.html Scenarios for Accessing a DB Instance in a VPC]}}
{{External|[https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Scenarios.html Scenarios for Accessing a DB Instance in a VPC]}}


To make the instance a VPC instance, it must be associated with a DB subnet group.
If a DB instance is created in a VPC, by default it is created in the [[Amazon_VPC_Concepts#Default_VPC|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: {{Internal|Deploying a RDS Instance into a Specific VPC|Deploying a RDS Instance into a Specific VPC}}
 
==Security Groups==
 
Note that by default the security group does not allow public access.
 
=PostgreSQL Support=
{{External|[https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html PostgreSQL on Amazon RDS]}}
=Microsoft SQL Server Support=
{{External|[https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html Microsoft SQL Server on Amazon RDS]}}

Latest revision as of 22:01, 6 October 2023

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