Creating an on-premises DB instance - Amazon Relational Database Service on VMware

Creating an on-premises DB instance

The basic building block of Amazon RDS is the DB instance. The DB instance is where you create your on-premises databases.

Before you can create on-premises DB instances, you must complete the following prerequisites:

Amazon RDS on VMware supports the following DB engines and versions:

  • Amazon RDS for Microsoft SQL Server 2016 SP2 Enterprise Edition

  • Amazon RDS for MySQL version 5.7

  • Amazon RDS for PostgreSQL version 10.9-R1 and 10.10-R1

You can create an on-premises DB instance using the AWS Management Console, the AWS CLI, or the RDS API.

To create an on-premises DB instance

  1. Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

  2. In the top-right corner of the console, choose the AWS Region that contains the custom AZ in which you want to create the DB instance.

  3. In the navigation pane, choose Databases.

  4. Choose Create database.

    The Create database page opens.

    
      Create database page
  5. In the Database location section, choose On-premises.

  6. In the Availability zone section, choose Custom Availability Zone.

  7. In the Engine options section, choose the type of DB engine in Engine type, and then, for some DB engines, choose the DB engine version in Version.

    
               DB engine options

    If you chose a DB engine that requires an on-premises customer provided license (such as Microsoft SQL Server), you might need to choose the DB engine edition for Edition.

    
               DB engine edition and version
    Important

    For DB engines that require an on-premises customer-provided license, operating system and database media must be installed in the custom AZ. Also, the edition and version of the media must match your selections. If the media is not installed, a warning message appears. For information about installing media, see Installing the media for Microsoft SQL Server.

  8. In the Settings section, complete the DB instance identifier, Master username, and Master password settings.

    For more information about settings, see Available settings.

  9. In the DB instance size section, choose the DB instance class.

  10. In the Connectivity section, enter the number for the Database port.

  11. In the Additional configuration section, complete the remaining settings.

  12. Choose Create database.

To create an on-premises DB instance by using the AWS CLI, call the create-db-instance command with the options following.

  • --availability-zone (Required)

  • --db-instance-class (Required)

  • --db-instance-identifier (Required)

  • --engine (Required)

  • --backup-retention-period

  • --db-name

  • --engine-version

  • --master-username

  • --master-user-password

  • --port

  • --preferred-backup-window

For more information about these options, see Available settings.

The following example creates an on-premises PostgreSQL DB instance named mydbinstance.

For Linux, OS X, or Unix:

aws rds create-db-instance \ --db-instance-identifier mydbinstance \ --db-instance-class db.mv11.medium \ --engine postgres \ --availability-zone mycustomaz_identifier \ --master-username masterawsuser \ --master-user-password masteruserpassword

For Windows:

aws rds create-db-instance ^ --db-instance-identifier mydbinstance ^ --db-instance-class db.mv11.medium ^ --engine postgres ^ --availability-zone mycustomaz_identifier ^ --master-username masterawsuser ^ --master-user-password masteruserpassword

Replace the placeholders with appropriate values. For mycustomaz_identifier, specify the unique identifier for the custom AZ that you want to create the DB instance in.

To create an on-premises DB instance by using the Amazon RDS API, call the CreateDBInstance operation with the parameters following.

For AvailabilityZone, specify the unique identifier for the custom AZ that you want to create the DB instance in.

  • AvailabilityZone (Required)

  • DBInstanceClass (Required)

  • DBInstanceIdentifier (Required)

  • Engine (Required)

  • BackupRetentionPeriod

  • DBName

  • EngineVersion

  • MasterUsername

  • MasterUserPassword

  • Port

  • PreferredBackupWindow

For more information about these parameters, see Available settings.

Available settings

For details about the available settings that you can modify during DB instance creation, see the table following.

Console Setting CLI Option RDS API Parameter Description

Backup retention period

--backup-retention-period

BackupRetentionPeriod

The number of days that you want automatic backups of your DB instance to be retained. For any nontrivial DB instance, set this value to 1 or greater.

Enable the Enable automatic backups option to set this value.

Backup window

--preferred-backup-window

PreferredBackupWindow

The time period during which Amazon RDS automatically takes a backup of your DB instance. Unless you have a specific time that you want to have your database backup, use the default of No Preference.

Custom Availability Zone

--availability-zone

AvailabilityZone

The custom AZ for your DB instance.

For more information, see Custom Availability Zones.

Database name

--db-name

DBName

The name for the database on your DB instance. The requirements for the name vary by DB engine. If you don't provide a name, Amazon RDS doesn't create a database on the DB instance you are creating. You can create additional databases after the DB instance is created.

Database port

--port

Port

The port that you want to use to access the DB instance.

DB instance class

--db-instance-class

DBInstanceClass

The DB instance class that you want to use.

For more information, see Choosing the on-premises DB instance class.

DB instance identifier

--db-instance-identifier

DBInstanceIdentifier

The name for your DB instance. This value is stored as a lowercase string.

Engine

--engine

Engine

The name of the database engine to be used for this instance. Currently, the following engines are supported:

  • mysql

  • postgres

  • sqlserver-ee

Master password

--master-user-password

MasterUserPassword

The password for your master user.

Master username

--master-username

MasterUsername

The name that you use as the master user name to log on to your DB Instance.

For more information, including a list of the default privileges for the master user, see Master user account privileges in the Amazon RDS User Guide.

Version

--engine-version

EngineVersion

The version of database engine that you want to use.