Amazon Relational Database Service - User Guide
Amazon Relational Database Service - User Guide
Database Service
User Guide
Amazon Relational Database Service User Guide
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not
Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or
discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may
or may not be affiliated with, connected to, or sponsored by Amazon.
Amazon Relational Database Service User Guide
Table of Contents
What is Amazon RDS? ........................................................................................................................ 1
Overview ................................................................................................................................... 1
Amazon EC2 and on-premises databases ............................................................................... 1
Amazon RDS and Amazon EC2 ............................................................................................ 2
Amazon RDS Custom for Oracle and Microsoft SQL Server ...................................................... 3
Amazon RDS on AWS Outposts ............................................................................................ 3
DB instances .............................................................................................................................. 3
DB engines ........................................................................................................................ 4
DB instance classes ............................................................................................................ 4
DB instance storage ............................................................................................................ 4
Amazon Virtual Private Cloud (Amazon VPC) ......................................................................... 5
AWS Regions and Availability Zones ............................................................................................. 5
Security .................................................................................................................................... 5
Amazon RDS monitoring ............................................................................................................. 5
How to work with Amazon RDS ................................................................................................... 5
AWS Management Console .................................................................................................. 6
Command line interface ...................................................................................................... 6
Amazon RDS APIs .............................................................................................................. 6
How you are charged for Amazon RDS ......................................................................................... 6
What's next? .............................................................................................................................. 6
Getting started .................................................................................................................. 6
Topics specific to database engines ...................................................................................... 6
Amazon RDS shared responsibility model ...................................................................................... 8
DB instances .............................................................................................................................. 9
DB instance classes ................................................................................................................... 11
DB instance class types ..................................................................................................... 11
Supported DB engines ...................................................................................................... 14
Determining DB instance class support in AWS Regions ......................................................... 68
Changing your DB instance class ........................................................................................ 71
Configuring the processor for RDS for Oracle ....................................................................... 71
Hardware specifications ..................................................................................................... 87
DB instance storage ................................................................................................................ 101
Storage types ................................................................................................................. 101
General Purpose SSD storage ........................................................................................... 102
Provisioned IOPS storage ................................................................................................ 104
Comparing SSD storage types .......................................................................................... 106
Magnetic storage ............................................................................................................ 107
Monitoring storage performance ...................................................................................... 107
Factors that affect storage performance ............................................................................ 108
Regions, Availability Zones, and Local Zones .............................................................................. 110
AWS Regions .................................................................................................................. 111
Availability Zones ........................................................................................................... 113
Local Zones ................................................................................................................... 114
Supported Amazon RDS features by Region and engine .............................................................. 116
Table conventions ........................................................................................................... 116
Feature quick reference ................................................................................................... 116
Blue/Green Deployments ................................................................................................. 118
Cross-Region automated backups ..................................................................................... 118
Cross-Region read replicas ............................................................................................... 119
Database activity streams ................................................................................................ 121
Dual-stack mode ............................................................................................................ 125
Export snapshots to S3 ................................................................................................... 133
IAM database authentication ............................................................................................ 138
Kerberos authentication .................................................................................................. 141
iii
Amazon Relational Database Service User Guide
iv
Amazon Relational Database Service User Guide
v
Amazon Relational Database Service User Guide
vi
Amazon Relational Database Service User Guide
vii
Amazon Relational Database Service User Guide
viii
Amazon Relational Database Service User Guide
ix
Amazon Relational Database Service User Guide
x
Amazon Relational Database Service User Guide
xi
Amazon Relational Database Service User Guide
xii
Amazon Relational Database Service User Guide
xiii
Amazon Relational Database Service User Guide
xiv
Amazon Relational Database Service User Guide
xv
Amazon Relational Database Service User Guide
xvi
Amazon Relational Database Service User Guide
xvii
Amazon Relational Database Service User Guide
xviii
Amazon Relational Database Service User Guide
xix
Amazon Relational Database Service User Guide
xx
Amazon Relational Database Service User Guide
xxi
Amazon Relational Database Service User Guide
xxii
Amazon Relational Database Service User Guide
Overview
If you are new to AWS products and services, begin learning more with the following resources:
Topics
• Amazon EC2 and on-premises databases (p. 1)
• Amazon RDS and Amazon EC2 (p. 2)
• Amazon RDS Custom for Oracle and Microsoft SQL Server (p. 3)
• Amazon RDS on AWS Outposts (p. 3)
When you buy an on-premises server, you get CPU, memory, storage, and IOPS, all bundled together.
With Amazon EC2, these are split apart so that you can scale them independently. If you need more CPU,
less IOPS, or more storage, you can easily allocate them.
For a relational database in an on-premises server, you assume full responsibility for the server,
operating system, and software. For a database on an Amazon EC2 instance, AWS manages the layers
below the operating system. In this way, Amazon EC2 eliminates some of the burden of managing an on-
premises database server.
In the following table, you can find a comparison of the management models for on-premises databases
and Amazon EC2.
1
Amazon Relational Database Service User Guide
Amazon RDS and Amazon EC2
Amazon EC2 isn't a fully managed service. Thus, when you run a database on Amazon EC2, you're
more prone to user errors. For example, when you update the operating system or database software
manually, you might accidentally cause application downtime. You might spend hours checking every
change to identify and fix an issue.
In the following table, you can find a comparison of the management models in Amazon EC2 and
Amazon RDS.
2
Amazon Relational Database Service User Guide
Amazon RDS Custom for Oracle and Microsoft SQL Server
Amazon RDS provides the following specific advantages over database deployments that aren't fully
managed:
• You can use the database products you are already familiar with: MariaDB, Microsoft SQL Server,
MySQL, Oracle, and PostgreSQL.
• Amazon RDS manages backups, software patching, automatic failure detection, and recovery.
• You can turn on automated backups, or manually create your own backup snapshots. You can use
these backups to restore a database. The Amazon RDS restore process works reliably and efficiently.
• You can get high availability with a primary instance and a synchronous secondary instance that you
can fail over to when problems occur. You can also use read replicas to increase read scaling.
• In addition to the security in your database package, you can help control who can access your RDS
databases. To do so, you can use AWS Identity and Access Management (IAM) to define users and
permissions. You can also help protect your databases by putting them in a virtual private cloud (VPC).
You can use the control capabilities of RDS Custom to access and customize the database environment
and operating system for legacy and packaged business applications. Meanwhile, Amazon RDS
automates database administration tasks and operations.
In this deployment model, you can install applications and change configuration settings to suit your
applications. At the same time, you can offload database administration tasks such as provisioning,
scaling, upgrading, and backup to AWS. You can take advantage of the database management benefits
of Amazon RDS, with more control and flexibility.
For Oracle Database and Microsoft SQL Server, RDS Custom combines the automation of Amazon RDS
with the flexibility of Amazon EC2. For more information on RDS Custom, see Working with Amazon RDS
Custom (p. 978).
With the shared responsibility model of RDS Custom, you get more control than in Amazon RDS, but also
more responsibility. For more information, see Shared responsibility model in RDS Custom (p. 979).
DB instances
A DB instance is an isolated database environment in the AWS Cloud. The basic building block of Amazon
RDS is the DB instance.
3
Amazon Relational Database Service User Guide
DB engines
Your DB instance can contain one or more user-created databases. You can access your DB instance by
using the same tools and applications that you use with a standalone database instance. You can create
and modify a DB instance by using the AWS Command Line Interface (AWS CLI), the Amazon RDS API, or
the AWS Management Console.
DB engines
A DB engine is the specific relational database software that runs on your DB instance. Amazon RDS
currently supports the following engines:
• MariaDB
• Microsoft SQL Server
• MySQL
• Oracle
• PostgreSQL
Each DB engine has its own supported features, and each version of a DB engine can include specific
features. Support for Amazon RDS features varies across AWS Regions and specific versions of each DB
engine. To check feature support in different engine versions and Regions, see Supported features in
Amazon RDS by AWS Region and DB engine (p. 116).
Additionally, each DB engine has a set of parameters in a DB parameter group that control the behavior
of the databases that it manages.
DB instance classes
A DB instance class determines the computation and memory capacity of a DB instance. A DB instance
class consists of both the DB instance type and the size. Each instance type offers different compute,
memory, and storage capabilities. For example, db.m6g is a general-purpose DB instance type powered
by AWS Graviton2 processors. Within the db.m6g instance type, db.m6g.2xlarge is a DB instance class.
You can select the DB instance that best meets your needs. If your needs change over time, you can
change DB instances. For information, see DB instance classes (p. 11).
Note
For pricing information on DB instance classes, see the Pricing section of the Amazon RDS
product page.
DB instance storage
Amazon EBS provides durable, block-level storage volumes that you can attach to a running instance. DB
instance storage comes in the following types:
The storage types differ in performance characteristics and price. You can tailor your storage
performance and cost to the needs of your database.
Each DB instance has minimum and maximum storage requirements depending on the storage type and
the database engine it supports. It's important to have sufficient storage so that your databases have
room to grow. Also, sufficient storage makes sure that features for the DB engine have room to write
content or log entries. For more information, see Amazon RDS DB instance storage (p. 101).
4
Amazon Relational Database Service User Guide
Amazon Virtual Private Cloud (Amazon VPC)
Amazon RDS uses Network Time Protocol (NTP) to synchronize the time on DB instances.
Each AWS Region contains multiple distinct locations called Availability Zones, or AZs. Each Availability
Zone is engineered to be isolated from failures in other Availability Zones. Each is engineered to provide
inexpensive, low-latency network connectivity to other Availability Zones in the same AWS Region. By
launching instances in separate Availability Zones, you can protect your applications from the failure of a
single location. For more information, see Regions, Availability Zones, and Local Zones (p. 110).
You can run your DB instance in several Availability Zones, an option called a Multi-AZ deployment.
When you choose this option, Amazon automatically provisions and maintains one or more secondary
standby DB instances in a different Availability Zone. Your primary DB instance is replicated across
Availability Zones to each secondary DB instance. This approach helps provide data redundancy and
failover support, eliminate I/O freezes, and minimize latency spikes during system backups. In a Multi-
AZ DB clusters deployment, the secondary DB instances can also serve read traffic. For more information,
see Configuring and managing a Multi-AZ deployment (p. 492).
Security
A security group controls the access to a DB instance. It does so by allowing access to IP address ranges or
Amazon EC2 instances that you specify.
For more information about security groups, see Security in Amazon RDS (p. 2565).
5
Amazon Relational Database Service User Guide
AWS Management Console
For application development, we recommend that you use one of the AWS Software Development Kits
(SDKs). The AWS SDKs handle low-level details such as authentication, retry logic, and error handling, so
that you can focus on your application logic. AWS SDKs are available for a wide variety of languages. For
more information, see Tools for Amazon web services .
AWS also provides libraries, sample code, tutorials, and other resources to help you get started more
easily. For more information, see Sample code & libraries.
For Amazon RDS pricing information, see the Amazon RDS product page.
What's next?
The preceding section introduced you to the basic infrastructure components that RDS offers. What
should you do next?
Getting started
Create a DB instance using instructions in Getting started with Amazon RDS (p. 180).
6
Amazon Relational Database Service User Guide
Topics specific to database engines
7
Amazon Relational Database Service User Guide
Amazon RDS shared responsibility model
8
Amazon Relational Database Service User Guide
DB instances
You can have up to 40 Amazon RDS DB instances, with the following limitations:
• 10 for each SQL Server edition (Enterprise, Standard, Web, and Express) under the "license-included"
model
• 10 for Oracle under the "license-included" model
• 40 for MySQL, MariaDB, or PostgreSQL
• 40 for Oracle under the "bring-your-own-license" (BYOL) licensing model
Note
If your application requires more DB instances, you can request additional DB instances by using
this form.
Each DB 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 customer in an AWS Region.
The DB instance identifier forms part of the DNS hostname allocated to your instance by RDS.
For example, if you specify db1 as the DB instance identifier, then RDS will automatically
allocate a DNS endpoint for your instance. An example endpoint is db1.abcdefghijkl.us-
east-1.rds.amazonaws.com, where db1 is your instance ID.
• If you rename your DB instance, the endpoint is different but the fixed identifier is the same.
For example, if you rename db1 to renamed-db1, the new instance endpoint is renamed-
db1.abcdefghijkl.us-east-1.rds.amazonaws.com.
• If you delete and re-create a DB instance with the same DB instance identifier, the endpoint is the
same.
• If you use the same account to create a DB instance in a different Region, the internally
generated identifier is different because the Region is different, as in db2.mnopqrstuvwx.us-
west-1.rds.amazonaws.com.
Each DB instance supports a database engine. Amazon RDS currently supports MySQL, MariaDB,
PostgreSQL, Oracle, Microsoft SQL Server, and Amazon Aurora database engines.
When creating a DB instance, some database engines require that a database name be specified. A DB
instance can host multiple databases, or a single Oracle database with multiple schemas. The database
name value depends on the database engine:
9
Amazon Relational Database Service User Guide
DB instances
• For the MySQL and MariaDB database engines, the database name is the name of a database hosted
in your DB instance. Databases hosted by the same DB instance must have a unique name within that
instance.
• For the Oracle database engine, database name is used to set the value of ORACLE_SID, which must be
supplied when connecting to the Oracle RDS instance.
• For the Microsoft SQL Server database engine, database name is not a supported parameter.
• For the PostgreSQL database engine, the database name is the name of a database hosted in your DB
instance. 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.
Amazon RDS creates a master user account for your 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. You must set the master user password when you create
a DB instance, but you can change it at any time using the AWS CLI, Amazon RDS API operations, or the
AWS Management Console. You can also change the master user password and manage users using
standard SQL commands.
Note
This guide covers non-Aurora Amazon RDS database engines. For information about using
Amazon Aurora, see the Amazon Aurora User Guide.
10
Amazon Relational Database Service User Guide
DB instance classes
DB instance classes
The DB instance class determines the computation and memory capacity of an Amazon RDS DB instance.
The DB instance class that you need depends on your processing power and memory requirements.
A DB instance class consists of both the DB instance class type and the size. For example, db.r6g is a
memory-optimized DB instance class type powered by AWS Graviton2 processors. Within the db.r6g
instance class type, db.r6g.2xlarge is a DB instance class. The size of this class is 2xlarge.
For more information about instance class pricing, see Amazon RDS pricing.
Topics
• DB instance class types (p. 11)
• Supported DB engines for DB instance classes (p. 14)
• Determining DB instance class support in AWS Regions (p. 68)
• Changing your DB instance class (p. 71)
• Configuring the processor for a DB instance class in RDS for Oracle (p. 71)
• Hardware specifications for DB instance classes (p. 87)
For more information about Amazon EC2 instance types, see Instance types in the Amazon EC2
documentation.
• db.m7g – General-purpose DB instance classes powered by AWS Graviton3 processors. These instance
classes deliver balanced compute, memory, and networking for a broad range of general-purpose
workloads.
You can modify a DB instance to use one of the DB instance classes powered by AWS Graviton3
processors. To do so, complete the same steps as with any other DB instance modification.
• db.m6g – General-purpose DB instance classes powered by AWS Graviton2 processors. These instances
deliver balanced compute, memory, and networking for a broad range of general-purpose workloads.
The db.m6gd instance classes have local NVMe-based SSD block-level storage for applications that
need high-speed, low latency local storage.
You can modify a DB instance to use one of the DB instance classes powered by AWS Graviton2
processors. To do so, complete the same steps as with any other DB instance modification.
• db.m6i – General-purpose DB instance classes powered by 3rd Generation Intel Xeon Scalable
processors. These instances are SAP Certified and ideal for workloads such as backend servers
supporting enterprise applications, gaming servers, caching fleets, and application development
11
Amazon Relational Database Service User Guide
DB instance class types
environments. The db.m6id instance classes offer up to 7.6 TB of local NVMe-based SSD storage,
whereas db.m6i offers EBS-only storage.
• db.m5 –General-purpose DB instance classes that provide a balance of compute, memory, and
network resources, and are a good choice for many applications. The db.m5d instance class offers
NVMe-based SSD storage that is physically connected to the host server. The db.m5 instance classes
provide more computing capacity than the previous db.m4 instance classes. They are powered by the
AWS Nitro System, a combination of dedicated hardware and lightweight hypervisor.
• db.m4 – General-purpose DB instance classes that provide more computing capacity than the previous
db.m3 instance classes.
For the RDS for Oracle DB engines, Amazon RDS no longer supports db.m4 DB instance classes. If you
had previously created RDS for Oracle db.m4 DB instances, Amazon RDS automatically upgrades those
DB instances to equivalent db.m5 DB instance classes.
• db.m3 – General-purpose DB instance classes that provide more computing capacity than the previous
db.m1 instance classes.
For the RDS for MariaDB, RDS for MySQL, and RDS for PostgreSQL DB engines, Amazon RDS has
started the end-of-life process for db.m3 DB instance classes using the following schedule, which
includes upgrade recommendations. For all RDS DB instances that use db.m3 DB instance classes, we
recommend that you upgrade to a db.m5 DB instance class as soon as possible.
• db.z1d – Instance classes optimized for memory-intensive applications. These instance classes offer
both high compute capacity and a high memory footprint. High frequency z1d instances deliver a
sustained all-core frequency of up to 4.0 GHz.
• db.x2g – Instance classes optimized for memory-intensive applications and powered by AWS
Graviton2 processors. These instance classes offer low cost per GiB of memory.
You can modify a DB instance to use one of the DB instance classes powered by AWS Graviton2
processors. To do so, complete the same steps as with any other DB instance modification.
• db.x2i – Instance classes optimized for memory-intensive applications. The db.x2iedn and db.x2idn
classes are powered by third-generation Intel Xeon Scalable processors (Ice Lake). They include up
to 3.8 TB of local NVMe SSD storage, up to 100 Gbps of networking bandwidth, and up to 4 TiB
(db.x2iden) or 2 TiB (db.x2idn) of memory. The db.x2iezn class is powered by second-generation Intel
Xeon Scalable processors (Cascade Lake) with an all-core turbo frequency of up to 4.5 GHz and up to
1.5 TiB of memory.
• db.x1 – Instance classes optimized for memory-intensive applications. These instance classes offer one
of the lowest price per GiB of RAM among the DB instance classes and up to 1,952 GiB of DRAM-based
instance memory. The db.x1e type offers up to 3,904 GiB of DRAM-based instance memory.
12
Amazon Relational Database Service User Guide
DB instance class types
• db.r7g – Instance classes powered by AWS Graviton3 processors. These instance classes are ideal for
running memory-intensive workloads in open-source databases such as MySQL and PostgreSQL.
You can modify a DB instance to use one of the DB instance classes powered by AWS Graviton3
processors. To do so, complete the same steps as with any other DB instance modification.
• db.r6g – Instance classes powered by AWS Graviton2 processors. These instance classes are ideal for
running memory-intensive workloads in open-source databases such as MySQL and PostgreSQL. The
db.r6gd type offers local NVMe-based SSD block-level storage for applications that need high-speed,
low latency local storage.
You can modify a DB instance to use one of the DB instance classes powered by AWS Graviton2
processors. To do so, complete the same steps as with any other DB instance modification.
• db.r6i – Instance classes powered by 3rd Generation Intel Xeon Scalable processors. These instances
are SAP-Certified and are an ideal fit for memory-intensive workloads in open-source databases such
as MySQL and PostgreSQL. The db.r6id instance class type has a memory-to-vCPU ratio of 8:1 and a
maximum memory of 1 TiB. The db.r6id instance class type offers up to 7.6 TB of local NVMe-based
SSD storage, whereas the db.r6i class type offers EBS-only storage.
• db.r5b – Instance classes that are memory-optimized for throughput-intensive applications. Powered
by the AWS Nitro System, db.r5b instances deliver up to 60 Gbps bandwidth and 260,000 IOPS of EBS
performance. This is the fastest block storage performance on EC2.
• db.r5d – Instance classes that are optimized for low latency, very high random I/O performance, and
high sequential read throughput.
• db.r5 – Instance classes optimized for memory-intensive applications. These instance classes offer
improved networking performance. They are powered by the AWS Nitro System, a combination of
dedicated hardware and lightweight hypervisor.
• db.r4 – Instance classes that provide improved networking over previous db.r3 instance classes.
For the RDS for Oracle DB engines, Amazon RDS has started the end-of-life process for db.r4 DB
instance classes using the following schedule, which includes upgrade recommendations. For RDS
for Oracle DB instances that use db.r4 instance classes, we recommend that you upgrade to a db.r5
instance class as soon as possible.
Amazon RDS started automatic upgrades of RDS for April 17, 2023
Oracle DB instances that use db.r4 DB instance classes
to equivalent db.r5 DB instance classes.
For the RDS for MariaDB, RDS for MySQL, and RDS for PostgreSQL DB engines, Amazon RDS has
started the end-of-life process for db.r3 DB instance classes using the following schedule, which
includes upgrade recommendations. For all RDS DB instances that use db.r3 DB instance classes, we
recommend that you upgrade to a db.r5 DB instance class as soon as possible.
13
Amazon Relational Database Service User Guide
Supported DB engines
• db.t4g – General-purpose instance classes powered by Arm-based AWS Graviton2 processors. These
instance classes deliver better price performance than previous burstable-performance DB instance
classes for a broad set of burstable general-purpose workloads. Amazon RDS db.t4g instances are
configured for Unlimited mode. This means that they can burst beyond the baseline over a 24-hour
window for an additional charge.
You can modify a DB instance to use one of the DB instance classes powered by AWS Graviton2
processors. To do so, complete the same steps as with any other DB instance modification.
• db.t3 – Instance classes that provide a baseline performance level, with the ability to burst to full
CPU usage. The db.t3 instances are configured for Unlimited mode. These instance classes provide
more computing capacity than the previous db.t2 instance classes. They are powered by the AWS Nitro
System, a combination of dedicated hardware and lightweight hypervisor.
• db.t2 – Instance classes that provide a baseline performance level, with the ability to burst to full CPU
usage. We recommend using these instance classes only for development and test servers, or other
non-production servers.
Note
The DB instance classes that use the AWS Nitro System (db.m5, db.r5, db.t3) are throttled on
combined read plus write workload.
For DB instance class hardware specifications, see Hardware specifications for DB instance
classes (p. 87).
DB instance class support varies according to the version and edition of SQL Server. For
instance class support by version and edition, see DB instance class support for Microsoft SQL
Server (p. 1358).
Oracle
DB instance class support varies according to the Oracle Database version and edition. RDS for
Oracle supports additional memory-optimized instance classes. These classes have names of the
form db.r5.instance_size.tpcthreads_per_core.memratio. For the vCPU count and memory
allocation for each optimized class, see Supported RDS for Oracle instance classes (p. 1797).
RDS Custom
For information about the DB instance classes supported in RDS Custom, see DB instance class
support for RDS Custom for Oracle (p. 999) and DB instance class support for RDS Custom for SQL
Server (p. 1089).
14
Amazon Relational Database Service User Guide
Supported DB engines
In the following table, you can find details about supported Amazon RDS DB instance classes for each
Amazon RDS DB engine. The cell for each engine contains one of the following values:
Yes
No
specific-versions
The instance class is supported only for the specified database versions of the DB engine.
Amazon RDS periodically deprecates major and minor versions. For information about current
supported versions, see topics for the individual DB engines: MariaDB versions (p. 1265), Microsoft
SQL Server versions (p. 1362), MySQL versions (p. 1627), Oracle versions (p. 1789), and PostgreSQL
versions (p. 2154).
15
Amazon Relational Database Service User Guide
Supported DB engines
16
Amazon Relational Database Service User Guide
Supported DB engines
17
Amazon Relational Database Service User Guide
Supported DB engines
18
Amazon Relational Database Service User Guide
Supported DB engines
19
Amazon Relational Database Service User Guide
Supported DB engines
20
Amazon Relational Database Service User Guide
Supported DB engines
db.m6id – general-purpose instance classes powered by 3rd generation Intel Xeon Scalable processors
21
Amazon Relational Database Service User Guide
Supported DB engines
22
Amazon Relational Database Service User Guide
Supported DB engines
23
Amazon Relational Database Service User Guide
Supported DB engines
24
Amazon Relational Database Service User Guide
Supported DB engines
25
Amazon Relational Database Service User Guide
Supported DB engines
26
Amazon Relational Database Service User Guide
Supported DB engines
27
Amazon Relational Database Service User Guide
Supported DB engines
28
Amazon Relational Database Service User Guide
Supported DB engines
29
Amazon Relational Database Service User Guide
Supported DB engines
30
Amazon Relational Database Service User Guide
Supported DB engines
31
Amazon Relational Database Service User Guide
Supported DB engines
32
Amazon Relational Database Service User Guide
Supported DB engines
33
Amazon Relational Database Service User Guide
Supported DB engines
db.x2idn – memory-optimized instance classes powered by 3rd generation Intel Xeon Scalable processors
34
Amazon Relational Database Service User Guide
Supported DB engines
db.x2iedn – memory-optimized instance classes with local NVMe-based SSDs, powered by 3rd generation Intel
Xeon Scalable processors
35
Amazon Relational Database Service User Guide
Supported DB engines
36
Amazon Relational Database Service User Guide
Supported DB engines
37
Amazon Relational Database Service User Guide
Supported DB engines
db.x2iezn – memory-optimized instance classes powered by 2nd generation Intel Xeon Scalable processors
db.x2iezn.12xlarge No No No Enterprise No
Edition only
db.x2iezn.8xlarge No No No Enterprise No
Edition only
db.x2iezn.6xlarge No No No Enterprise No
Edition only
db.x2iezn.4xlarge No No No Enterprise No
Edition and
Standard
Edition 2
(SE2)
db.x2iezn.2xlarge No No No Enterprise No
Edition and
Standard
Edition 2
(SE2)
38
Amazon Relational Database Service User Guide
Supported DB engines
39
Amazon Relational Database Service User Guide
Supported DB engines
40
Amazon Relational Database Service User Guide
Supported DB engines
41
Amazon Relational Database Service User Guide
Supported DB engines
42
Amazon Relational Database Service User Guide
Supported DB engines
43
Amazon Relational Database Service User Guide
Supported DB engines
44
Amazon Relational Database Service User Guide
Supported DB engines
45
Amazon Relational Database Service User Guide
Supported DB engines
46
Amazon Relational Database Service User Guide
Supported DB engines
47
Amazon Relational Database Service User Guide
Supported DB engines
48
Amazon Relational Database Service User Guide
Supported DB engines
49
Amazon Relational Database Service User Guide
Supported DB engines
db.r6id – memory-optimized instance classes powered by 3rd generation Intel Xeon Scalable processors
50
Amazon Relational Database Service User Guide
Supported DB engines
51
Amazon Relational Database Service User Guide
Supported DB engines
52
Amazon Relational Database Service User Guide
Supported DB engines
53
Amazon Relational Database Service User Guide
Supported DB engines
54
Amazon Relational Database Service User Guide
Supported DB engines
55
Amazon Relational Database Service User Guide
Supported DB engines
db.r5b – memory-optimized instance classes preconfigured for high memory, storage, and I/O
db.r5b.8xlarge.tpc2.mem3x No No No Yes No
db.r5b.6xlarge.tpc2.mem4x No No No Yes No
db.r5b.4xlarge.tpc2.mem4x No No No Yes No
db.r5b.4xlarge.tpc2.mem3x No No No Yes No
db.r5b.4xlarge.tpc2.mem2x No No No Yes No
db.r5b.2xlarge.tpc2.mem8x No No No Yes No
db.r5b.2xlarge.tpc2.mem4x No No No Yes No
db.r5b.2xlarge.tpc1.mem2x No No No Yes No
db.r5b.xlarge.tpc2.mem4x No No No Yes No
db.r5b.xlarge.tpc2.mem2x No No No Yes No
db.r5b.large.tpc1.mem2x No No No Yes No
56
Amazon Relational Database Service User Guide
Supported DB engines
57
Amazon Relational Database Service User Guide
Supported DB engines
58
Amazon Relational Database Service User Guide
Supported DB engines
59
Amazon Relational Database Service User Guide
Supported DB engines
db.r5 – memory-optimized instance classes preconfigured for high memory, storage, and I/O
db.r5.12xlarge.tpc2.mem2x No No No Yes No
db.r5.8xlarge.tpc2.mem3x No No No Yes No
db.r5.6xlarge.tpc2.mem4x No No No Yes No
db.r5.4xlarge.tpc2.mem4x No No No Yes No
db.r5.4xlarge.tpc2.mem3x No No No Yes No
db.r5.4xlarge.tpc2.mem2x No No No Yes No
db.r5.2xlarge.tpc2.mem8x No No No Yes No
60
Amazon Relational Database Service User Guide
Supported DB engines
db.r5.2xlarge.tpc2.mem4x No No No Yes No
db.r5.2xlarge.tpc1.mem2x No No No Yes No
db.r5.xlarge.tpc2.mem4x No No No Yes No
db.r5.xlarge.tpc2.mem2x No No No Yes No
db.r5.large.tpc1.mem2x No No No Yes No
61
Amazon Relational Database Service User Guide
Supported DB engines
db.r4.16xlarge All MariaDB Yes All MySQL 8.0, Deprecated Lower than
10.6 versions, 5.7 PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions
db.r4.8xlarge All MariaDB Yes All MySQL 8.0, Deprecated Lower than
10.6 versions, 5.7 PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions
db.r4.4xlarge All MariaDB Yes All MySQL 8.0, Deprecated Lower than
10.6 versions, 5.7 PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions
62
Amazon Relational Database Service User Guide
Supported DB engines
db.r4.2xlarge All MariaDB Yes All MySQL 8.0, Deprecated Lower than
10.6 versions, 5.7 PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions
db.r4.xlarge All MariaDB Yes All MySQL 8.0, Deprecated Lower than
10.6 versions, 5.7 PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions
db.r4.large All MariaDB Yes All MySQL 8.0, Deprecated Lower than
10.6 versions, 5.7 PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions
63
Amazon Relational Database Service User Guide
Supported DB engines
64
Amazon Relational Database Service User Guide
Supported DB engines
65
Amazon Relational Database Service User Guide
Supported DB engines
66
Amazon Relational Database Service User Guide
Supported DB engines
67
Amazon Relational Database Service User Guide
Determining DB instance class support in AWS Regions
Contents
• Using the Amazon RDS pricing page to determine DB instance class support in AWS
Regions (p. 68)
• Using the AWS CLI to determine DB instance class support in AWS Regions (p. 69)
• Listing the DB instance classes that are supported by a specific DB engine version in an AWS
Region (p. 69)
• Listing the DB engine versions that support a specific DB instance class in an AWS
Region (p. 70)
To use the pricing page to determine the DB instance classes supported by each engine in a
Region
68
Amazon Relational Database Service User Guide
Determining DB instance class support in AWS Regions
2. Choose a DB engine.
3. On the pricing page for the DB engine, choose On-Demand DB Instances or Reserved DB Instances.
4. To see the DB instance classes available in an AWS Region, choose the AWS Region in Region.
Other choices might be available for some DB engines, such as Single-AZ Deployment or Multi-AZ
Deployment.
sqlserver-ex
sqlserver-web
oracle-se2
For information about AWS Region names, see AWS Regions (p. 111).
The following examples demonstrate how to determine DB instance class support in an AWS Region
using the describe-orderable-db-instance-options AWS CLI command.
Note
To limit the output, these examples show results only for the General Purpose SSD (gp2) storage
type. If necessary, you can change the storage type to General Purpose SSD (gp3), Provisioned
IOPS (io1), or magnetic (standard) in the commands.
Topics
• Listing the DB instance classes that are supported by a specific DB engine version in an AWS
Region (p. 69)
• Listing the DB engine versions that support a specific DB instance class in an AWS Region (p. 70)
69
Amazon Relational Database Service User Guide
Determining DB instance class support in AWS Regions
For Windows:
For example, the following command lists the supported DB instance classes for version 13.6 of the RDS
for PostgreSQL DB engine in US East (N. Virginia).
For Windows:
For Windows:
70
Amazon Relational Database Service User Guide
Changing your DB instance class
--region region
For example, the following command lists the DB engine versions of the RDS for PostgreSQL DB engine
that support the db.r5.large DB instance class in US East (N. Virginia).
For Windows:
Topics
• Overview of configuring the processor (p. 71)
• DB instance classes that support processor configuration (p. 72)
• Setting the CPU cores and threads per CPU core for a DB instance class (p. 80)
• Number of CPU cores – You can customize the number of CPU cores for the DB instance. You might do
this to potentially optimize the licensing costs of your software with a DB instance that has sufficient
amounts of RAM for memory-intensive workloads but fewer CPU cores.
71
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
• Threads per core – You can disable Intel Hyper-Threading Technology by specifying a single thread
per CPU core. You might do this for certain workloads, such as high-performance computing (HPC)
workloads.
You can control the number of CPU cores and threads for each core separately. You can set one or both
in a request. After a setting is associated with a DB instance, the setting persists until you change it.
The processor settings for a DB instance are associated with snapshots of the DB instance. When a
snapshot is restored, its restored DB instance uses the processor feature settings used when the snapshot
was taken.
If you modify the DB instance class for a DB instance with nondefault processor settings, either specify
default processor settings or explicitly specify processor settings at modification. This requirement
ensures that you are aware of the third-party licensing costs that might be incurred when you modify the
DB instance.
There is no additional or reduced charge for specifying processor features on an RDS for Oracle DB
instance. You're charged the same as for DB instances that are launched with default CPU configurations.
• You're configuring an RDS for Oracle DB instance. For information about the DB instance classes
supported by different Oracle Database editions, see RDS for Oracle instance classes (p. 1796).
• Your DB instance is using the Bring Your Own License (BYOL) licensing option of RDS for Oracle. For
more information about Oracle licensing options, see RDS for Oracle licensing options (p. 1793).
• Your DB instance doesn't belong to one of the db.r5 or db.r5b instance classes
that have predefined processor configurations. These instance classes have names
in the form db.r5.instance_size.tpcthreads_per_core.memratio or
db.r5b.instance_size.tpcthreads_per_core.memratio. For example, db.r5b.xlarge.tpc2.mem4x
is preconfigured with 2 threads per core (tpc2) and 4x as much memory as the standard db.r5b.xlarge
instance class. You can't configure the processor features of these optimized instance classes. For more
information, see Supported RDS for Oracle instance classes (p. 1797).
In the following table, you can find the DB instance classes that support setting a number of CPU cores
and CPU threads per core. You can also find the default value and the valid values for the number of CPU
cores and CPU threads per core for each DB instance class.
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.m6i.large 2 1 2 1 1, 2
db.m6i.xlarge 4 2 2 2 1, 2
db.m6i.2xlarge 8 4 2 2, 4 1, 2
db.m6i.4xlarge 16 8 2 2, 4, 6, 8 1, 2
db.m6i.4xlarge 16 8 2 2, 4, 6, 8 1, 2
72
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.m6i.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.m6i.12xlarge 48 24 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24
db.m6i.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.m6i.24xlarge 96 48 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32, 34,
36, 38, 40, 42,
44, 46, 48
db.m5.large 2 1 2 1 1, 2
db.m5.xlarge 4 2 2 2 1, 2
db.m5.2xlarge 8 4 2 2, 4 1, 2
db.m5.4xlarge 16 8 2 2, 4, 6, 8 1, 2
db.m5.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.m5.12xlarge 48 24 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24
db.m5.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
73
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.m5d.large 2 1 2 1 1, 2
db.m5d.xlarge 4 2 2 2 1, 2
db.m5d.2xlarge 8 4 2 2, 4 1, 2
db.m5d.4xlarge 16 8 2 2, 4, 6, 8 1, 2
db.m5d.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.m5d.12xlarge 48 24 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24
db.m5d.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.m4.10xlarge 40 20 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20
db.m4.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.r6i.large 2 1 2 1 1, 2
db.r6i.xlarge 4 2 2 1, 2 1, 2
db.r6i.2xlarge 8 4 2 2, 4 1, 2
db.r6i.4xlarge 16 8 2 2, 4, 6, 8 1, 2
74
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.r6i.4xlarge 16 8 2 2, 4, 6, 8 1, 2
db.r6i.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.r6i.12xlarge 48 24 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24
db.r6i.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.r6i.24xlarge 96 48 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32, 34,
36, 38, 40, 42,
44, 46, 48
db.r5.large 2 1 2 1 1, 2
db.r5.xlarge 4 2 2 2 1, 2
db.r5.2xlarge 8 4 2 2, 4 1, 2
db.r5.4xlarge 16 8 2 2, 4, 6, 8 1, 2
db.r5.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.r5.12xlarge 48 24 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24
db.r5.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
75
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.r5b.large 2 1 2 1 1, 2
db.r5b.xlarge 4 2 2 2 1, 2
db.r5b.2xlarge 8 4 2 2, 4 1, 2
db.r5b.4xlarge 16 8 2 2, 4, 6, 8 1, 2
db.r5b.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.r5b.12xlarge 48 24 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24
db.r5b.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.r5d.large 2 1 2 1 1, 2
db.r5d.xlarge 4 2 2 2 1, 2
db.r5d.2xlarge 8 4 2 2, 4 1, 2
db.r5d.4xlarge 16 8 2 2, 4, 6, 8 1, 2
db.r5d.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.r5d.12xlarge 48 24 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24
76
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.r5d.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.r4.large 2 1 2 1 1, 2
db.r4.xlarge 4 2 2 1, 2 1, 2
db.r4.2xlarge 8 4 2 1, 2, 3, 4 1, 2
db.r4.4xlarge 16 8 2 1, 2, 3, 4, 5, 6, 1, 2
7, 8
db.r4.8xlarge 32 16 2 1, 2, 3, 4, 5, 6, 1, 2
7, 8, 9, 10, 11,
12, 13, 14, 15,
16
db.r4.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.r3.large 2 1 2 1 1, 2
db.r3.xlarge 4 2 2 1, 2 1, 2
db.r3.2xlarge 8 4 2 1, 2, 3, 4 1, 2
db.r3.4xlarge 16 8 2 1, 2, 3, 4, 5, 6, 1, 2
7, 8
db.r3.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.x2idn.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
77
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.x2idn.24xlarge 96 48 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32, 34,
36, 38, 40, 42,
44, 46, 48
db.x2iedn.xlarge 4 2 2 1, 2 1, 2
db.x2iedn.2xlarge 8 4 2 2, 4 1, 2
db.x2iedn.4xlarge 16 8 2 2, 4, 6, 8 1, 2
db.x2iedn.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.x2iedn.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.x2iedn.24xlarge 96 48 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32, 34,
36, 38, 40, 42,
44, 46, 48
db.x2iezn.2xlarge 8 4 2 2, 4 1, 2
db.x2iezn.4xlarge 16 8 2 2, 4, 6, 8 1, 2
78
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.x2iezn.6xlarge 24 12 2 2, 4, 6, 8, 10, 1, 2
12
db.x2iezn.8xlarge 32 16 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16
db.x2iezn.12xlarge 48 24 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24
db.x1.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.x1e.xlarge 4 2 2 1, 2 1, 2
db.x1e.2xlarge 8 4 2 1, 2, 3, 4 1, 2
db.x1e.4xlarge 16 8 2 1, 2, 3, 4, 5, 6, 1, 2
7, 8
db.x1e.8xlarge 32 16 2 1, 2, 3, 4, 5, 6, 1, 2
7, 8, 9, 10, 11,
12, 13, 14, 15,
16
db.x1e.16xlarge 64 32 2 2, 4, 6, 8, 10, 1, 2
12, 14, 16, 18,
20, 22, 24, 26,
28, 30, 32
db.z1d.large 2 1 2 1 1, 2
db.z1d.xlarge 4 2 2 2 1, 2
db.z1d.2xlarge 8 4 2 2, 4 1, 2
db.z1d.3xlarge 12 6 2 2, 4, 6 1, 2
79
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
DB instance class Default vCPUs Default CPU Default Valid number Valid number
cores threads per of CPU cores of threads per
core core
db.z1d.6xlarge 24 12 2 2, 4, 6, 8, 10, 1, 2
12
Note
You can use AWS CloudTrail to monitor and audit changes to the process configuration of
Amazon RDS for Oracle DB instances. For more information about using CloudTrail, see
Monitoring Amazon RDS API calls in AWS CloudTrail (p. 940).
Setting the CPU cores and threads per CPU core for a DB
instance class
You can configure the number of CPU cores and threads per core for the DB instance class when you
perform the following operations:
Note
When you modify a DB instance to configure the number of CPU cores or threads per core, there
is a brief DB instance outage.
You can set the CPU cores and the threads per CPU core for a DB instance class using the AWS
Management Console, the AWS CLI, or the RDS API.
Console
When you are creating, modifying, or restoring a DB instance, you set the DB instance class in the
AWS Management Console. The Instance specifications section shows options for the processor. The
following image shows the processor features options.
80
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
81
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
Set the following options to the appropriate values for your DB instance class under Processor features:
• Core count – Set the number of CPU cores using this option. The value must be equal to or less than
the maximum number of CPU cores for the DB instance class.
• Threads per core – Specify 2 to enable multiple threads per core, or specify 1 to disable multiple
threads per core.
When you modify or restore a DB instance, you can also set the CPU cores and the threads per CPU core
to the defaults for the instance class.
When you view the details for a DB instance in the console, you can view the processor information for
its DB instance class on the Configuration tab. The following image shows a DB instance class with one
CPU core and multiple threads per core enabled.
For Oracle DB instances, the processor information only appears for Bring Your Own License (BYOL) DB
instances.
AWS CLI
You can set the processor features for a DB instance when you run one of the following AWS CLI
commands:
• create-db-instance
82
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
• modify-db-instance
• restore-db-instance-from-db-snapshot
• restore-db-instance-from-s3
• restore-db-instance-to-point-in-time
To configure the processor of a DB instance class for a DB instance by using the AWS CLI, include the --
processor-features option in the command. Specify the number of CPU cores with the coreCount
feature name, and specify whether multiple threads per core are enabled with the threadsPerCore
feature name.
Examples
• Setting the number of CPU cores for a DB instance (p. 83)
• Setting the number of CPU cores and disabling multiple threads for a DB instance (p. 83)
• Viewing the valid processor values for a DB instance class (p. 84)
• Returning to default processor settings for a DB instance (p. 85)
• Returning to the default number of CPU cores for a DB instance (p. 85)
• Returning to the default number of threads per core for a DB instance (p. 86)
Example
The following example modifies mydbinstance by setting the number of CPU cores to 4. The changes
are applied immediately by using --apply-immediately. If you want to apply the changes during the
next scheduled maintenance window, omit the --apply-immediately option.
For Windows:
Setting the number of CPU cores and disabling multiple threads for a DB instance
Example
The following example modifies mydbinstance by setting the number of CPU cores to 4 and disabling
multiple threads per core. The changes are applied immediately by using --apply-immediately. If
you want to apply the changes during the next scheduled maintenance window, omit the --apply-
immediately option.
83
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
For Windows:
Example
You can view the valid processor values for a particular DB instance class by running the describe-
orderable-db-instance-options command and specifying the instance class for the --db-instance-
class option. For example, the output for the following command shows the processor options for the
db.r3.large instance class.
{
"SupportsIops": true,
"MaxIopsPerGib": 50.0,
"LicenseModel": "bring-your-own-license",
"DBInstanceClass": "db.r3.large",
"SupportsIAMDatabaseAuthentication": false,
"MinStorageSize": 100,
"AvailabilityZones": [
{
"Name": "us-west-2a"
},
{
"Name": "us-west-2b"
},
{
"Name": "us-west-2c"
}
],
"EngineVersion": "12.1.0.2.v2",
"MaxStorageSize": 32768,
"MinIopsPerGib": 1.0,
"MaxIopsPerDbInstance": 40000,
"ReadReplicaCapable": false,
"AvailableProcessorFeatures": [
{
"Name": "coreCount",
"DefaultValue": "1",
"AllowedValues": "1"
},
{
"Name": "threadsPerCore",
"DefaultValue": "2",
"AllowedValues": "1,2"
}
84
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
],
"SupportsEnhancedMonitoring": true,
"SupportsPerformanceInsights": false,
"MinIopsPerDbInstance": 1000,
"StorageType": "io1",
"Vpc": false,
"SupportsStorageEncryption": true,
"Engine": "oracle-ee",
"MultiAZCapable": true
}
In addition, you can run the following commands for DB instance class processor information:
In the output of the preceding commands, the values for the processor features are not null only if the
following conditions are met:
If the preceding conditions aren't met, you can get the instance type using describe-db-instances. You
can get the processor information for this instance type by running the EC2 operation describe-instance-
types.
Example
The following example modifies mydbinstance by returning its DB instance class to the default
processor values for it. The changes are applied immediately by using --apply-immediately. If
you want to apply the changes during the next scheduled maintenance window, omit the --apply-
immediately option.
For Windows:
Example
The following example modifies mydbinstance by returning its DB instance class to the default number
of CPU cores for it. The threads per core setting isn't changed. The changes are applied immediately
85
Amazon Relational Database Service User Guide
Configuring the processor for RDS for Oracle
by using --apply-immediately. If you want to apply the changes during the next scheduled
maintenance window, omit the --apply-immediately option.
For Windows:
Example
The following example modifies mydbinstance by returning its DB instance class to the default number
of threads per core for it. The number of CPU cores setting isn't changed. The changes are applied
immediately by using --apply-immediately. If you want to apply the changes during the next
scheduled maintenance window, omit the --apply-immediately option.
For Windows:
RDS API
You can set the processor features for a DB instance when you call one of the following Amazon RDS API
operations:
• CreateDBInstance
• ModifyDBInstance
• RestoreDBInstanceFromDBSnapshot
• RestoreDBInstanceFromS3
• RestoreDBInstanceToPointInTime
To configure the processor features of a DB instance class for a DB instance by using the Amazon RDS
API, include the ProcessFeatures parameter in the call.
86
Amazon Relational Database Service User Guide
Hardware specifications
Specify the number of CPU cores with the coreCount feature name, and specify whether multiple
threads per core are enabled with the threadsPerCore feature name.
You can view the valid processor values for a particular DB instance class by running the
DescribeOrderableDBInstanceOptions operation and specifying the instance class for the
DBInstanceClass parameter. You can also use the following operations:
In the output of the preceding operations, the values for the processor features are not null only if the
following conditions are met:
If the preceding conditions aren't met, you can get the instance type using DescribeDBInstances.
You can get the processor information for this instance type by running the EC2 operation
DescribeInstanceTypes.
vCPU
The number of virtual central processing units (CPUs). A virtual CPU is a unit of capacity that you can
use to compare DB instance classes. Instead of purchasing or leasing a particular processor to use for
several months or years, you are renting capacity by the hour. Our goal is to make a consistent and
specific amount of CPU capacity available, within the limits of the actual underlying hardware.
ECU
The relative measure of the integer processing power of an Amazon EC2 instance. To make it easy
for developers to compare CPU capacity between different instance classes, we have defined an
Amazon EC2 Compute Unit. The amount of CPU that is allocated to a particular instance is expressed
in terms of these EC2 Compute Units. One ECU currently provides CPU capacity equivalent to a 1.0–
1.2 GHz 2007 Opteron or 2007 Xeon processor.
Memory (GiB)
The RAM, in gibibytes, allocated to the DB instance. There is often a consistent ratio between
memory and vCPU. As an example, take the db.r4 instance class, which has a memory to vCPU ratio
similar to the db.r5 instance class. However, for most use cases the db.r5 instance class provides
better, more consistent performance than the db.r4 instance class.
EBS-optimized
The DB instance uses an optimized configuration stack and provides additional, dedicated capacity
for I/O. This optimization provides the best performance by minimizing contention between I/O and
other traffic from your instance. For more information about Amazon EBS–optimized instances, see
Amazon EBS–Optimized instances in the Amazon EC2 User Guide for Linux Instances.
EBS-optimized instances have a baseline and maximum IOPS rate. The maximum IOPS rate is
enforced at the DB instance level. A set of EBS volumes that combine to have an IOPS rate that is
higher than the maximum can't exceed the instance-level threshold. For example, if the maximum
87
Amazon Relational Database Service User Guide
Hardware specifications
IOPS for a particular DB instance class is 40,000, and you attach four 64,000 IOPS EBS volumes, the
maximum IOPS is 40,000 rather than 256,000. For the IOPS maximum specific to each EC2 instance
type, see Supported instance types in the Amazon EC2 User Guide for Linux Instances.
Max. EBS bandwidth (Mbps)
The maximum EBS bandwidth in megabits per second. Divide by 8 to get the expected throughput in
megabytes per second.
Important
General Purpose SSD (gp2) volumes for Amazon RDS DB instances have a throughput limit
of 250 MiB/s in most cases. However, the throughput limit can vary depending on volume
size. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide for
Linux Instances.
Network bandwidth
In the following table, you can find hardware details about the Amazon RDS DB instance classes.
For information about Amazon RDS DB engine support for each DB instance class, see Supported DB
engines for DB instance classes (p. 14).
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
88
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
89
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
90
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
91
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
92
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
93
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
94
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
95
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
96
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
db.r5b – Oracle memory-optimized instance classes preconfigured for high memory, storage, and I/O
97
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
db.r5 – Oracle memory-optimized instance classes preconfigured for high memory, storage, and I/O
98
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
99
Amazon Relational Database Service User Guide
Hardware specifications
Instance class vCPU ECU Memory Instance storage Max. EBS Network
(GiB) (GiB) bandwidth bandwidth
(Mbps) (Gbps)
* These DB instance classes can support maximum performance for 30 minutes at least once every 24
hours. For more information on baseline performance of the underlying EC2 instance types, see Amazon
EBS-optimized instances in the Amazon EC2 User Guide for Linux Instances.
** The r3.8xlarge DB instance class doesn't have dedicated EBS bandwidth and therefore doesn't offer
EBS optimization. For this instance class, network traffic and Amazon EBS traffic share the same 10-
gigabit network interface.
100
Amazon Relational Database Service User Guide
DB instance storage
In some cases, your database workload might not be able to achieve 100 percent of the IOPS that you
have provisioned. For more information, see Factors that affect storage performance (p. 108).
For more information about instance storage pricing, see Amazon RDS pricing.
• General Purpose SSD – General Purpose SSD volumes offer cost-effective storage that is ideal for a
broad range of workloads running on medium-sized DB instances. General Purpose storage is best
suited for development and testing environments.
For more information about General Purpose SSD storage, including the storage size ranges, see
General Purpose SSD storage (p. 102).
• Provisioned IOPS SSD – Provisioned IOPS storage is designed to meet the needs of I/O-intensive
workloads, particularly database workloads, that require low I/O latency and consistent I/O
throughput. Provisioned IOPS storage is best suited for production environments.
For more information about Provisioned IOPS storage, including the storage size ranges, see
Provisioned IOPS SSD storage (p. 104).
• Magnetic – Amazon RDS also supports magnetic storage for backward compatibility. We recommend
that you use General Purpose SSD or Provisioned IOPS SSD for any new storage needs. The maximum
amount of storage allowed for DB instances on magnetic storage is less than that of the other storage
types. For more information, see Magnetic storage (p. 107).
When you select General Purpose SSD or Provisioned IOPS SSD, depending on the engine selected and
the amount of storage requested, Amazon RDS automatically stripes across multiple volumes to enhance
performance, as shown in the following table.
101
Amazon Relational Database Service User Guide
General Purpose SSD storage
When you modify a General Purpose SSD or Provisioned IOPS SSD volume, it goes through a sequence of
states. While the volume is in the optimizing state, your volume performance is in between the source
and target configuration specifications. Transitional volume performance will be no less than the lowest
of the two specifications. For more information on volume modifications, see Monitor the progress of
volume modifications in the Amazon EC2 User Guide.
Important
When you modify an instance’s storage so that it goes from one volume to four volumes, or
when you modify an instance using magnetic storage, Amazon RDS does not use the Elastic
Volumes feature. Instead, Amazon RDS provisions new volumes and transparently moves the
data from the old volume to the new volumes. This operation consumes a significant amount of
IOPS and throughput of both the old and new volumes. Depending on the size of the volume
and the amount of database workload present during the modification, this operation can
consume a high amount of IOPS, significantly increase IO latency, and take several hours to
complete, while the RDS instance remains in the Modifying state.
Amazon RDS offers two types of General Purpose SSD storage: gp2 storage (p. 102) and gp3
storage (p. 103).
gp2 storage
When your applications don't need high storage performance, you can use General Purpose SSD gp2
storage. Baseline I/O performance for gp2 storage is 3 IOPS for each GiB, with a minimum of 100
IOPS. This relationship means that larger volumes have better performance. For example, baseline
performance for one 100-GiB volume is 300 IOPS. Baseline performance for one 1,000 GiB volume is
3,000 IOPS. Maximum baseline performance for one gp2 volume (5334 GiB and greater) is 16,000 IOPS.
Individual gp2 volumes below 1,000 GiB in size also have the ability to burst to 3,000 IOPS for extended
periods of time. Volume I/O credit balance determines burst performance. For more information about
volume I/O credits, see I/O credits and burst performance in the Amazon EC2 User Guide. For a more
detailed description of how baseline performance and I/O credit balance affect performance, see the
post Understanding burst vs. baseline performance with Amazon RDS and gp2 on the AWS Database
Blog.
Many workloads never deplete the burst balance. However, some workloads can exhaust the 3,000
IOPS burst storage credit balance, so you should plan your storage capacity to meet the needs of your
workloads.
For gp2 volumes larger than 1,000 GiB, the baseline performance is greater than the burst performance.
For such volumes, burst is irrelevant because the baseline performance is better than the 3,000 IOPS
burst performance. However, for DB instances of certain engines and sizes, storage is striped across four
102
Amazon Relational Database Service User Guide
General Purpose SSD storage
volumes providing four times the baseline throughput, and four times the burst IOPS of a single volume.
Storage performance for gp2 volumes on Amazon RDS DB engines, including the threshold, is shown in
the following table.
DB engine RDS Storage size Range of Baseline Range of Baseline Burst IOPS
IOPS Throughput
MariaDB, MySQL, Between 400 and 1,200-4,005 IOPS 500-1,000 MiB/s 12,000
and PostgreSQL 1,335 GiB
SQL Server Between 334 and 1,002-2,997 IOPS 250 MiB/s 3,000
999 GiB
* The baseline performance of the volume exceeds the maximum burst performance.
gp3 storage
By using General Purpose SSD gp3 storage volumes, you can customize storage performance
independently of storage capacity. Storage performance is the combination of I/O operations per second
(IOPS) and how fast the storage volume can perform reads and writes (storage throughput). On gp3
storage volumes, Amazon RDS provides a baseline storage performance of 3000 IOPS and 125 MiB/s.
For every RDS DB engine except RDS for SQL Server, when the storage size for gp3 volumes reaches a
certain threshold, the baseline storage performance increases to 12,000 IOPS and 500 MiB/s. This is
because of volume striping, where the storage uses four volumes instead of one. RDS for SQL Server
doesn't support volume striping, and therefore doesn't have a threshold value.
Note
General Purpose SSD gp3 storage is supported on Single-AZ and Multi-AZ DB instances, but
isn't supported on Multi-AZ DB clusters. For more information, see Configuring and managing a
Multi-AZ deployment (p. 492) and Multi-AZ DB cluster deployments (p. 499).
103
Amazon Relational Database Service User Guide
Provisioned IOPS storage
Storage performance for gp3 volumes on Amazon RDS DB engines, including the threshold, is shown in
the following table.
MariaDB, MySQL, Less than 400 GiB 3,000 IOPS/125 N/A N/A
and PostgreSQL MiB/s
MariaDB, MySQL, 400 GiB and 12,000 IOPS/500 12,000–64,000 500–4,000 MiB/s
and PostgreSQL higher MiB/s IOPS
For every DB engine except RDS for SQL Server, you can provision additional IOPS and storage
throughput when storage size is at or above the threshold value. For RDS for SQL Server, you can
provision additional IOPS and storage throughput for any available storage size. For all DB engines, you
pay for only the additional provisioned storage performance. For more information, see Amazon RDS
pricing.
Although the added Provisioned IOPS and storage throughput aren't dependent on the storage size, they
are related to each other. When you raise the IOPS above 32,000 for MariaDB and MySQL, the storage
throughput value automatically increases from 500 MiB/s. For example, when you set the IOPS to 40,000
on RDS for MySQL, the storage throughput must be at least 625 MiB/s. The automatic increase doesn't
happen for Oracle, PostgreSQL, and SQL Server DB instances.
Storage performance values for gp3 volumes on RDS have the following constraints:
• The maximum ratio of storage throughput to IOPS is 0.25 for all supported DB engines.
• The minimum ratio of IOPS to allocated storage (in GiB) is 0.5 on RDS for SQL Server. There is no
minimum ratio for the other supported DB engines.
• The maximum ratio of IOPS to allocated storage is 500 for all supported DB engines.
• If you're using storage autoscaling, the same ratios between IOPS and maximum storage threshold (in
GiB) also apply.
For more information on storage autoscaling, see Managing capacity automatically with Amazon RDS
storage autoscaling (p. 480).
104
Amazon Relational Database Service User Guide
Provisioned IOPS storage
When you create a DB instance, you specify the IOPS rate and the size of the volume. Amazon RDS
provides that IOPS rate for the DB instance until you change it.
io1 storage
For I/O-intensive workloads, you can use Provisioned IOPS SSD io1 storage and achieve up to 256,000
I/O operations per second (IOPS). The throughput of io1 volumes varies based on the amount of IOPS
provisioned per volume and on the size of the IO operations being executed. For more information about
throughput of io1 volumes, see Provisioned IOPS volumes in the Amazon EC2 User Guide.
The following table shows the range of Provisioned IOPS and and maximum throughput for each
database engine and storage size range.
MariaDB, MySQL, and Between 100 and 1,000–19,950 IOPS 500 MiB/s
PostgreSQL 399 GiB
MariaDB, MySQL, and Between 400 and 1,000–256,000 IOPS 4,000 MiB/s
PostgreSQL 65,536 GiB
Note
For SQL Server, the maximum 64,000 IOPS is guaranteed only on Nitro-based instances that are
on the m5*, m6i, r5*, r6i, and z1d instance types. Other instance types guarantee performance
up to 32,000 IOPS.
For Oracle, you can provision the maximum 256,000 IOPS only on the r5b instance type.
The IOPS and storage size ranges have the following constraints:
• The ratio of IOPS to allocated storage (in GiB) must be from 1–50 on RDS for SQL Server, and 0.5–50
on other RDS DB engines.
• If you're using storage autoscaling, the same ratios between IOPS and maximum storage threshold (in
GiB) also apply.
For more information on storage autoscaling, see Managing capacity automatically with Amazon RDS
storage autoscaling (p. 480).
You can also use Provisioned IOPS SSD storage with read replicas for MySQL, MariaDB or PostgreSQL.
The type of storage for a read replica is independent of that on the primary DB instance. For example,
105
Amazon Relational Database Service User Guide
Comparing SSD storage types
you might use General Purpose SSD for read replicas with a primary DB instance that uses Provisioned
IOPS SSD storage to reduce costs. However, your read replica's performance in this case might differ
from that of a configuration where both the primary DB instance and the read replicas use Provisioned
IOPS SSD storage.
Provisioned IOPS SSD storage provides a way to reserve I/O capacity by specifying IOPS. However, as
with any other system capacity attribute, its maximum throughput under load is constrained by the
resource that is consumed first. That resource might be network bandwidth, CPU, memory, or database
internal resources.
For more information about getting the most out of your Provisioned IOPS volumes, see Amazon EBS
volume performance.
Characteristic Provisioned IOPS (io1) General Purpose (gp3) General Purpose (gp2)
106
Amazon Relational Database Service User Guide
Magnetic storage
Characteristic Provisioned IOPS (io1) General Purpose (gp3) General Purpose (gp2)
Volume size 100 GiB–64 TiB (16 TiB 20 GiB–64 TiB (16 TiB 20 GiB–64 TiB (16 TiB
on RDS for SQL Server) on RDS for SQL Server) on RDS for SQL Server)
Maximum IOPS 256,000 (64,000 on 64,000 (16,000 on RDS 64,000 (16,000 on RDS
RDS for SQL Server) for SQL Server) for SQL Server)
Note
You can't
provision IOPS
directly on gp2
storage. IOPS
varies with
the allocated
storage size.
Maximum throughput Scales based on Provision additional 1000 MB/s (250 MB/s
Provisioned IOPS up to throughput up to 4,000 on RDS for SQL Server)
4,000 MB/s MB/s (1000 MB/s on
RDS for SQL Server
Magnetic storage
Amazon RDS also supports magnetic storage for backward compatibility. We recommend that you
use General Purpose SSD or Provisioned IOPS SSD for any new storage needs. The following are some
limitations for magnetic storage:
• Doesn't allow you to scale storage when using the SQL Server database engine.
• Doesn't support storage autoscaling.
• Doesn't support elastic volumes.
• Limited to a maximum size of 3 TiB.
• Limited to a maximum of 1,000 IOPS.
The following metrics are useful for monitoring storage for your DB instance:
• IOPS – The number of I/O operations completed each second. This metric is reported as the average
IOPS for a given time interval. Amazon RDS reports read and write IOPS separately on 1-minute
intervals. Total IOPS is the sum of the read and write IOPS. Typical values for IOPS range from zero to
tens of thousands per second.
• Latency – The elapsed time between the submission of an I/O request and its completion. This metric
is reported as the average latency for a given time interval. Amazon RDS reports read and write
latency separately at 1-minute intervals. Typical values for latency are in milliseconds (ms).
107
Amazon Relational Database Service User Guide
Factors that affect storage performance
• Throughput – The number of bytes each second that are transferred to or from disk. This metric is
reported as the average throughput for a given time interval. Amazon RDS reports read and write
throughput separately on 1-minute intervals using units of megabytes per second (MB/s). Typical
values for throughput range from zero to the I/O channel's maximum bandwidth.
• Queue Depth – The number of I/O requests in the queue waiting to be serviced. These are I/O
requests that have been submitted by the application but have not been sent to the device because
the device is busy servicing other I/O requests. Time spent waiting in the queue is a component of
latency and service time (not available as a metric). This metric is reported as the average queue depth
for a given time interval. Amazon RDS reports queue depth in 1-minute intervals. Typical values for
queue depth range from zero to several hundred.
Measured IOPS values are independent of the size of the individual I/O operation. This means that when
you measure I/O performance, make sure to look at the throughput of the instance, not simply the
number of I/O operations.
System activities
The following system-related activities consume I/O capacity and might reduce DB instance performance
while in progress:
Database workload
In some cases, your database or application design results in concurrency issues, locking, or other forms
of database contention. In these cases, you might not be able to use all the provisioned bandwidth
directly. In addition, you might encounter the following workload-related situations:
In some cases, there isn't a system resource that is at or near a limit, and adding threads doesn't increase
the database transaction rate. In such cases, the bottleneck is most likely contention in the database.
The most common forms are row lock and index page lock contention, but there are many other
possibilities. If this is your situation, seek the advice of a database performance tuning expert.
DB instance class
To get the most performance out of your Amazon RDS DB instance, choose a current generation instance
type with enough bandwidth to support your storage type. For example, you can choose Amazon EBS–
optimized instances and instances with 10-gigabit network connectivity.
Important
Depending on the instance class you're using, you might see lower IOPS performance than
the maximum that you can provision with RDS. For specific information on IOPS performance
for DB instance classes, see Amazon EBS–optimized instances in the Amazon EC2 User Guide.
108
Amazon Relational Database Service User Guide
Factors that affect storage performance
We recommend that you determine the maximum IOPS for the instance class before setting a
Provisioned IOPS value for your DB instance.
We encourage you to use the latest generation of instances to get the best performance. Previous
generation DB instances can also have lower maximum storage.
Some older 32-bit file systems might have lower storage capacities. To determine the storage capacity of
your DB instance, you can use the describe-valid-db-instance-modifications AWS CLI command.
The following list shows the maximum storage that most DB instance classes can scale to for each
database engine:
• MariaDB – 64 TiB
• Microsoft SQL Server – 16 TiB
• MySQL – 64 TiB
• Oracle – 64 TiB
• PostgreSQL – 64 TiB
The following table shows some exceptions for maximum storage (in TiB). All RDS for Microsoft SQL
Server DB instances have a maximum storage of 16 TiB, so there are no entries for SQL Server.
db.t4g.medium 16 16 N/A 32
db.t4g.small 16 16 N/A 16
db.t4g.micro 6 6 N/A 6
db.t3.medium 16 16 32 32
db.t3.small 16 16 32 16
db.t3.micro 6 6 32 6
db.t2.medium 32 32 N/A 32
db.t2.small 16 16 N/A 16
db.t2.micro 6 6 N/A 6
For more details about all instance classes supported, see Previous generation DB instances.
109
Amazon Relational Database Service User Guide
Regions, Availability Zones, and Local Zones
By using Local Zones, you can place resources, such as compute and storage, in multiple locations closer
to your users. Amazon RDS enables you to place resources, such as DB instances, and data in multiple
locations. Resources aren't replicated across AWS Regions unless you do so specifically.
Amazon operates state-of-the-art, highly-available data centers. Although rare, failures can occur that
affect the availability of DB instances that are in the same location. If you host all your DB instances in
one location that is affected by such a failure, none of your DB instances will be available.
It is important to remember that each AWS Region is completely independent. Any Amazon RDS activity
you initiate (for example, creating database instances or listing available database instances) runs only in
your current default AWS Region. The default AWS Region can be changed in the console, or by setting
the AWS_DEFAULT_REGION environment variable. Or it can be overridden by using the --region
parameter with the AWS Command Line Interface (AWS CLI). For more information, see Configuring the
AWS Command Line Interface, specifically the sections about environment variables and command line
options.
Amazon RDS supports special AWS Regions called AWS GovCloud (US). These are designed to allow
US government agencies and customers to move more sensitive workloads into the cloud. The AWS
GovCloud (US) Regions address the US government's specific regulatory and compliance requirements.
For more information, see What is AWS GovCloud (US)?
To create or work with an Amazon RDS DB instance in a specific AWS Region, use the corresponding
regional service endpoint.
110
Amazon Relational Database Service User Guide
AWS Regions
AWS Regions
Each AWS Region is designed to be isolated from the other AWS Regions. This design achieves the
greatest possible fault tolerance and stability.
When you view your resources, you see only the resources that are tied to the AWS Region that you
specified. This is because AWS Regions are isolated from each other, and we don't automatically replicate
resources across AWS Regions.
Region availability
The following table shows the AWS Regions where Amazon RDS is currently available and the endpoint
for each Region.
rds.us-east-2.api.aws HTTPS
rds-fips.us-east-2.amazonaws.com HTTPS
rds-fips.us-east-1.amazonaws.com HTTPS
rds.us-east-1.api.aws HTTPS
rds-fips.us-west-1.amazonaws.com HTTPS
rds-fips.us-west-1.api.aws HTTPS
rds.us-west-2.api.aws HTTPS
rds-fips.us-west-2.api.aws HTTPS
111
Amazon Relational Database Service User Guide
AWS Regions
rds-fips.ca-central-1.api.aws HTTPS
rds-fips.ca-central-1.amazonaws.com HTTPS
112
Amazon Relational Database Service User Guide
Availability Zones
If you do not explicitly specify an endpoint, the US West (Oregon) endpoint is the default.
When you work with a DB instance using the AWS CLI or API operations, make sure that you specify its
regional endpoint.
Availability Zones
When you create a DB instance, you can choose an Availability Zone or have Amazon RDS choose one for
you randomly. An Availability Zone is represented by an AWS Region code followed by a letter identifier
(for example, us-east-1a).
113
Amazon Relational Database Service User Guide
Local Zones
Use the describe-availability-zones Amazon EC2 command as follows to describe the Availability Zones
within the specified Region that are enabled for your account.
For example, to describe the Availability Zones within the US East (N. Virginia) Region (us-east-1) that are
enabled for your account, run the following command:
You can't choose the Availability Zones for the primary and secondary DB instances in a Multi-AZ DB
deployment. Amazon RDS chooses them for you randomly. For more information about Multi-AZ
deployments, see Configuring and managing a Multi-AZ deployment (p. 492).
Note
Random selection of Availability Zones by RDS doesn't guarantee an even distribution of DB
instances among Availability Zones within a single account or DB subnet group. You can request
a specific AZ when you create or modify a Single-AZ instance, and you can use more-specific DB
subnet groups for Multi-AZ instances. For more information, see Creating an Amazon RDS DB
instance (p. 300) and Modifying an Amazon RDS DB instance (p. 401).
Local Zones
A Local Zone is an extension of an AWS Region that is geographically close to your users. You can extend
any VPC from the parent AWS Region into Local Zones. To do so, create a new subnet and assign it to the
AWS Local Zone. When you create a subnet in a Local Zone, your VPC is extended to that Local Zone. The
subnet in the Local Zone operates the same as other subnets in your VPC.
When you create a DB instance, you can choose a subnet in a Local Zone. Local Zones have their own
connections to the internet and support AWS Direct Connect. Thus, resources created in a Local Zone can
serve local users with very low-latency communications. For more information, see AWS Local Zones.
A Local Zone is represented by an AWS Region code followed by an identifier that indicates the location,
for example us-west-2-lax-1a.
Note
A Local Zone can't be included in a Multi-AZ deployment.
For more information, see Enabling Local Zones in the Amazon EC2 User Guide for Linux Instances.
2. Create a subnet in the Local Zone.
For more information, see Creating a subnet in your VPC in the Amazon VPC User Guide.
3. Create a DB subnet group in the Local Zone.
When you create a DB subnet group, choose the Availability Zone group for the Local Zone.
For more information, see Creating an Amazon RDS DB instance (p. 300).
Important
Currently, the only AWS Local Zone where Amazon RDS is available is Los Angeles in the US
West (Oregon) Region.
114
Amazon Relational Database Service User Guide
Local Zones
115
Amazon Relational Database Service User Guide
Supported Amazon RDS features by Region and engine
Amazon RDS features are different from engine-native features and options. For more information on
engine-native features and options, see Engine-native features. (p. 162)
Topics
• Table conventions (p. 116)
• Feature quick reference (p. 116)
• Blue/Green Deployments (p. 118)
• Cross-Region automated backups (p. 118)
• Cross-Region read replicas (p. 119)
• Database activity streams (p. 121)
• Dual-stack mode (p. 125)
• Export snapshots to S3 (p. 133)
• IAM database authentication (p. 138)
• Kerberos authentication (p. 141)
• Multi-AZ DB clusters (p. 147)
• Performance Insights (p. 150)
• RDS Custom (p. 151)
• Amazon RDS Proxy (p. 155)
• Secrets Manager integration (p. 161)
• Engine-native features (p. 162)
Table conventions
The tables in the feature sections use these patterns to specify version numbers and level of availability:
116
Amazon Relational Database Service User Guide
Feature quick reference
Feature RDS for MariaDB RDS for MySQL RDS for Oracle RDS for RDS for SQL
PostgreSQL Server
Cross- – – Available (p. 119) Available (p. 119) Available (p. 119)
Region
automated
backups
Cross- Available (p. 119) Available (p. 119) Available (p. 120) Available (p. 120) Available (p. 120)
Region
read
replicas
Dual- Available (p. 125) Available (p. 127) Available (p. 128) Available (p. 129) Available (p. 131)
stack
mode
Export Available (p. 133) Available (p. 135) – Available (p. 136) –
Snapshot
to
Amazon
S3
AWS Available (p. 138) Available (p. 140) – Available (p. 140) –
Identity
and
Access
Management
(IAM)
database
authentication
Kerberos – Available (p. 141) Available (p. 142) Available (p. 143) Available (p. 145)
authentication
Performance
Available (p. 150) Available (p. 150) Available (p. 150) Available (p. 150) Available (p. 150)
Insights
RDS Available (p. 155) Available (p. 157) – Available (p. 158) Available (p. 160)
Proxy
Secrets Available (p. 161) Available (p. 161) Available (p. 161) Available (p. 161) Available (p. 161)
Manager
integration
117
Amazon Relational Database Service User Guide
Blue/Green Deployments
Blue/Green Deployments
A blue/green deployment copies a production database environment in a separate, synchronized
staging environment. By using Amazon RDS Blue/Green Deployments, you can make changes to the
database in the staging environment without affecting the production environment. For example, you
can upgrade the major or minor DB engine version, change database parameters, or make schema
changes in the staging environment. When you are ready, you can promote the staging environment to
be the new production database environment. For more information, see Using Amazon RDS Blue/Green
Deployments for database updates (p. 566).
The Blue/Green Deployments feature isn't supported with the following engines:
The Blue/Green Deployments feature is supported in all AWS Regions except Israel (Tel Aviv).
For more detailed information on limitations for source and destination backup Regions, see Replicating
automated backups to another AWS Region (p. 602).
Topics
• Backup replication with RDS for MariaDB (p. 119)
• Backup replication with RDS for MySQL (p. 119)
• Backup replication with RDS for Oracle (p. 119)
• Backup replication with RDS for PostgreSQL (p. 119)
118
Amazon Relational Database Service User Guide
Cross-Region read replicas
Topics
• Cross-Region read replicas with RDS for MariaDB (p. 119)
• Cross-Region read replicas with RDS for MySQL (p. 119)
• Cross-Region read replicas with RDS for Oracle (p. 120)
• Cross-Region read replicas with RDS for PostgreSQL (p. 120)
• Cross-Region read replicas with RDS for SQL Server (p. 120)
119
Amazon Relational Database Service User Guide
Cross-Region read replicas
• For RDS for Oracle 21c, cross-Region read replicas aren't available.
• For RDS for Oracle 19c, cross-Region read replicas are available for instances of Oracle Database 19c
that aren't container database (CBD) instances.
• For RDS for Oracle 12c, cross-Region read replicas are available for Oracle Enterprise Edition (EE) of
Oracle Database 12c Release 1 (12.1) using 12.1.0.2.v10 and higher 12c releases.
For more information on additional requirements for cross-Region read replicas with RDS for Oracle, see
Requirements and considerations for RDS for Oracle replicas (p. 1974).
Cross-Region read replicas with RDS for SQL Server are available for the following versions using
Microsoft SQL Server Enterprise Edition:
120
Amazon Relational Database Service User Guide
Database activity streams
Topics
• Database activity streams with RDS for Oracle (p. 121)
• Database activity streams with RDS for SQL Server (p. 124)
For more information on additional requirements for database activity streams with RDS for Oracle, see
Overview of Database Activity Streams (p. 944).
121
Amazon Relational Database Service User Guide
Database activity streams
China (Beijing) – –
China (Ningxia) – –
122
Amazon Relational Database Service User Guide
Database activity streams
Europe (Zurich) – –
123
Amazon Relational Database Service User Guide
Database activity streams
For more information on additional requirements for database activity streams with RDS for SQL Server,
see Overview of Database Activity Streams (p. 944).
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
US East (Ohio) All available versions All available versions All available versions –
US East (N. Virginia) All available versions All available versions All available versions –
US West (N. All available versions All available versions All available versions –
California)
US West (Oregon) All available versions All available versions All available versions –
Africa (Cape Town) All available versions All available versions All available versions –
Asia Pacific (Hong All available versions All available versions All available versions –
Kong)
Asia Pacific All available versions All available versions All available versions –
(Hyderabad)
Asia Pacific (Jakarta) All available versions All available versions All available versions –
Asia Pacific – – – –
(Melbourne)
Asia Pacific (Mumbai) All available versions All available versions All available versions –
Asia Pacific (Osaka) All available versions All available versions All available versions –
Asia Pacific (Seoul) All available versions All available versions All available versions –
Asia Pacific All available versions All available versions All available versions –
(Singapore)
Asia Pacific (Sydney) All available versions All available versions All available versions –
Asia Pacific (Tokyo) All available versions All available versions All available versions –
Canada (Central) All available versions All available versions All available versions –
China (Beijing) – – – –
China (Ningxia) – – – –
Europe (Frankfurt) All available versions All available versions All available versions –
Europe (Ireland) All available versions All available versions All available versions –
Europe (London) All available versions All available versions All available versions –
Europe (Milan) All available versions All available versions All available versions –
Europe (Paris) All available versions All available versions All available versions –
124
Amazon Relational Database Service User Guide
Dual-stack mode
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
Europe (Spain) All available versions All available versions All available versions –
Europe (Stockholm) All available versions All available versions All available versions –
Europe (Zurich) – – – –
Middle East (Bahrain) All available versions All available versions All available versions –
Middle East (UAE) All available versions All available versions All available versions –
South America (São All available versions All available versions All available versions –
Paulo)
Dual-stack mode
By using dual-stack mode in RDS, resources can communicate with a DB instance over Internet Protocol
version 4 (IPv4), Internet Protocol version 6 (IPv6), or both. For more information, see Dual-stack
mode (p. 2691).
Topics
• Dual-stack mode with RDS for MariaDB (p. 125)
• Dual-stack mode with RDS for MySQL (p. 127)
• Dual-stack mode with RDS for Oracle (p. 128)
• Dual-stack mode with RDS for PostgreSQL (p. 129)
• Dual-stack mode with RDS for SQL Server (p. 131)
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
US East (Ohio) All available All available All available All available All available
versions versions versions versions versions
US East (N. All available All available All available All available All available
Virginia) versions versions versions versions versions
US West (N. All available All available All available All available All available
California) versions versions versions versions versions
US West All available All available All available All available All available
(Oregon) versions versions versions versions versions
125
Amazon Relational Database Service User Guide
Dual-stack mode
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
Africa (Cape All available All available All available All available All available
Town) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Hong Kong) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Hyderabad) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Jakarta) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Melbourne) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Mumbai) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Osaka) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Seoul) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Singapore) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Sydney) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Tokyo) versions versions versions versions versions
Canada (Central) All available All available All available All available All available
versions versions versions versions versions
China (Beijing) All available All available All available All available All available
versions versions versions versions versions
China (Ningxia) All available All available All available All available All available
versions versions versions versions versions
Europe All available All available All available All available All available
(Frankfurt) versions versions versions versions versions
Europe (Ireland) All available All available All available All available All available
versions versions versions versions versions
Europe (London) All available All available All available All available All available
versions versions versions versions versions
Europe (Milan) All available All available All available All available All available
versions versions versions versions versions
Europe (Paris) All available All available All available All available All available
versions versions versions versions versions
126
Amazon Relational Database Service User Guide
Dual-stack mode
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
Europe (Spain) All available All available All available All available All available
versions versions versions versions versions
Europe All available All available All available All available All available
(Stockholm) versions versions versions versions versions
Europe (Zurich) All available All available All available All available All available
versions versions versions versions versions
Middle East All available All available All available All available All available
(Bahrain) versions versions versions versions versions
Middle East All available All available All available All available All available
(UAE) versions versions versions versions versions
South America All available All available All available All available All available
(São Paulo) versions versions versions versions versions
AWS GovCloud All available All available All available All available All available
(US-East) versions versions versions versions versions
AWS GovCloud All available All available All available All available All available
(US-West) versions versions versions versions versions
Region RDS for MySQL 8.0 RDS for MySQL 5.7 RDS for MySQL 5.6
US East (Ohio) All available versions All available versions All available versions
US East (N. Virginia) All available versions All available versions All available versions
US West (N. California) All available versions All available versions All available versions
US West (Oregon) All available versions All available versions All available versions
Africa (Cape Town) All available versions All available versions All available versions
Asia Pacific (Hong Kong) All available versions All available versions All available versions
Asia Pacific (Jakarta) All available versions All available versions All available versions
Asia Pacific (Mumbai) All available versions All available versions All available versions
Asia Pacific (Osaka) All available versions All available versions All available versions
Asia Pacific (Seoul) All available versions All available versions All available versions
127
Amazon Relational Database Service User Guide
Dual-stack mode
Region RDS for MySQL 8.0 RDS for MySQL 5.7 RDS for MySQL 5.6
Asia Pacific (Singapore) All available versions All available versions All available versions
Asia Pacific (Sydney) All available versions All available versions All available versions
Asia Pacific (Tokyo) All available versions All available versions All available versions
Canada (Central) All available versions All available versions All available versions
China (Beijing) All available versions All available versions All available versions
China (Ningxia) All available versions All available versions All available versions
Europe (Frankfurt) All available versions All available versions All available versions
Europe (Ireland) All available versions All available versions All available versions
Europe (London) All available versions All available versions All available versions
Europe (Milan) All available versions All available versions All available versions
Europe (Paris) All available versions All available versions All available versions
Europe (Stockholm) All available versions All available versions All available versions
Middle East (Bahrain) All available versions All available versions All available versions
South America (São Paulo) All available versions All available versions All available versions
AWS GovCloud (US-East) All available versions All available versions All available versions
AWS GovCloud (US-West) All available versions All available versions All available versions
Region RDS for Oracle 21c RDS for Oracle 19c RDS for Oracle 12c
US East (Ohio) All available versions All available versions All available versions
US East (N. Virginia) All available versions All available versions All available versions
US West (N. California) All available versions All available versions All available versions
US West (Oregon) All available versions All available versions All available versions
Africa (Cape Town) All available versions All available versions All available versions
Asia Pacific (Hong Kong) All available versions All available versions All available versions
128
Amazon Relational Database Service User Guide
Dual-stack mode
Region RDS for Oracle 21c RDS for Oracle 19c RDS for Oracle 12c
Asia Pacific (Jakarta) All available versions All available versions All available versions
Asia Pacific (Mumbai) All available versions All available versions All available versions
Asia Pacific (Osaka) All available versions All available versions All available versions
Asia Pacific (Seoul) All available versions All available versions All available versions
Asia Pacific (Singapore) All available versions All available versions All available versions
Asia Pacific (Sydney) All available versions All available versions All available versions
Asia Pacific (Tokyo) All available versions All available versions All available versions
Canada (Central) All available versions All available versions All available versions
China (Beijing) All available versions All available versions All available versions
China (Ningxia) All available versions All available versions All available versions
Europe (Frankfurt) All available versions All available versions All available versions
Europe (Ireland) All available versions All available versions All available versions
Europe (London) All available versions All available versions All available versions
Europe (Milan) All available versions All available versions All available versions
Europe (Paris) All available versions All available versions All available versions
Europe (Spain) – – –
Europe (Stockholm) All available versions All available versions All available versions
Europe (Zurich) – – –
Middle East (Bahrain) All available versions All available versions All available versions
South America (São Paulo) All available versions All available versions All available versions
AWS GovCloud (US-East) All available versions All available versions All available versions
AWS GovCloud (US-West) All available versions All available versions All available versions
129
Amazon Relational Database Service User Guide
Dual-stack mode
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
US East (Ohio) All available All available All available All available All available All available
versions versions versions versions versions versions
US East (N. All available All available All available All available All available All available
Virginia) versions versions versions versions versions versions
US West (N. All available All available All available All available All available All available
California) versions versions versions versions versions versions
US West All available All available All available All available All available All available
(Oregon) versions versions versions versions versions versions
Africa (Cape All available All available All available All available All available All available
Town) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Hong Kong) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Hyderabad) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Melbourne) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Jakarta) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Mumbai) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Osaka) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Seoul) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Singapore) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Sydney) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Tokyo) versions versions versions versions versions versions
Canada All available All available All available All available All available All available
(Central) versions versions versions versions versions versions
China (Beijing) All available All available All available All available All available All available
versions versions versions versions versions versions
China All available All available All available All available All available All available
(Ningxia) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(Frankfurt) versions versions versions versions versions versions
130
Amazon Relational Database Service User Guide
Dual-stack mode
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
Europe All available All available All available All available All available All available
(Ireland) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(London) versions versions versions versions versions versions
Europe (Milan) All available All available All available All available All available All available
versions versions versions versions versions versions
Europe (Paris) All available All available All available All available All available All available
versions versions versions versions versions versions
Europe (Spain) All available All available All available All available All available All available
versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(Stockholm) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(Zurich) versions versions versions versions versions versions
Israel (Tel – – – – – –
Aviv)
Middle East All available All available All available All available All available All available
(Bahrain) versions versions versions versions versions versions
Middle East All available All available All available All available All available All available
(UAE) versions versions versions versions versions versions
South All available All available All available All available All available All available
America (São versions versions versions versions versions versions
Paulo)
AWS All available All available All available All available All available All available
GovCloud versions versions versions versions versions versions
(US-East)
AWS All available All available All available All available All available All available
GovCloud versions versions versions versions versions versions
(US-West)
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
US East (Ohio) All available versions All available versions All available versions –
US East (N. Virginia) All available versions All available versions All available versions –
131
Amazon Relational Database Service User Guide
Dual-stack mode
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
US West (N. All available versions All available versions All available versions –
California)
US West (Oregon) All available versions All available versions All available versions –
Africa (Cape Town) All available versions All available versions All available versions –
Asia Pacific (Hong All available versions All available versions All available versions –
Kong)
Asia Pacific – – – –
(Hyderabad)
Asia Pacific (Jakarta) All available versions All available versions All available versions –
Asia Pacific – – – –
(Melbourne)
Asia Pacific (Mumbai) All available versions All available versions All available versions –
Asia Pacific (Osaka) All available versions All available versions All available versions –
Asia Pacific (Seoul) All available versions All available versions All available versions –
Asia Pacific All available versions All available versions All available versions –
(Singapore)
Asia Pacific (Sydney) All available versions All available versions All available versions –
Asia Pacific (Tokyo) All available versions All available versions All available versions –
Canada (Central) All available versions All available versions All available versions –
China (Beijing) All available versions All available versions All available versions –
China (Ningxia) All available versions All available versions All available versions –
Europe (Frankfurt) All available versions All available versions All available versions –
Europe (Ireland) All available versions All available versions All available versions –
Europe (London) All available versions All available versions All available versions –
Europe (Milan) All available versions All available versions All available versions –
Europe (Paris) All available versions All available versions All available versions –
Europe (Spain) – – – –
Europe (Stockholm) All available versions All available versions All available versions –
Europe (Zurich) – – – –
Middle East (Bahrain) All available versions All available versions All available versions –
132
Amazon Relational Database Service User Guide
Export snapshots to S3
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
South America (São All available versions All available versions All available versions –
Paulo)
AWS GovCloud (US- All available versions All available versions All available versions –
East)
AWS GovCloud (US- All available versions All available versions All available versions –
West)
Export snapshots to S3
You can export RDS DB snapshot data to an Amazon S3 bucket. You can export all types of DB snapshots
—including manual snapshots, automated system snapshots, and snapshots created by AWS Backup.
After the data is exported, you can analyze the exported data directly through tools like Amazon Athena
or Amazon Redshift Spectrum. For more information, see Exporting DB snapshot data to Amazon
S3 (p. 642).
Topics
• Export snapshots to S3 with RDS for MariaDB (p. 133)
• Export snapshots to S3 with RDS for MySQL (p. 135)
• Export snapshots to S3 with RDS for PostgreSQL (p. 136)
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
US East (Ohio) All available All available All available All available All available
versions versions versions versions versions
US East (N. All available All available All available All available All available
Virginia) versions versions versions versions versions
US West (N. All available All available All available All available All available
California) versions versions versions versions versions
US West All available All available All available All available All available
(Oregon) versions versions versions versions versions
Africa (Cape All available All available All available All available All available
Town) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Hong Kong) versions versions versions versions versions
Asia Pacific – – – – –
(Hyderabad)
133
Amazon Relational Database Service User Guide
Export snapshots to S3
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
Asia Pacific – – – – –
(Jakarta)
Asia Pacific – – – – –
(Melbourne)
Asia Pacific All available All available All available All available All available
(Mumbai) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Osaka) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Seoul) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Singapore) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Sydney) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Tokyo) versions versions versions versions versions
Canada (Central) All available All available All available All available All available
versions versions versions versions versions
China (Beijing) All available All available All available All available All available
versions versions versions versions versions
China (Ningxia) All available All available All available All available All available
versions versions versions versions versions
Europe All available All available All available All available All available
(Frankfurt) versions versions versions versions versions
Europe (Ireland) All available All available All available All available All available
versions versions versions versions versions
Europe (London) All available All available All available All available All available
versions versions versions versions versions
Europe (Milan) All available All available All available All available All available
versions versions versions versions versions
Europe (Paris) All available All available All available All available All available
versions versions versions versions versions
Europe (Spain) – – – – –
Europe All available All available All available All available All available
(Stockholm) versions versions versions versions versions
Europe (Zurich) – – – – –
134
Amazon Relational Database Service User Guide
Export snapshots to S3
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
Middle East All available All available All available All available All available
(Bahrain) versions versions versions versions versions
Middle East – – – – –
(UAE)
South America All available All available All available All available All available
(São Paulo) versions versions versions versions versions
AWS GovCloud – – – – –
(US-East)
AWS GovCloud – – – – –
(US-West)
Asia Pacific (Hong Kong) All available versions All available versions
135
Amazon Relational Database Service User Guide
Export snapshots to S3
Europe (Spain) – –
Europe (Zurich) – –
South America (São Paulo) All available versions All available versions
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
US East (Ohio) All available All available All available All available All available All available
versions versions versions versions versions versions
US East (N. All available All available All available All available All available All available
Virginia) versions versions versions versions versions versions
US West (N. All available All available All available All available All available All available
California) versions versions versions versions versions versions
US West All available All available All available All available All available All available
(Oregon) versions versions versions versions versions versions
Africa (Cape All available All available All available All available All available All available
Town) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Hong Kong) versions versions versions versions versions versions
Asia Pacific – – – – – –
(Hyderabad)
136
Amazon Relational Database Service User Guide
Export snapshots to S3
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
Asia Pacific – – – – – –
(Jakarta)
Asia Pacific – – – – – –
(Melbourne)
Asia Pacific All available All available All available All available All available All available
(Mumbai) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Osaka) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Seoul) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Singapore) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Sydney) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Tokyo) versions versions versions versions versions versions
Canada All available All available All available All available All available All available
(Central) versions versions versions versions versions versions
China (Beijing) All available All available All available All available All available All available
versions versions versions versions versions versions
China All available All available All available All available All available All available
(Ningxia) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(Frankfurt) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(Ireland) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(London) versions versions versions versions versions versions
Europe (Milan) All available All available All available All available All available All available
versions versions versions versions versions versions
Europe (Paris) All available All available All available All available All available All available
versions versions versions versions versions versions
Europe (Spain) – – – – – –
Europe All available All available All available All available All available All available
(Stockholm) versions versions versions versions versions versions
Europe – – – – – –
(Zurich)
137
Amazon Relational Database Service User Guide
IAM database authentication
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
Israel (Tel – – – – – –
Aviv)
Middle East All available All available All available All available All available All available
(Bahrain) versions versions versions versions versions versions
Middle East – – – – – –
(UAE)
South All available All available All available All available All available All available
America (São versions versions versions versions versions versions
Paulo)
AWS – – – – – –
GovCloud
(US-East)
AWS – – – – – –
GovCloud
(US-West)
Topics
• IAM database authentication with RDS for MariaDB (p. 138)
• IAM database authentication with RDS for MySQL (p. 140)
• IAM database authentication with RDS for PostgreSQL (p. 140)
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
138
Amazon Relational Database Service User Guide
IAM database authentication
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
Asia Pacific – – – – –
(Hyderabad)
Asia Pacific – – – – –
(Melbourne)
139
Amazon Relational Database Service User Guide
IAM database authentication
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
Europe (Spain) – – – – –
Europe (Zurich) – – – – –
Middle East – – – – –
(UAE)
140
Amazon Relational Database Service User Guide
Kerberos authentication
Kerberos authentication
By using Kerberos authentication in Amazon RDS, you can support external authentication of database
users using Kerberos and Microsoft Active Directory. Using Kerberos and Active Directory provides the
benefits of single sign-on and centralized authentication of database users. For more information, see
Kerberos authentication (p. 2567).
Topics
• Kerberos authentication with RDS for MySQL (p. 141)
• Kerberos authentication with RDS for Oracle (p. 142)
• Kerberos authentication with RDS for PostgreSQL (p. 143)
• Kerberos authentication with RDS for SQL Server (p. 145)
Region RDS for MySQL 8.0 RDS for MySQL 5.7 RDS for MySQL 5.6
141
Amazon Relational Database Service User Guide
Kerberos authentication
Region RDS for MySQL 8.0 RDS for MySQL 5.7 RDS for MySQL 5.6
Europe (Milan) – – –
Europe (Paris) – – –
Europe (Spain) – – –
Europe (Zurich) – – –
South America (São Paulo) All versions All versions All versions
Region RDS for Oracle 21c RDS for Oracle 19c RDS for Oracle 12c
142
Amazon Relational Database Service User Guide
Kerberos authentication
Region RDS for Oracle 21c RDS for Oracle 19c RDS for Oracle 12c
China (Beijing) – – –
China (Ningxia) – – –
Europe (Milan) – – –
Europe (Paris) – – –
Europe (Spain) – – –
Europe (Zurich) – – –
South America (São Paulo) All versions All versions All versions
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
US East (Ohio) All versions All versions All versions All versions All versions All versions
US East (N. All versions All versions All versions All versions All versions All versions
Virginia)
US West (N. All versions All versions All versions All versions All versions All versions
California)
143
Amazon Relational Database Service User Guide
Kerberos authentication
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
US West All versions All versions All versions All versions All versions All versions
(Oregon)
Africa (Cape – – – – – –
Town)
Asia Pacific – – – – – –
(Hong Kong)
Asia Pacific – – – – – –
(Hyderabad)
Asia Pacific – – – – – –
(Jakarta)
Asia Pacific – – – – – –
(Melbourne)
Asia Pacific All versions All versions All versions All versions All versions All versions
(Mumbai)
Asia Pacific – – – – – –
(Osaka)
Asia Pacific All versions All versions All versions All versions All versions All versions
(Seoul)
Asia Pacific All versions All versions All versions All versions All versions All versions
(Singapore)
Asia Pacific All versions All versions All versions All versions All versions All versions
(Sydney)
Asia Pacific All versions All versions All versions All versions All versions All versions
(Tokyo)
Canada All versions All versions All versions All versions All versions All versions
(Central)
China (Beijing) All versions All versions All versions All versions All versions All versions
China All versions All versions All versions All versions All versions All versions
(Ningxia)
Europe All versions All versions All versions All versions All versions All versions
(Frankfurt)
Europe All versions All versions All versions All versions All versions All versions
(Ireland)
Europe All versions All versions All versions All versions All versions All versions
(London)
Europe (Milan) – – – – – –
Europe (Paris) All versions All versions All versions All versions All versions All versions
144
Amazon Relational Database Service User Guide
Kerberos authentication
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
Europe (Spain) – – – – – –
Europe All versions All versions All versions All versions All versions All versions
(Stockholm)
Europe – – – – – –
(Zurich)
Israel (Tel – – – – – –
Aviv)
Middle East – – – – – –
(Bahrain)
Middle East – – – – – –
(UAE)
South All versions All versions All versions All versions All versions All versions
America (São
Paulo)
AWS – – – – – –
GovCloud
(US-East)
AWS – – – – – –
GovCloud
(US-West)
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
US East (Ohio) All versions All versions All versions All versions
US East (N. Virginia) All versions All versions All versions All versions
US West (N. All versions All versions All versions All versions
California)
US West (Oregon) All versions All versions All versions All versions
Africa (Cape Town) All versions All versions All versions All versions
Asia Pacific (Hong All versions All versions All versions All versions
Kong)
Asia Pacific All versions All versions All versions All versions
(Hyderabad)
145
Amazon Relational Database Service User Guide
Kerberos authentication
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
Asia Pacific (Jakarta) All versions All versions All versions All versions
Asia Pacific All versions All versions All versions All versions
(Melbourne)
Asia Pacific (Mumbai) All versions All versions All versions All versions
Asia Pacific (Osaka) All versions All versions All versions All versions
Asia Pacific (Seoul) All versions All versions All versions All versions
Asia Pacific All versions All versions All versions All versions
(Singapore)
Asia Pacific (Sydney) All versions All versions All versions All versions
Asia Pacific (Tokyo) All versions All versions All versions All versions
Canada (Central) All versions All versions All versions All versions
China (Beijing) All versions All versions All versions All versions
China (Ningxia) All versions All versions All versions All versions
Europe (Frankfurt) All versions All versions All versions All versions
Europe (Ireland) All versions All versions All versions All versions
Europe (London) All versions All versions All versions All versions
Europe (Milan) All versions All versions All versions All versions
Europe (Paris) All versions All versions All versions All versions
Europe (Spain) All versions All versions All versions All versions
Europe (Stockholm) All versions All versions All versions All versions
Europe (Zurich) All versions All versions All versions All versions
Middle East (Bahrain) All versions All versions All versions All versions
Middle East (UAE) All versions All versions All versions All versions
South America (São All versions All versions All versions All versions
Paulo)
AWS GovCloud (US- All versions All versions All versions All versions
East)
AWS GovCloud (US- All versions All versions All versions All versions
West)
146
Amazon Relational Database Service User Guide
Multi-AZ DB clusters
Multi-AZ DB clusters
A Multi-AZ DB cluster deployment in Amazon RDS provides a high availability deployment mode of
Amazon RDS with two readable standby DB instances. A Multi-AZ DB cluster has a writer DB instance
and two reader DB instances in three separate Availability Zones in the same Region. Multi-AZ DB
clusters provide high availability, increased capacity for read workloads, and lower write latency
when compared to Multi-AZ DB instance deployments. For more information, see Multi-AZ DB cluster
deployments (p. 499).
Topics
• Multi-AZ DB clusters with RDS for MySQL (p. 147)
• Multi-AZ DB clusters with RDS for PostgreSQL (p. 148)
147
Amazon Relational Database Service User Guide
Multi-AZ DB clusters
Europe (Spain) –
Europe (Zurich) –
You can also list the available versions in a Region for the db.r5d.large DB instance class by running the
following AWS CLI command.
For Windows:
You can change the DB instance class to show the available engine versions for it.
148
Amazon Relational Database Service User Guide
Multi-AZ DB clusters
Region RDS for PostgreSQL 15 RDS for PostgreSQL 14 RDS for PostgreSQL 13
US East (Ohio) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
US East (N. Virginia) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
US West (Oregon) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Africa (Cape Town) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Asia Pacific (Hong Kong) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Asia Pacific (Jakarta) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Asia Pacific (Mumbai) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Asia Pacific (Osaka) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Asia Pacific (Seoul) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Asia Pacific (Singapore) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Asia Pacific (Sydney) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Asia Pacific (Tokyo) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Canada (Central) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
China (Beijing) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
China (Ningxia) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Europe (Frankfurt) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Europe (Ireland) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Europe (London) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
149
Amazon Relational Database Service User Guide
Performance Insights
Region RDS for PostgreSQL 15 RDS for PostgreSQL 14 RDS for PostgreSQL 13
Europe (Milan) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Europe (Paris) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Europe (Spain) – – –
Europe (Stockholm) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
Europe (Zurich) – – –
Middle East (Bahrain) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
South America (São Paulo) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher
You can also list the available versions in a Region for the db.r5d.large DB instance class by running the
following AWS CLI command.
For Windows:
You can change the DB instance class to show the available engine versions for it.
Performance Insights
Performance Insights in Amazon RDS expands on existing Amazon RDS monitoring features to illustrate
and help you analyze your database performance. With the Performance Insights dashboard, you can
visualize the database load on your Amazon RDS DB instance. You can also filter the load by waits, SQL
statements, hosts, or users. For more information, see Monitoring DB load with Performance Insights on
Amazon RDS (p. 720).
Performance Insights is available for all RDS DB engines and all versions.
150
Amazon Relational Database Service User Guide
RDS Custom
For the region, DB engine, and instance class support information for Performance Insights features, see
Amazon RDS DB engine, Region, and instance class support for Performance Insights features (p. 725).
RDS Custom
Amazon RDS Custom automates database administration tasks and operations. By using RDS Custom,
as a database administrator you can access and customize your database environment and operating
system. With RDS Custom, you can customize to meet the requirements of legacy, custom, and packaged
applications. For more information, see Working with Amazon RDS Custom (p. 978).
Topics
• RDS Custom for Oracle (p. 151)
• RDS Custom for SQL Server (p. 153)
Region RDS for Oracle 19c RDS for Oracle 18c RDS for Oracle 12c
US East (Ohio) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
US East (N. Virginia) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
US West (N. – – –
California)
US West (Oregon) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Asia Pacific – – –
(Melbourne)
Asia Pacific (Mumbai) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
151
Amazon Relational Database Service User Guide
RDS Custom
Region RDS for Oracle 19c RDS for Oracle 18c RDS for Oracle 12c
Asia Pacific (Osaka) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Asia Pacific (Seoul) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Asia Pacific 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
(Singapore) or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Asia Pacific (Sydney) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Asia Pacific (Tokyo) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Canada (Central) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
China (Beijing) – – –
China (Ningxia) – – –
Europe (Frankfurt) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Europe (Ireland) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Europe (London) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
Europe (Milan) – – –
Europe (Paris) – – –
Europe (Stockholm) 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
South America (São 19c with the January 2021 18c with the January 2021 12.1 and 12.2 with the
Paulo) or higher RU/RUR or higher RU/RUR January 2021 or higher RU/
RUR
152
Amazon Relational Database Service User Guide
RDS Custom
Region RDS for Oracle 19c RDS for Oracle 18c RDS for Oracle 12c
• If you use an RPEV, it includes the default Amazon Machine Image (AMI) and SQL Server installation. If
you customize or modify the operating system (OS), your changes might not persist during patching,
snapshot restore, or automatic recovery.
• If you use a CEV, you choose your own AMI with either pre-installed Microsoft SQL Server or SQL
Server that you install using your own media. When using an AWS provided CEV, you choose the latest
Amazon EC2 image (AMI) available by AWS, which has the cumulative update (CU) supported by RDS
Custom for SQL Server. With a CEV, you can customize both the OS and SQL Server configuration to
meet your enterprise needs.
The following AWS Regions and DB engine versions are available for RDS Custom for SQL Server. The
engine version support depends on whether you're using RDS Custom for SQL Server with an RPEV, AWS
provided CEV, or customer-provided CEV.
US East (N. Virginia) Enterprise, Standard, or Enterprise, Standard, or Enterprise or Standard SQL
Web SQL Server 2019 with Web SQL Server 2019 with Server 2019 with CU17,
CU8, CU17, CU18, CU20 CU17, CU18, CU20 CU18, CU20
Asia Pacific (Mumbai) Enterprise, Standard, or Enterprise, Standard, or Enterprise or Standard SQL
Web SQL Server 2019 with Web SQL Server 2019 with Server 2019 with CU17,
CU8, CU17, CU18, CU20 CU17, CU18, CU20 CU18, CU20
153
Amazon Relational Database Service User Guide
RDS Custom
Asia Pacific (Seoul) Enterprise, Standard, or Enterprise, Standard, or Enterprise or Standard SQL
Web SQL Server 2019 with Web SQL Server 2019 with Server 2019 with CU17,
CU8, CU17, CU18, CU20 CU17, CU18, CU20 CU18, CU20
Asia Pacific (Singapore) Enterprise, Standard, or Enterprise, Standard, or Enterprise or Standard SQL
Web SQL Server 2019 with Web SQL Server 2019 with Server 2019 with CU17,
CU8, CU17, CU18, CU20 CU17, CU18, CU20 CU18, CU20
Asia Pacific (Sydney) Enterprise, Standard, or Enterprise, Standard, or Enterprise or Standard SQL
Web SQL Server 2019 with Web SQL Server 2019 with Server 2019 with CU17,
CU8, CU17, CU18, CU20 CU17, CU18, CU20 CU18, CU20
Asia Pacific (Tokyo) Enterprise, Standard, or Enterprise, Standard, or Enterprise or Standard SQL
Web SQL Server 2019 with Web SQL Server 2019 with Server 2019 with CU17,
CU8, CU17, CU18, CU20 CU17, CU18, CU20 CU18, CU20
China (Beijing) – – –
China (Ningxia) – – –
Europe (Milan) – – –
Europe (Paris) – – –
Europe (Spain) – – –
Europe (Zurich) – – –
South America (São Enterprise, Standard, or Enterprise, Standard, or Enterprise or Standard SQL
Paulo) Web SQL Server 2019 with Web SQL Server 2019 with Server 2019 with CU17,
CU8, CU17, CU18, CU20 CU17, CU18, CU20 CU18, CU20
154
Amazon Relational Database Service User Guide
Amazon RDS Proxy
Topics
• RDS Proxy with RDS for MariaDB (p. 155)
• RDS Proxy with RDS for MySQL (p. 157)
• RDS Proxy with RDS for PostgreSQL (p. 158)
• RDS Proxy with RDS for SQL Server (p. 160)
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
US East (Ohio) All available All available All available All available All available
versions versions versions versions versions
US East (N. All available All available All available All available All available
Virginia) versions versions versions versions versions
US West (N. All available All available All available All available All available
California) versions versions versions versions versions
US West All available All available All available All available All available
(Oregon) versions versions versions versions versions
Africa (Cape All available All available All available All available All available
Town) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Hong Kong) versions versions versions versions versions
Asia Pacific – – – – –
(Hyderabad)
Asia Pacific All available All available All available All available All available
(Jakarta) versions versions versions versions versions
Asia Pacific – – – – –
(Melbourne)
155
Amazon Relational Database Service User Guide
Amazon RDS Proxy
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
Asia Pacific All available All available All available All available All available
(Mumbai) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Osaka) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Seoul) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Singapore) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Sydney) versions versions versions versions versions
Asia Pacific All available All available All available All available All available
(Tokyo) versions versions versions versions versions
Canada (Central) All available All available All available All available All available
versions versions versions versions versions
China (Beijing) All available All available All available All available All available
versions versions versions versions versions
China (Ningxia) All available All available All available All available All available
versions versions versions versions versions
Europe All available All available All available All available All available
(Frankfurt) versions versions versions versions versions
Europe (Ireland) All available All available All available All available All available
versions versions versions versions versions
Europe (London) All available All available All available All available All available
versions versions versions versions versions
Europe (Milan) All available All available All available All available All available
versions versions versions versions versions
Europe (Paris) All available All available All available All available All available
versions versions versions versions versions
Europe (Spain) – – – – –
Europe All available All available All available All available All available
(Stockholm) versions versions versions versions versions
Middle East All available All available All available All available All available
(Bahrain) versions versions versions versions versions
Middle East – – – – –
(UAE)
156
Amazon Relational Database Service User Guide
Amazon RDS Proxy
Region RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB RDS for MariaDB
10.11 10.6 10.5 10.4 10.3
South America All available All available All available All available All available
(São Paulo) versions versions versions versions versions
AWS GovCloud – – – – –
(US-East)
AWS GovCloud – – – – –
(US-West)
Asia Pacific (Hong Kong) All available versions All available versions
157
Amazon Relational Database Service User Guide
Amazon RDS Proxy
Europe (Spain) – –
Europe (Zurich) – –
South America (São Paulo) All available versions All available versions
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
US East (Ohio) All available All available All available All available All available All available
versions versions versions versions versions versions
US East (N. All available All available All available All available All available All available
Virginia) versions versions versions versions versions versions
US West (N. All available All available All available All available All available All available
California) versions versions versions versions versions versions
US West All available All available All available All available All available All available
(Oregon) versions versions versions versions versions versions
Africa (Cape All available All available All available All available All available All available
Town) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Hong Kong) versions versions versions versions versions versions
Asia Pacific – – – – – –
(Hyderabad)
Asia Pacific All available All available All available All available All available All available
(Jakarta) versions versions versions versions versions versions
Asia Pacific – – – – – –
(Melbourne)
158
Amazon Relational Database Service User Guide
Amazon RDS Proxy
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
Asia Pacific All available All available All available All available All available All available
(Mumbai) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Osaka) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Seoul) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Singapore) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Sydney) versions versions versions versions versions versions
Asia Pacific All available All available All available All available All available All available
(Tokyo) versions versions versions versions versions versions
Canada All available All available All available All available All available All available
(Central) versions versions versions versions versions versions
China (Beijing) All available All available All available All available All available All available
versions versions versions versions versions versions
China All available All available All available All available All available All available
(Ningxia) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(Frankfurt) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(Ireland) versions versions versions versions versions versions
Europe All available All available All available All available All available All available
(London) versions versions versions versions versions versions
Europe (Milan) All available All available All available All available All available All available
versions versions versions versions versions versions
Europe (Paris) All available All available All available All available All available All available
versions versions versions versions versions versions
Europe (Spain) – – – – – –
Europe All available All available All available All available All available All available
(Stockholm) versions versions versions versions versions versions
Europe – – – – – –
(Zurich)
Israel (Tel – – – – – –
Aviv)
Middle East All available All available All available All available All available All available
(Bahrain) versions versions versions versions versions versions
159
Amazon Relational Database Service User Guide
Amazon RDS Proxy
Region RDS for RDS for RDS for RDS for RDS for RDS for
PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL PostgreSQL
15 14 13 12 11 10
Middle East – – – – – –
(UAE)
South All available All available All available All available All available All available
America (São versions versions versions versions versions versions
Paulo)
AWS – – – – – –
GovCloud
(US-East)
AWS – – – – – –
GovCloud
(US-West)
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
US East (Ohio) All available versions All available versions All available versions All available versions
US East (N. Virginia) All available versions All available versions All available versions All available versions
US West (N. All available versions All available versions All available versions All available versions
California)
US West (Oregon) All available versions All available versions All available versions All available versions
Africa (Cape Town) All available versions All available versions All available versions All available versions
Asia Pacific (Hong All available versions All available versions All available versions All available versions
Kong)
Asia Pacific – – – –
(Hyderabad)
Asia Pacific (Jakarta) All available versions All available versions All available versions All available versions
Asia Pacific – – – –
(Melbourne)
Asia Pacific (Mumbai) All available versions All available versions All available versions All available versions
Asia Pacific (Osaka) All available versions All available versions All available versions All available versions
Asia Pacific (Seoul) All available versions All available versions All available versions All available versions
Asia Pacific All available versions All available versions All available versions All available versions
(Singapore)
Asia Pacific (Sydney) All available versions All available versions All available versions All available versions
160
Amazon Relational Database Service User Guide
Secrets Manager integration
Region RDS for SQL Server RDS for SQL Server RDS for SQL Server RDS for SQL Server
2019 2017 2016 2014
Asia Pacific (Tokyo) All available versions All available versions All available versions All available versions
Canada (Central) All available versions All available versions All available versions All available versions
China (Beijing) All available versions All available versions All available versions All available versions
China (Ningxia) All available versions All available versions All available versions All available versions
Europe (Frankfurt) All available versions All available versions All available versions All available versions
Europe (Ireland) All available versions All available versions All available versions All available versions
Europe (London) All available versions All available versions All available versions All available versions
Europe (Milan) All available versions All available versions All available versions All available versions
Europe (Paris) All available versions All available versions All available versions All available versions
Europe (Spain) – – – –
Europe (Stockholm) All available versions All available versions All available versions All available versions
Europe (Zurich) – – – –
Middle East (Bahrain) All available versions All available versions All available versions All available versions
South America (São All available versions All available versions All available versions All available versions
Paulo)
You can specify that Amazon RDS manages the master user password in Secrets Manager for an Amazon
RDS DB instance or Multi-AZ DB cluster. RDS generates the password, stores it in Secrets Manager,
and rotates it regularly. For more information, see Password management with Amazon RDS and AWS
Secrets Manager (p. 2568).
Secrets Manager integration is supported for all RDS DB engines and all versions.
Secrets Manager integration is supported in all AWS Regions except the following:
161
Amazon Relational Database Service User Guide
Engine-native features
Engine-native features
Amazon RDS database engines also support many of the most common engine-native features and
functionality. These features are different than the Amazon RDS-native features listed on this page.
Some engine-native features might have limited support or restricted privileges.
162
Amazon Relational Database Service User Guide
DB instance billing for Amazon RDS
• DB instance hours (per hour) – Based on the DB instance class of the DB instance (for example,
db.t2.small or db.m4.large). Pricing is listed on a per-hour basis, but bills are calculated down to the
second and show times in decimal form. RDS usage is billed in 1-second increments, with a minimum
of 10 minutes. For more information, see DB instance classes (p. 11).
• Storage (per GiB per month) – Storage capacity that you have provisioned to your DB instance. If you
scale your provisioned storage capacity within the month, your bill is prorated. For more information,
see Amazon RDS DB instance storage (p. 101).
• Input/output (I/O) requests (per 1 million requests) – Total number of storage I/O requests that you
have made in a billing cycle, for Amazon RDS magnetic storage only.
• Provisioned IOPS (per IOPS per month) – Provisioned IOPS rate, regardless of IOPS consumed, for
Amazon RDS Provisioned IOPS (SSD) and General Purpose (SSD) gp3 storage. Provisioned storage for
EBS volumes are billed in 1-second increments, with a minimum of 10 minutes.
• Backup storage (per GiB per month) – Backup storage is the storage that is associated with automated
database backups and any active database snapshots that you have taken. Increasing your backup
retention period or taking additional database snapshots increases the backup storage consumed by
your database. Per second billing doesn't apply to backup storage (metered in GB-month).
Amazon RDS provides the following purchasing options to enable you to optimize your costs based on
your needs:
• On-Demand instances – Pay by the hour for the DB instance hours that you use. Pricing is listed on a
per-hour basis, but bills are calculated down to the second and show times in decimal form. RDS usage
is now billed in 1-second increments, with a minimum of 10 minutes.
• Reserved instances – Reserve a DB instance for a one-year or three-year term and get a significant
discount compared to the on-demand DB instance pricing. With Reserved Instance usage, you can
launch, delete, start, or stop multiple instances within an hour and get the Reserved Instance benefit
for all of the instances.
For Amazon RDS pricing information, see the Amazon RDS pricing page.
Topics
• On-Demand DB instances for Amazon RDS (p. 164)
• Reserved DB instances for Amazon RDS (p. 165)
163
Amazon Relational Database Service User Guide
On-Demand DB instances
Billing starts for a DB instance as soon as the DB instance is available. Pricing is listed on a per-hour
basis, but bills are calculated down to the second and show times in decimal form. Amazon RDS usage
is billed in one-second increments, with a minimum of 10 minutes. In the case of billable configuration
change, such as scaling compute or storage capacity, you're charged a 10-minute minimum. Billing
continues until the DB instance terminates, which occurs when you delete the DB instance or if the DB
instance fails.
If you no longer want to be charged for your DB instance, you must stop or delete it to avoid being billed
for additional DB instance hours. For more information about the DB instance states for which you are
billed, see Viewing Amazon RDS DB instance status (p. 684).
Stopped DB instances
While your DB instance is stopped, you're charged for provisioned storage, including Provisioned IOPS.
You are also charged for backup storage, including storage for manual snapshots and automated
backups within your specified retention window. You aren't charged for DB instance hours.
Multi-AZ DB instances
If you specify that your DB instance should be a Multi-AZ deployment, you're billed according to the
Multi-AZ pricing posted on the Amazon RDS pricing page.
164
Amazon Relational Database Service User Guide
Reserved DB instances
The general process for working with reserved DB instances is: First get information about available
reserved DB instance offerings, then purchase a reserved DB instance offering, and finally get
information about your existing reserved DB instances.
The new DB instance that you create must have the same specifications as the reserved DB instance for
the following:
• AWS Region
• DB engine
• DB instance type
• Edition (for RDS for Oracle and RDS for SQL Server)
• License type (license-included or bring-your-own-license)
• Deployment model (Single-AZ or Multi-AZ)
If the specifications of the new DB instance match an existing reserved DB instance for your account, you
are billed at the discounted rate offered for the reserved DB instance. Otherwise, the DB instance is billed
at an on-demand rate.
You can modify a DB instance that you're using as a reserved DB instance. If the modification is within
the specifications of the reserved DB instance, part or all of the discount still applies to the modified
DB instance. If the modification is outside the specifications, such as changing the instance class, the
discount no longer applies. For more information, see Size-flexible reserved DB instances (p. 166).
Topics
• Offering types (p. 165)
• Size-flexible reserved DB instances (p. 166)
• Reserved DB instance billing example (p. 168)
• Reserved DB instances for a Multi-AZ DB cluster (p. 168)
• Deleting a reserved DB instance (p. 169)
For more information about reserved DB instances, including pricing, see Amazon RDS reserved
instances.
Offering types
Reserved DB instances are available in three varieties—No Upfront, Partial Upfront, and All Upfront—
that let you optimize your Amazon RDS costs based on your expected usage.
165
Amazon Relational Database Service User Guide
Reserved DB instances
No Upfront
This option provides access to a reserved DB instance without requiring an upfront payment. Your
No Upfront reserved DB instance bills a discounted hourly rate for every hour within the term,
regardless of usage, and no upfront payment is required. This option is only available as a one-year
reservation.
Partial Upfront
This option requires a part of the reserved DB instance to be paid upfront. The remaining hours in
the term are billed at a discounted hourly rate, regardless of usage. This option is the replacement
for the previous Heavy Utilization option.
All Upfront
Full payment is made at the start of the term, with no other costs incurred for the remainder of the
term regardless of the number of hours used.
If you are using consolidated billing, all the accounts in the organization are treated as one account. This
means that all accounts in the organization can receive the hourly cost benefit of reserved DB instances
that are purchased by any other account. For more information about consolidated billing, see Amazon
RDS reserved DB instances in the AWS Billing and Cost Management User Guide.
If you have a DB instance, and you need to scale it to larger capacity, your reserved DB instance is
automatically applied to your scaled DB instance. That is, your reserved DB instances are automatically
applied across all DB instance class sizes. Size-flexible reserved DB instances are available for DB
instances with the same AWS Region and database engine. Size-flexible reserved DB instances can only
scale in their instance class type. For example, a reserved DB instance for a db.r5.large can apply to a
db.r5.xlarge, but not to a db.r6g.large, because db.r5 and db.r6g are different instance class types.
Reserved DB instance benefits also apply for both Multi-AZ and Single-AZ configurations. Flexibility
means that you can move freely between configurations within the same DB instance class type. For
example, you can move from a Single-AZ deployment running on one large DB instance (four normalized
units per hour) to a Multi-AZ deployment running on two small DB instances (2*2 = 4 normalized units
per hour).
Size-flexible reserved DB instances are available for the following Amazon RDS database engines:
• MariaDB
• MySQL
• Oracle, Bring Your Own License
• PostgreSQL
For details about using size-flexible reserved instances with Aurora, see Reserved DB instances for
Aurora.
You can compare usage for different reserved DB instance sizes by using normalized units per hour. For
example, one unit of usage on two db.r3.large DB instances is equivalent to eight normalized units per
hour of usage on one db.r3.small. The following table shows the number of normalized units per hour
for each DB instance size.
166
Amazon Relational Database Service User Guide
Reserved DB instances
small 1 2 3
medium 2 4 6
large 4 8 12
xlarge 8 16 24
2xlarge 16 32 48
4xlarge 32 64 96
6xlarge 48 96 144
For example, suppose that you purchase a db.t2.medium reserved DB instance, and you have two
running db.t2.small DB instances in your account in the same AWS Region. In this case, the billing
benefit is applied in full to both instances.
Alternatively, if you have one db.t2.large instance running in your account in the same AWS Region,
the billing benefit is applied to 50 percent of the usage of the DB instance.
167
Amazon Relational Database Service User Guide
Reserved DB instances
• An RDS for MySQL reserved Single-AZ db.r5.large DB instance class in US East (N. Virginia) with the No
Upfront option at a cost of $0.12 for the instance, or $90 per month
• 400 GiB of General Purpose SSD (gp2) storage at a cost of 0.115 per GiB per month, or $45.60 per
month
• 600 GiB of backup storage at $0.095, or $19 per month (400 GiB free)
Add all of these charges ($90 + $45.60 + $19) with the reserved DB instance, and the total cost per
month is $154.60.
If you choose to use an on-demand DB instance instead of a reserved DB instance, an RDS for MySQL
Single-AZ db.r5.large DB instance class in US East (N. Virginia) costs $0.1386 per hour, or $101.18 per
month. So, for an on-demand DB instance, add all of these options ($101.18 + $45.60 + $19), and the
total cost per month is $165.78. You save a little over $11 per month by using the reserved DB instance.
Note
The prices in this example are sample prices and might not match actual prices. For Amazon RDS
pricing information, see Amazon RDS pricing.
• Reserve three Single-AZ DB instances that are the same size as the instances in the cluster.
• Reserve one Multi-AZ DB instance and one Single-AZ DB instance that are the same size as the DB
instances in the cluster.
For example, suppose that you have one cluster consisting of three db.m6gd.large DB instances.
In this case, you can either purchase three db.m6gd.large Single-AZ reserved DB instances, or one
db.m6gd.large Multi-AZ reserved DB instance and one db.m6gd.large Single-AZ reserved DB instance.
Either of these options reserves the maximum reserved instance discount for the Multi-AZ DB cluster.
168
Amazon Relational Database Service User Guide
Reserved DB instances
Alternately, you can use size-flexible DB instances and purchase a larger DB instance to cover smaller DB
instances in one or more clusters. For example, if you have two clusters with six total db.m6gd.large DB
instances, you can purchase three db.m6gd.xl Single-AZ reserved DB instances. Doing so reserves all six
DB instances in the two clusters. For more information, see Size-flexible reserved DB instances (p. 166).
You might reserve DB instances that are the same size as the DB instances in the cluster, but reserve
fewer DB instances than the total number of DB instances in the cluster. However, if you do so,
the cluster is only partially reserved. For example, suppose that you have one cluster with three
db.m6gd.large DB instances, and you purchase one db.m6gd.large Multi-AZ reserved DB instance.
In this case, the cluster is only partially reserved, because only two of the three instances in the
cluster are covered by reserved DB instances. The remaining DB instance is charged at the on-demand
db.m6gd.large hourly rate.
For more information about Multi-AZ DB clusters, see Multi-AZ DB cluster deployments (p. 499).
You're billed for the upfront costs regardless of whether you use the resources.
If you delete a DB instance that is covered by a reserved DB instance discount, you can launch another DB
instance with compatible specifications. In this case, you continue to get the discounted rate during the
reservation term (one or three years).
Console
You can use the AWS Management Console to work with reserved DB instances as shown in the following
procedures.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Reserved instances.
3. Choose Purchase Reserved DB Instance.
4. For Product description, choose the DB engine and licensing type.
5. For DB instance class, choose the DB instance class.
6. For Deployment Option, choose whether you want a Single-AZ or Multi-AZ DB instance
deployment.
Note
To purchase the equivalent reserved DB instances for a Multi-AZ DB cluster deployment,
either purchase three Single-AZ reserved DB instances, or one Multi-AZ and one Single-AZ
reserved DB instance. For more information, see Reserved DB instances for a Multi-AZ DB
cluster (p. 168).
7. For Term, choose the length of time to reserve the the DB instance.
8. For Offering type, choose the offering type.
After you select the offering type, you can see the pricing information.
169
Amazon Relational Database Service User Guide
Reserved DB instances
Important
Choose Cancel to avoid purchasing the reserved DB instance and incurring any charges.
After you have information about the available reserved DB instance offerings, you can use the
information to purchase an offering as shown in the following procedure.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Reserved instances.
3. Choose Purchase reserved DB instance.
4. For Product description, choose the DB engine and licensing type.
5. For DB instance class, choose the DB instance class.
6. For Multi-AZ deployment, choose whether you want a Single-AZ or Multi-AZ DB instance
deployment.
Note
To purchase the equivalent reserved DB instances for a Multi-AZ DB cluster deployment,
either purchase three Single-AZ reserved DB instances, or one Multi-AZ and one Single-AZ
reserved DB instance. For more information, see Reserved DB instances for a Multi-AZ DB
cluster (p. 168).
7. For Term, choose the length of time you want the DB instance reserved.
8. For Offering type, choose the offering type.
After you choose the offering type, you can see the pricing information.
9. (Optional) You can assign your own identifier to the reserved DB instances that you purchase to help
you track them. For Reserved Id, type an identifier for your reserved DB instance.
10. Choose Submit.
Your reserved DB instance is purchased, then displayed in the Reserved instances list.
After you have purchased reserved DB instances, you can get information about your reserved DB
instances as shown in the following procedure.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the Navigation pane, choose Reserved instances.
The reserved DB instances for your account appear. To see detailed information about a particular
reserved DB instance, choose that instance in the list. You can then see detailed information about
that instance in the detail pane at the bottom of the console.
AWS CLI
You can use the AWS CLI to work with reserved DB instances as shown in the following examples.
To get information about available reserved DB instance offerings, call the AWS CLI command
describe-reserved-db-instances-offerings.
170
Amazon Relational Database Service User Guide
Reserved DB instances
After you have information about the available reserved DB instance offerings, you can use the
information to purchase an offering.
The following example purchases the reserved DB instance offering with ID 649fd0c8-cf6d-47a0-
bfa6-060f8e75e95f, and assigns the identifier of MyReservation.
For Windows:
171
Amazon Relational Database Service User Guide
Reserved DB instances
After you have purchased reserved DB instances, you can get information about your reserved DB
instances.
To get information about reserved DB instances for your AWS account, call the AWS CLI command
describe-reserved-db-instances, as shown in the following example.
RDS API
You can use the RDS API to work with reserved DB instances:
• To get information about available reserved DB instance offerings, call the Amazon RDS API operation
DescribeReservedDBInstancesOfferings.
• After you have information about the available reserved DB instance offerings, you can use the
information to purchase an offering. Call the PurchaseReservedDBInstancesOffering RDS API
operation with the following parameters:
• --reserved-db-instances-offering-id – The ID of the offering that you want to purchase.
• --reserved-db-instance-id – You can assign your own identifier to the reserved DB instances
that you purchase to help track them.
• After you have purchased reserved DB instances, you can get information about your reserved DB
instances. Call the DescribeReservedDBInstances RDS API operation.
Your reserved DB instances and their hourly charges for the current month are shown under Amazon
Relational Database Service for Database Engine Reserved Instances.
The reserved DB instance in this example was purchased All Upfront, so there are no hourly charges.
6. Choose the Cost Explorer (bar graph) icon next to the Reserved Instances heading.
The Cost Explorer displays the Monthly EC2 running hours costs and usage graph.
172
Amazon Relational Database Service User Guide
Reserved DB instances
7. Clear the Usage Type Group filter to the right of the graph.
8. Choose the time period and time unit for which you want to examine usage costs.
The following example shows usage costs for on-demand and reserved DB instances for the year to
date by month.
The reserved DB instance costs from January through June 2021 are monthly charges for a Partial
Upfront instance, while the cost in August 2021 is a one-time charge for an All Upfront instance.
The reserved instance discount for the Partial Upfront instance expired in June 2021, but the DB
instance wasn't deleted. After the expiration date, it was simply charged at the on-demand rate.
173
Amazon Relational Database Service User Guide
Sign up for an AWS account
Topics
• Sign up for an AWS account (p. 174)
• Create an administrative user (p. 174)
• Grant programmatic access (p. 175)
• Determine requirements (p. 176)
• Provide access to your DB instance in your VPC by creating a security group (p. 177)
If you already have an AWS account, know your Amazon RDS requirements, and prefer to use the
defaults for IAM and VPC security groups, skip ahead to Getting started with Amazon RDS (p. 180).
1. Open https://portal.aws.amazon.com/billing/signup.
2. Follow the online instructions.
Part of the sign-up procedure involves receiving a phone call and entering a verification code on the
phone keypad.
When you sign up for an AWS account, an AWS account root user is created. The root user has access
to all AWS services and resources in the account. As a security best practice, assign administrative
access to an administrative user, and use only the root user to perform tasks that require root user
access.
AWS sends you a confirmation email after the sign-up process is complete. At any time, you can view
your current account activity and manage your account by going to https://aws.amazon.com/ and
choosing My Account.
1. Sign in to the AWS Management Console as the account owner by choosing Root user and entering
your AWS account email address. On the next page, enter your password.
For help signing in by using root user, see Signing in as the root user in the AWS Sign-In User Guide.
174
Amazon Relational Database Service User Guide
Grant programmatic access
For instructions, see Enable a virtual MFA device for your AWS account root user (console) in the IAM
User Guide.
• For your daily administrative tasks, grant administrative access to an administrative user in AWS IAM
Identity Center (successor to AWS Single Sign-On).
For instructions, see Getting started in the AWS IAM Identity Center (successor to AWS Single Sign-On)
User Guide.
• To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email
address when you created the IAM Identity Center user.
For help signing in using an IAM Identity Center user, see Signing in to the AWS access portal in the
AWS Sign-In User Guide.
175
Amazon Relational Database Service User Guide
Determine requirements
Determine requirements
The basic building block of Amazon RDS is the DB instance. In a DB instance, you create your databases.
A DB instance provides a network address called an endpoint. Your applications use this endpoint to
connect to your DB instance. When you create a DB instance, you specify details like storage, memory,
database engine and version, network configuration, security, and maintenance periods. You control
network access to a DB instance through a security group.
Before you create a DB instance and a security group, you must know your DB instance and network
needs. Here are some important things to consider:
• Resource requirements – What are the memory and processor requirements for your application or
service? You use these settings to help you determine what DB instance class to use. For specifications
about DB instance classes, see DB instance classes (p. 11).
• VPC, subnet, and security group – Your DB instance will most likely be in a virtual private cloud
(VPC). To connect to your DB instance, you need to set up security group rules. These rules are set up
differently depending on what kind of VPC you use and how you use it. For example, you can use: a
default VPC or a user-defined VPC.
The following list describes the rules for each VPC option:
• Default VPC – If your AWS account has a default VPC in the current AWS Region, that VPC is
configured to support DB instances. If you specify the default VPC when you create the DB instance,
do the following:
• Make sure to create a VPC security group that authorizes connections from the application or
service to the Amazon RDS DB instance. Use the Security Group option on the VPC console or
the AWS CLI to create VPC security groups. For information, see Step 3: Create a VPC security
group (p. 2700).
• Specify the default DB subnet group. If this is the first DB instance you have created in this AWS
Region, Amazon RDS creates the default DB subnet group when it creates the DB instance.
• User-defined VPC – If you want to specify a user-defined VPC when you create a DB instance, be
aware of the following:
• Make sure to create a VPC security group that authorizes connections from the application or
service to the Amazon RDS DB instance. Use the Security Group option on the VPC console or
the AWS CLI to create VPC security groups. For information, see Step 3: Create a VPC security
group (p. 2700).
• The VPC must meet certain requirements in order to host DB instances, such as having at least two
subnets, each in a separate Availability Zone. For information, see Amazon VPC VPCs and Amazon
RDS (p. 2688).
176
Amazon Relational Database Service User Guide
Provide access to your DB instance
• Make sure to specify a DB subnet group that defines which subnets in that VPC can be used by the
DB instance. For information, see the DB subnet group section in Working with a DB instance in a
VPC (p. 2689).
• High availability – Do you need failover support? On Amazon RDS, a Multi-AZ deployment creates
a primary DB instance and a secondary standby DB instance in another Availability Zone for failover
support. We recommend Multi-AZ deployments for production workloads to maintain high availability.
For development and test purposes, you can use a deployment that isn't Multi-AZ. For more
information, see Configuring and managing a Multi-AZ deployment (p. 492).
• IAM policies – Does your AWS account have policies that grant the permissions needed to perform
Amazon RDS operations? If you are connecting to AWS using IAM credentials, your IAM account must
have IAM policies that grant the permissions required to perform Amazon RDS operations. For more
information, see Identity and access management for Amazon RDS (p. 2606).
• Open ports – What TCP/IP port does your database listen on? The firewalls at some companies might
block connections to the default port for your database engine. If your company firewall blocks the
default port, choose another port for the new DB instance. When you create a DB instance that listens
on a port you specify, you can change the port by modifying the DB instance.
• AWS Region – What AWS Region do you want your database in? Having your database in close
proximity to your application or web service can reduce network latency. For more information, see
Regions, Availability Zones, and Local Zones (p. 110).
• DB disk subsystem – What are your storage requirements? Amazon RDS provides three storage types:
• General Purpose (SSD)
• Provisioned IOPS (PIOPS)
• Magnetic (also known as standard storage)
For more information on Amazon RDS storage, see Amazon RDS DB instance storage (p. 101).
When you have the information you need to create the security group and the DB instance, continue to
the next step.
Before you can connect to your DB instance, you must add rules to a security group that enable you
to connect. Use your network and configuration information to create rules to allow access to your DB
instance.
For example, suppose that you have an application that accesses a database on your DB instance in a
VPC. In this case, you must add a custom TCP rule that specifies the port range and IP addresses that
your application uses to access the database. If you have an application on an Amazon EC2 instance, you
can use the security group that you set up for the Amazon EC2 instance.
You can configure connectivity between an Amazon EC2 instance a DB instance when you create
the DB instance. For more information, see Configure automatic network connectivity with an EC2
instance (p. 300).
Tip
You can set up network connectivity between an Amazon EC2 instance and a DB instance
automatically when you create the DB instance. For more information, see Configure automatic
network connectivity with an EC2 instance (p. 300).
177
Amazon Relational Database Service User Guide
Provide access to your DB instance
For information about common scenarios for accessing a DB instance, see Scenarios for accessing a DB
instance in a VPC (p. 2701).
1. Sign in to the AWS Management Console and open the Amazon VPC console at https://
console.aws.amazon.com/vpc.
Note
Make sure you are in the VPC console, not the RDS console.
2. In the upper-right corner of the AWS Management Console, choose the AWS Region where you want
to create your VPC security group and DB instance. In the list of Amazon VPC resources for that AWS
Region, you should see at least one VPC and several subnets. If you don't, you don't have a default
VPC in that AWS Region.
3. In the navigation pane, choose Security Groups.
4. Choose Create security group.
You can use the VPC security group that you just created as the security group for your DB instance when
you create it.
Note
If you use a default VPC, a default subnet group spanning all of the VPC's subnets is created
for you. When you create a DB instance, you can select the default VPC and use default for DB
Subnet Group.
After you have completed the setup requirements, you can create a DB instance using your requirements
and security group. To do so, follow the instructions in Creating an Amazon RDS DB instance (p. 300).
For information about getting started by creating a DB instance that uses a specific DB engine, see the
relevant documentation in the following table.
Microsoft SQL Server Creating and connecting to a Microsoft SQL Server DB instance (p. 194)
178
Amazon Relational Database Service User Guide
Provide access to your DB instance
Note
If you can't connect to a DB instance after you create it, see the troubleshooting information in
Can't connect to Amazon RDS DB instance (p. 2727).
179
Amazon Relational Database Service User Guide
Creating a DB instance and connecting to a database on a DB instance is slightly different for each of the
DB engines. Choose one of the following DB engines that you want to use for detailed information on
creating and connecting to the DB instance. After you have created and connected to your DB instance,
there are instructions to help you delete the DB instance.
Topics
• Creating and connecting to a MariaDB DB instance (p. 181)
• Creating and connecting to a Microsoft SQL Server DB instance (p. 194)
• Creating and connecting to a MySQL DB instance (p. 209)
• Creating and connecting to an Oracle DB instance (p. 222)
• Creating and connecting to a PostgreSQL DB instance (p. 235)
• Tutorial: Create a web server and an Amazon RDS DB instance (p. 249)
• Tutorial: Using a Lambda function to access an Amazon RDS database (p. 273)
180
Amazon Relational Database Service User Guide
Creating and connecting to a MariaDB DB instance
After you complete the tutorial, there is a public and private subnet in each Availability Zone in your VPC.
In one Availability Zone, the EC2 instance is in the public subnet, and the DB instance is in the private
subnet.
Important
There's no charge for creating an AWS account. However, by completing this tutorial, you might
incur costs for the AWS resources you use. You can delete these resources after you complete
the tutorial if they are no longer needed.
The following diagram shows the configuration when the tutorial is complete.
This tutorial uses Easy create to create a DB instance running MariaDB with the AWS Management
Console. With Easy create, you specify only the DB engine type, DB instance size, and DB instance
identifier. Easy create uses the default settings for the other configuration options. The DB instance
created by Easy create is private.
When you use Standard create instead of Easy create, you can specify more configuration options when
you create a DB instance, including ones for availability, security, backups, and maintenance. To create
a public DB instance, you must use Standard create. For information about creating DB instances with
Standard create, see Creating an Amazon RDS DB instance (p. 300).
Topics
• Prerequisites (p. 182)
• Step 1: Create an EC2 instance (p. 182)
• Step 2: Create a MariaDB DB instance (p. 185)
• Step 3: Connect to a MariaDB DB instance (p. 190)
• Step 4: Delete the EC2 instance and DB instance (p. 193)
• (Optional) Connect your DB instance to a Lambda function (p. 193)
181
Amazon Relational Database Service User Guide
Prerequisites
Prerequisites
Before you begin, complete the steps in the following sections:
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the upper-right corner of the AWS Management Console, choose the AWS Region in which you
want to create the EC2 instance.
3. Choose EC2 Dashboard, and then choose Launch instance, as shown in the following image.
182
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
For more information about creating a new key pair, see Create a key pair in the Amazon EC2
User Guide for Linux Instances.
e. For Allow SSH traffic in Network settings, choose the source of SSH connections to the EC2
instance.
You can choose My IP if the displayed IP address is correct for SSH connections. Otherwise, you
can determine the IP address to use to connect to EC2 instances in your VPC using Secure Shell
(SSH). To determine your public IP address, in a different browser window or tab, you can use
the service at https://checkip.amazonaws.com. An example of an IP address is 192.0.2.1/32.
183
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
In many cases, you might connect through an internet service provider (ISP) or from behind your
firewall without a static IP address. If so, make sure to determine the range of IP addresses used
by client computers.
Warning
If you use 0.0.0.0/0 for SSH access, you make it possible for all IP addresses to access
your public EC2 instances using SSH. This approach is acceptable for a short time in a
test environment, but it's unsafe for production environments. In production, authorize
only a specific IP address or range of addresses to access your EC2 instances using SSH.
184
Amazon Relational Database Service User Guide
Step 2: Create a MariaDB DB instance
6. Choose the EC2 instance identifier to open the list of EC2 instances, and then select your EC2
instance.
7. In the Details tab, note the following values, which you need when you connect using SSH:
8. Wait until the Instance state for your EC2 instance has a status of Running before continuing.
185
Amazon Relational Database Service User Guide
Step 2: Create a MariaDB DB instance
In this example, you use Easy create to create a DB instance running the MariaDB database engine with a
db.t3.micro DB instance class.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the upper-right corner of the Amazon RDS console, choose the AWS Region in which you want to
create the DB instance.
3. In the navigation pane, choose Databases.
4. Choose Create database and make sure that Easy create is chosen.
The Create database page should look similar to the following image.
186
Amazon Relational Database Service User Guide
Step 2: Create a MariaDB DB instance
9. To use an automatically generated master password for the DB instance, select Auto generate a
password.
To enter your master password, make sure Auto generate a password is cleared, and then enter the
same password in Master password and Confirm password.
10. To set up a connection with the EC2 instance you created previously, open Set up EC2 connection -
optional.
Select Connect to an EC2 compute resource. Choose the EC2 instance you created previously.
187
Amazon Relational Database Service User Guide
Step 2: Create a MariaDB DB instance
188
Amazon Relational Database Service User Guide
Step 2: Create a MariaDB DB instance
You can examine the default settings used with Easy create. The Editable after database is created
column shows which options you can change after you create the database.
• If a setting has No in that column, and you want a different setting, you can use Standard create
to create the DB instance.
• If a setting has Yes in that column, and you want a different setting, you can either use Standard
create to create the DB instance, or modify the DB instance after you create it to change the
setting.
12. Choose Create database.
To view the master username and password for the DB instance, choose View credential details.
You can use the username and password that appears to connect to the DB instance as the master
user.
189
Amazon Relational Database Service User Guide
Step 3: Connect to a MariaDB DB instance
Important
You can't view the master user password again. If you don't record it, you might have to
change it.
If you need to change the master user password after the DB instance is available, you can
modify the DB instance to do so. For more information about modifying a DB instance, see
Modifying an Amazon RDS DB instance (p. 401).
13. In the Databases list, choose the name of the new MariaDB DB instance to show its details.
When the status changes to Available, you can connect to the DB instance. Depending on the DB
instance class and the amount of storage, it can take up to 20 minutes before the new instance is
available.
1. Find the endpoint (DNS name) and port number for your DB instance.
a. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
b. In the upper-right corner of the Amazon RDS console, choose the AWS Region for the DB
instance.
c. In the navigation pane, choose Databases.
d. Choose the MariaDB DB instance name to display its details.
e. On the Connectivity & security tab, copy the endpoint. Also note the port number. You need
both the endpoint and the port number to connect to the DB instance.
190
Amazon Relational Database Service User Guide
Step 3: Connect to a MariaDB DB instance
2. Connect to the EC2 instance that you created earlier by following the steps in Connect to your Linux
instance in the Amazon EC2 User Guide for Linux Instances.
We recommend that you connect to your EC2 instance using SSH. If the SSH client utility is installed
on Windows, Linux, or Mac, you can connect to the instance using the following command format:
191
Amazon Relational Database Service User Guide
Step 3: Connect to a MariaDB DB instance
3. Get the latest bug fixes and security updates by updating the software on your EC2 instance. To do
this, use the following command.
Note
The -y option installs the updates without asking for confirmation. To examine updates
before installing, omit this option.
To install the MariaDB command-line client on Amazon Linux 2023, run the following command:
5. Connect to the MariaDB DB instance. For example, enter the following command. This action lets
you connect to the MariaDB DB instance using the MySQL client.
Substitute the DB instance endpoint (DNS name) for endpoint, and substitute the master username
that you used for admin. Provide the master password that you used when prompted for a
password.
After you enter the password for the user, you should see output similar to the following.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
For more information about connecting to a MariaDB DB instance, see Connecting to a DB instance
running the MariaDB database engine (p. 1269). If you can't connect to your DB instance, see Can't
connect to Amazon RDS DB instance (p. 2727).
For security, it is a best practice to use encrypted connections. Only use an unencrypted MariaDB
connection when the client and server are in the same VPC and the network is trusted. For
information about using encrypted connections, see Connecting from the MySQL command-line
client with SSL/TLS (encrypted) (p. 1276).
6. Run SQL commands.
For example, the following SQL command shows the current date and time:
SELECT CURRENT_TIMESTAMP;
192
Amazon Relational Database Service User Guide
Step 4: Delete the EC2 instance and DB instance
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the navigation pane, choose Instances.
3. Select the EC2 instance, and choose Instance state, Terminate instance.
4. Choose Terminate when prompted for confirmation.
For more information about deleting an EC2 instance, see Terminate your instance in the Amazon EC2
User Guide for Linux Instances.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases.
3. Choose the DB instance you want to delete.
4. For Actions, choose Delete.
5. Clear Create final snapshot? and Retain automated backups.
6. Complete the acknowledgement and choose Delete.
193
Amazon Relational Database Service User Guide
Creating and connecting to a
Microsoft SQL Server DB instance
After you complete the tutorial, there is a public and private subnet in each Availability Zone in your VPC.
In one Availability Zone, the EC2 instance is in the public subnet, and the DB instance is in the private
subnet.
Important
There's no charge for creating an AWS account. However, by completing this tutorial, you might
incur costs for the AWS resources you use. You can delete these resources after you complete
the tutorial if they are no longer needed.
The following diagram shows the configuration when the tutorial is complete.
This tutorial uses Easy create to create a DB instance running Microsoft SQL Server with the AWS
Management Console. With Easy create, you specify only the DB engine type, DB instance size, and DB
instance identifier. Easy create uses the default settings for the other configuration options. The DB
instance created by Easy create is private.
When you use Standard create instead of Easy create, you can specify more configuration options when
you create a DB instance, including ones for availability, security, backups, and maintenance. To create
a public DB instance, you must use Standard create. For information about creating DB instances with
Standard create, see Creating an Amazon RDS DB instance (p. 300).
Topics
• Prerequisites (p. 195)
• Step 1: Create an EC2 instance (p. 195)
• Step 2: Create a SQL Server DB instance (p. 199)
• Step 3: Connect to your SQL Server DB instance (p. 204)
194
Amazon Relational Database Service User Guide
Prerequisites
Prerequisites
Before you begin, complete the steps in the following sections:
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the upper-right corner of the AWS Management Console, choose the AWS Region you used for the
database previously.
3. Choose EC2 Dashboard, and then choose Launch instance, as shown in the following image.
195
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
196
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
For more information about creating a new key pair, see Create a key pair in the Amazon EC2
User Guide for Windows Instances.
e. For Firewall (security groups) in Network settings, choose Allow RDP traffic from to connect
to the EC2 instance.
You can choose My IP if the displayed IP address is correct for RDP connections. Otherwise,
you can determine the IP address to use to connect to EC2 instances in your VPC using RDP. To
determine your public IP address, in a different browser window or tab, you can use the service
at https://checkip.amazonaws.com. An example of an IP address is 192.0.2.1/32.
In many cases, you might connect through an internet service provider (ISP) or from behind your
firewall without a static IP address. If so, make sure to determine the range of IP addresses used
by client computers.
Warning
If you use 0.0.0.0/0 for RDP access, you make it possible for all IP addresses to access
your public EC2 instances using RDP. This approach is acceptable for a short time in a
test environment, but it's unsafe for production environments. In production, authorize
only a specific IP address or range of addresses to access your EC2 instances using RDP.
197
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
198
Amazon Relational Database Service User Guide
Step 2: Create a SQL Server DB instance
6. Choose the EC2 instance identifier to open the list of EC2 instances.
7. Wait until the Instance state for your EC2 instance has a status of Running before continuing.
In this example, you use Easy create to create a DB instance running the SQL Server database engine
with a db.t2.micro DB instance class.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the upper-right corner of the Amazon RDS console, choose the AWS Region in which you want to
create the DB instance.
3. In the navigation pane, choose Databases.
4. Choose Create database and make sure that Easy create is chosen.
199
Amazon Relational Database Service User Guide
Step 2: Create a SQL Server DB instance
The Create database page should look similar to the following image.
200
Amazon Relational Database Service User Guide
Step 2: Create a SQL Server DB instance
9. For Master username, enter a name for the master user, or keep the default name.
10. To set up a connection with the EC2 instance you created previously, open Set up EC2 connection -
optional.
Select Connect to an EC2 compute resource. Choose the EC2 instance you created previously.
201
Amazon Relational Database Service User Guide
Step 2: Create a SQL Server DB instance
11. To use an automatically generated master password for the DB instance, select the Auto generate a
password box.
To enter your master password, clear the Auto generate a password box, and then enter the same
password in Master password and Confirm password.
12. Open View default settings for Easy create.
202
Amazon Relational Database Service User Guide
Step 2: Create a SQL Server DB instance
You can examine the default settings used with Easy create. The Editable after database is created
column shows which options you can change after you create the database.
• If a setting has No in that column, and you want a different setting, you can use Standard create
to create the DB instance.
• If a setting has Yes in that column, and you want a different setting, you can either use Standard
create to create the DB instance, or modify the DB instance after you create it to change the
setting.
13. Choose Create database.
To view the master username and password for the DB instance, choose View credential details.
You can use the username and password that appears to connect to the DB instance as the master
user.
203
Amazon Relational Database Service User Guide
Step 3: Connecting to your SQL Server DB instance
Important
You can't view the master user password again. If you don't record it, you might have to
change it.
If you need to change the master user password after the DB instance is available, you can
modify the DB instance to do so. For more information about modifying a DB instance, see
Modifying an Amazon RDS DB instance (p. 401).
14. In the Databases list, choose the name of the new SQL Server DB instance to show its details.
When the status changes to Available, you can connect to the DB instance. Depending on the DB
instance class and the amount of storage, it can take up to 20 minutes before the new instance is
available.
1. Find the endpoint (DNS name) and port number for your DB instance.
a. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
b. In the upper-right corner of the Amazon RDS console, choose the AWS Region for the DB
instance.
c. In the navigation pane, choose Databases.
d. Choose the SQL Server DB instance name to display its details.
e. On the Connectivity tab, copy the endpoint. Also, note the port number. You need both the
endpoint and the port number to connect to the DB instance.
204
Amazon Relational Database Service User Guide
Step 3: Connecting to your SQL Server DB instance
2. Connect to the EC2 instance that you created earlier by following the steps in Connect to your
Microsoft Windows instance in the Amazon EC2 User Guide for Windows Instances.
3. Install the SQL Server Management Studio (SSMS) client from Microsoft.
205
Amazon Relational Database Service User Guide
Step 4: Exploring your sample DB instance
To download a standalone version of SSMS to your EC2 instance, see Download SQL Server
Management Studio (SSMS) in the Microsoft documentation.
database-test1.0123456789012.us-west-2.rds.amazonaws.com,1433
After a few moments, SSMS connects to your DB instance. For security, it is a best practice to use
encrypted connections. Only use an unencrypted SQL Server connection when the client and server
are in the same VPC and the network is trusted. For information about using encrypted connections,
see Using SSL with a Microsoft SQL Server DB instance (p. 1456)
For more information about connecting to a Microsoft SQL Server DB instance, see Connecting to a DB
instance running the Microsoft SQL Server database engine (p. 1380).
For information about connection issues, see Can't connect to Amazon RDS DB instance (p. 2727).
1. Your SQL Server DB instance comes with SQL Server's standard built-in system databases (master,
model, msdb, and tempdb). To explore the system databases, do the following:
206
Amazon Relational Database Service User Guide
Step 4: Exploring your sample DB instance
Your SQL Server DB instance also comes with a database named rdsadmin. Amazon RDS uses this
database to store the objects that it uses to manage your database. The rdsadmin database also
includes stored procedures that you can run to perform advanced tasks.
2. Start creating your own databases and running queries against your DB instance and databases as
usual. To run a test query against your sample DB instance, do the following:
a. In SSMS, on the File menu, point to New and then choose Query with Current Connection.
b. Enter the following SQL query:
select @@VERSION
c. Run the query. SSMS returns the SQL Server version of your Amazon RDS DB instance.
207
Amazon Relational Database Service User Guide
Step 5: Delete the EC2 instance and DB instance
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the navigation pane, choose Instances.
3. Select the EC2 instance, and choose Instance state, Terminate instance.
4. Choose Terminate when prompted for confirmation.
For more information about deleting an EC2 instance, see Terminate your instance in the User Guide for
Windows Instances.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases.
3. Choose the DB instance that you want to delete.
4. For Actions, choose Delete.
5. Clear Create final snapshot? and Retain automated backups.
6. Complete the acknowledgement and choose Delete.
208
Amazon Relational Database Service User Guide
Creating and connecting to a MySQL DB instance
After you complete the tutorial, there is a public and private subnet in each Availability Zone in your VPC.
In one Availability Zone, the EC2 instance is in the public subnet, and the DB instance is in the private
subnet.
Important
There's no charge for creating an AWS account. However, by completing this tutorial, you might
incur costs for the AWS resources you use. You can delete these resources after you complete
the tutorial if they are no longer needed.
The following diagram shows the configuration when the tutorial is complete.
This tutorial uses Easy create to create a DB instance running MySQL with the AWS Management
Console. With Easy create, you specify only the DB engine type, DB instance size, and DB instance
identifier. Easy create uses the default settings for the other configuration options. The DB instance
created by Easy create is private.
When you use Standard create instead of Easy create, you can specify more configuration options when
you create a DB instance, including ones for availability, security, backups, and maintenance. To create
a public DB instance, you must use Standard create. For information about creating DB instances with
Standard create, see Creating an Amazon RDS DB instance (p. 300).
Topics
• Prerequisites (p. 210)
• Step 1: Create an EC2 instance (p. 210)
• Step 2: Create a MySQL DB instance (p. 213)
• Step 3: Connect to a MySQL DB instance (p. 218)
• Step 4: Delete the EC2 instance and DB instance (p. 221)
• (Optional) Connect your DB instance to a Lambda function (p. 221)
209
Amazon Relational Database Service User Guide
Prerequisites
Prerequisites
Before you begin, complete the steps in the following sections:
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the upper-right corner of the AWS Management Console, choose the AWS Region in which you
want to create the EC2 instance.
3. Choose EC2 Dashboard, and then choose Launch instance, as shown in the following image.
210
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
For more information about creating a new key pair, see Create a key pair in the Amazon EC2
User Guide for Linux Instances.
e. For Allow SSH traffic in Network settings, choose the source of SSH connections to the EC2
instance.
You can choose My IP if the displayed IP address is correct for SSH connections. Otherwise, you
can determine the IP address to use to connect to EC2 instances in your VPC using Secure Shell
(SSH). To determine your public IP address, in a different browser window or tab, you can use
the service at https://checkip.amazonaws.com. An example of an IP address is 192.0.2.1/32.
211
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
In many cases, you might connect through an internet service provider (ISP) or from behind your
firewall without a static IP address. If so, make sure to determine the range of IP addresses used
by client computers.
Warning
If you use 0.0.0.0/0 for SSH access, you make it possible for all IP addresses to access
your public EC2 instances using SSH. This approach is acceptable for a short time in a
test environment, but it's unsafe for production environments. In production, authorize
only a specific IP address or range of addresses to access your EC2 instances using SSH.
212
Amazon Relational Database Service User Guide
Step 2: Create a MySQL DB instance
6. Choose the EC2 instance identifier to open the list of EC2 instances, and then select your EC2
instance.
7. In the Details tab, note the following values, which you need when you connect using SSH:
8. Wait until the Instance state for your EC2 instance has a status of Running before continuing.
213
Amazon Relational Database Service User Guide
Step 2: Create a MySQL DB instance
In this example, you use Easy create to create a DB instance running the MySQL database engine with a
db.t3.micro DB instance class.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the upper-right corner of the Amazon RDS console, choose the AWS Region you used for the EC2
instance previously.
3. In the navigation pane, choose Databases.
4. Choose Create database and make sure that Easy create is chosen.
The Create database page should look similar to the following image.
214
Amazon Relational Database Service User Guide
Step 2: Create a MySQL DB instance
9. To use an automatically generated master password for the DB instance, select Auto generate a
password.
To enter your master password, make sure Auto generate a password is cleared, and then enter the
same password in Master password and Confirm password.
10. To set up a connection with the EC2 instance you created previously, open Set up EC2 connection -
optional.
Select Connect to an EC2 compute resource. Choose the EC2 instance you created previously.
215
Amazon Relational Database Service User Guide
Step 2: Create a MySQL DB instance
216
Amazon Relational Database Service User Guide
Step 2: Create a MySQL DB instance
You can examine the default settings used with Easy create. The Editable after database is created
column shows which options you can change after you create the database.
• If a setting has No in that column, and you want a different setting, you can use Standard create
to create the DB instance.
• If a setting has Yes in that column, and you want a different setting, you can either use Standard
create to create the DB instance, or modify the DB instance after you create it to change the
setting.
12. Choose Create database.
To view the master username and password for the DB instance, choose View credential details.
You can use the username and password that appears to connect to the DB instance as the master
user.
217
Amazon Relational Database Service User Guide
Step 3: Connect to a MySQL DB instance
Important
You can't view the master user password again. If you don't record it, you might have to
change it.
If you need to change the master user password after the DB instance is available, you can
modify the DB instance to do so. For more information about modifying a DB instance, see
Modifying an Amazon RDS DB instance (p. 401).
13. In the Databases list, choose the name of the new MySQL DB instance to show its details.
When the status changes to Available, you can connect to the DB instance. Depending on the DB
instance class and the amount of storage, it can take up to 20 minutes before the new instance is
available.
1. Find the endpoint (DNS name) and port number for your DB instance.
a. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
b. In the upper-right corner of the Amazon RDS console, choose the AWS Region for the DB
instance.
c. In the navigation pane, choose Databases.
d. Choose the MySQL DB instance name to display its details.
e. On the Connectivity & security tab, copy the endpoint. Also, note the port number. You need
both the endpoint and the port number to connect to the DB instance.
218
Amazon Relational Database Service User Guide
Step 3: Connect to a MySQL DB instance
2. Connect to the EC2 instance that you created earlier by following the steps in Connect to your Linux
instance in the Amazon EC2 User Guide for Linux Instances.
We recommend that you connect to your EC2 instance using SSH. If the SSH client utility is installed
on Windows, Linux, or Mac, you can connect to the instance using the following command format:
219
Amazon Relational Database Service User Guide
Step 3: Connect to a MySQL DB instance
3. Get the latest bug fixes and security updates by updating the software on your EC2 instance. To do
this, use the following command.
Note
The -y option installs the updates without asking for confirmation. To examine updates
before installing, omit this option.
4. To install the mysql command-line client from MariaDB on Amazon Linux 2023, run the following
command:
5. Connect to the MySQL DB instance. For example, enter the following command. This action lets you
connect to the MySQL DB instance using the MySQL client.
Substitute the DB instance endpoint (DNS name) for endpoint, and substitute the master username
that you used for admin. Provide the master password that you used when prompted for a
password.
After you enter the password for the user, you should see output similar to the following.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]>
For more information about connecting to a MySQL DB instance, see Connecting to a DB instance
running the MySQL database engine (p. 1630). If you can't connect to your DB instance, see Can't
connect to Amazon RDS DB instance (p. 2727).
For security, it is a best practice to use encrypted connections. Only use an unencrypted MySQL
connection when the client and server are in the same VPC and the network is trusted. For
information about using encrypted connections, see Connecting from the MySQL command-line
client with SSL/TLS (encrypted) (p. 1640).
6. Run SQL commands.
For example, the following SQL command shows the current date and time:
SELECT CURRENT_TIMESTAMP;
220
Amazon Relational Database Service User Guide
Step 4: Delete the EC2 instance and DB instance
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the navigation pane, choose Instances.
3. Select the EC2 instance, and choose Instance state, Terminate instance.
4. Choose Terminate when prompted for confirmation.
For more information about deleting an EC2 instance, see Terminate your instance in the Amazon EC2
User Guide for Linux Instances.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases.
3. Choose the DB instance that you want to delete.
4. For Actions, choose Delete.
5. Clear Create final snapshot? and Retain automated backups.
6. Complete the acknowledgement and choose Delete.
221
Amazon Relational Database Service User Guide
Creating and connecting to an Oracle DB instance
After you complete the tutorial, there is a public and private subnet in each Availability Zone in your VPC.
In one Availability Zone, the EC2 instance is in the public subnet, and the DB instance is in the private
subnet.
Important
There's no charge for creating an AWS account. However, by completing this tutorial, you might
incur costs for the AWS resources you use. You can delete these resources after you complete
the tutorial if they are no longer needed.
The following diagram shows the configuration when the tutorial is complete.
This tutorial uses Easy create to create a DB instance running Oracle with the AWS Management
Console. With Easy create, you specify only the DB engine type, DB instance size, and DB instance
identifier. Easy create uses the default settings for the other configuration options. The DB instance
created by Easy create is private.
When you use Standard create instead of Easy create, you can specify more configuration options when
you create a DB instance, including ones for availability, security, backups, and maintenance. To create
a public DB instance, you must use Standard create. For information about creating DB instances with
Standard create, see Creating an Amazon RDS DB instance (p. 300).
Topics
• Prerequisites (p. 223)
• Step 1: Create an EC2 instance (p. 223)
• Step 2: Create an Oracle DB instance (p. 226)
• Step 3: Connect your SQL client to an Oracle DB instance (p. 231)
• Step 4: Delete the EC2 instance and DB instance (p. 234)
• (Optional) Connect your DB instance to a Lambda function (p. 234)
222
Amazon Relational Database Service User Guide
Prerequisites
Prerequisites
Before you begin, complete the steps in the following sections:
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the upper-right corner of the AWS Management Console, choose the AWS Region in which you
want to create the EC2 instance.
3. Choose EC2 Dashboard, and then choose Launch instance, as shown in the following image.
223
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
For more information about creating a new key pair, see Create a key pair in the Amazon EC2
User Guide for Linux Instances.
e. For Allow SSH traffic in Network settings, choose the source of SSH connections to the EC2
instance.
You can choose My IP if the displayed IP address is correct for SSH connections. Otherwise, you
can determine the IP address to use to connect to EC2 instances in your VPC using Secure Shell
(SSH). To determine your public IP address, in a different browser window or tab, you can use
the service at https://checkip.amazonaws.com. An example of an IP address is 192.0.2.1/32.
224
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
In many cases, you might connect through an internet service provider (ISP) or from behind your
firewall without a static IP address. If so, make sure to determine the range of IP addresses used
by client computers.
Warning
If you use 0.0.0.0/0 for SSH access, you make it possible for all IP addresses to access
your public EC2 instances using SSH. This approach is acceptable for a short time in a
test environment, but it's unsafe for production environments. In production, authorize
only a specific IP address or range of addresses to access your EC2 instances using SSH.
225
Amazon Relational Database Service User Guide
Step 2: Create an Oracle DB instance
6. Choose the EC2 instance identifier to open the list of EC2 instances, and then select your EC2
instance.
7. In the Details tab, note the following values, which you need when you connect using SSH:
8. Wait until the Instance state for your EC2 instance has a status of Running before continuing.
226
Amazon Relational Database Service User Guide
Step 2: Create an Oracle DB instance
In this example, you use Easy create to create a DB instance running the Oracle database engine with a
db.m5.large DB instance class.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the upper-right corner of the Amazon RDS console, choose the AWS Region in which you want to
create the DB instance.
3. In the navigation pane, choose Databases.
4. Choose Create database and make sure that Easy create is chosen.
The Create database page should look similar to the following image.
227
Amazon Relational Database Service User Guide
Step 2: Create an Oracle DB instance
228
Amazon Relational Database Service User Guide
Step 2: Create an Oracle DB instance
9. To use an automatically generated master password for the DB instance, select Auto generate a
password.
To enter your master password, make sure Auto generate a password is cleared, and then enter the
same password in Master password and Confirm password.
10. To set up a connection with the EC2 instance you created previously, open Set up EC2 connection -
optional.
Select Connect to an EC2 compute resource. Choose the EC2 instance you created previously.
229
Amazon Relational Database Service User Guide
Step 2: Create an Oracle DB instance
You can examine the default settings used with Easy create. The Editable after database is created
column shows which options you can change after you create the database.
• If a setting has No in that column, and you want a different setting, you can use Standard create
to create the DB instance.
• If a setting has Yes in that column, and you want a different setting, you can either use Standard
create to create the DB instance, or modify the DB instance after you create it to change the
setting.
12. Choose Create database.
To view the master username and password for the DB instance, choose View credential details.
You can use the username and password that appears to connect to the DB instance as the master
user.
230
Amazon Relational Database Service User Guide
Step 3: Connect your SQL client to an Oracle DB instance
Important
You can't view the master user password again. If you don't record it, you might have to
change it.
If you need to change the master user password after the DB instance is available, you can
modify the DB instance to do so. For more information about modifying a DB instance, see
Modifying an Amazon RDS DB instance (p. 401).
13. In the Databases list, choose the name of the new Oracle DB instance to show its details.
When the status changes to Available, you can connect to the DB instance. Depending on the DB
instance class and the amount of storage, it can take up to 20 minutes before the new instance is
available. While the DB instance is being created, you can move on to the next step and create an
EC2 instance.
1. Find the endpoint (DNS name) and port number for your DB instance.
a. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
b. In the upper-right corner of the Amazon RDS console, choose the AWS Region for the DB
instance.
c. In the navigation pane, choose Databases.
d. Choose the Oracle DB instance name to display its details.
e. On the Connectivity & security tab, copy the endpoint. Also, note the port number. You need
both the endpoint and the port number to connect to the DB instance.
231
Amazon Relational Database Service User Guide
Step 3: Connect your SQL client to an Oracle DB instance
2. Connect to the EC2 instance that you created earlier by following the steps in Connect to your Linux
instance in the Amazon EC2 User Guide for Linux Instances.
We recommend that you connect to your EC2 instance using SSH. If the SSH client utility is installed
on Windows, Linux, or Mac, you can connect to the instance using the following command format:
3. Get the latest bug fixes and security updates by updating the software on your EC2 instance. To do
so, use the following command.
Note
The -y option installs the updates without asking for confirmation. To examine updates
before installing, omit this option.
232
Amazon Relational Database Service User Guide
Step 3: Connect your SQL client to an Oracle DB instance
• https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-
basic-21.9.0.0.0-1.el8.x86_64.rpm
• https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-instantclient-
sqlplus-21.9.0.0.0-1.el8.x86_64.rpm
6. In your SSH session, run the wget command to the download the .rpm files from the links that you
obtained in the previous step. The following example downloads the .rpm files for Oracle Database
version 21.9:
wget https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-
instantclient-basic-21.9.0.0.0-1.el8.x86_64.rpm
wget https://download.oracle.com/otn_software/linux/instantclient/219000/oracle-
instantclient-sqlplus-21.9.0.0.0-1.el8.x86_64.rpm
8. Start SQL*Plus and connect to the Oracle DB instance. For example, enter the following command.
sqlplus admin@oracle-db-instance-endpoint:1521/DATABASE
After you enter the password for the user, you should see output similar to the following.
Enter password:
Last Successful login time: Wed Mar 01 2023 16:30:52 +00:00
Connected to:
Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
Version 19.18.0.0.0
SQL>
For more information about connecting to an RDS for Oracle DB instance, see Connecting to your
RDS for Oracle DB instance (p. 1806). If you can't connect to your DB instance, see Can't connect to
Amazon RDS DB instance (p. 2727).
For security, it is a best practice to use encrypted connections. Only use an unencrypted
Oracle connection when the client and server are in the same VPC and the network is
trusted. For information about using encrypted connections, see Securing Oracle DB instance
connections (p. 1816).
9. Run SQL commands.
For example, the following SQL command shows the current date:
233
Amazon Relational Database Service User Guide
Step 4: Delete the EC2 instance and DB instance
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the navigation pane, choose Instances.
3. Select the EC2 instance, and choose Instance state, Terminate instance.
4. Choose Terminate when prompted for confirmation.
For more information about deleting an EC2 instance, see Terminate your instance in the Amazon EC2
User Guide for Linux Instances.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases.
3. Choose the DB instance that you want to delete.
4. For Actions, choose Delete.
5. Clear Create final snapshot? and Retain automated backups.
6. Complete the acknowledgement and choose Delete.
234
Amazon Relational Database Service User Guide
Creating and connecting to a PostgreSQL DB instance
After you complete the tutorial, there is a public and private subnet in each Availability Zone in your VPC.
In one Availability Zone, the EC2 instance is in the public subnet, and the DB instance is in the private
subnet.
Important
There's no charge for creating an AWS account. However, by completing this tutorial, you might
incur costs for the AWS resources you use. You can delete these resources after you complete
the tutorial if they are no longer needed.
The following diagram shows the configuration when the tutorial is complete.
This tutorial uses Easy create to create a DB instance running PostgreSQL with the AWS Management
Console. With Easy create, you specify only the DB engine type, DB instance size, and DB instance
identifier. Easy create uses the default settings for the other configuration options. The DB instance
created by Easy create is private.
When you use Standard create instead of Easy create, you can specify more configuration options when
you create a DB instance, including ones for availability, security, backups, and maintenance. To create
a public DB instance, you must use Standard create. For information about creating DB instances with
Standard create, see Creating an Amazon RDS DB instance (p. 300).
Topics
• Prerequisites (p. 236)
• Step 1: Create an EC2 instance (p. 236)
• Step 2: Create a PostgreSQL DB instance (p. 240)
• Step 3: Connect to a PostgreSQL DB instance (p. 245)
235
Amazon Relational Database Service User Guide
Prerequisites
Prerequisites
Before you begin, complete the steps in the following sections:
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the upper-right corner of the AWS Management Console, choose the AWS Region in which you
want to create the EC2 instance.
3. Choose EC2 Dashboard, and then choose Launch instance, as shown in the following image.
236
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
237
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
For more information about creating a new key pair, see Create a key pair in the Amazon EC2
User Guide for Linux Instances.
e. For Allow SSH traffic in Network settings, choose the source of SSH connections to the EC2
instance.
You can choose My IP if the displayed IP address is correct for SSH connections. Otherwise, you
can determine the IP address to use to connect to EC2 instances in your VPC using Secure Shell
(SSH). To determine your public IP address, in a different browser window or tab, you can use
the service at https://checkip.amazonaws.com. An example of an IP address is 192.0.2.1/32.
In many cases, you might connect through an internet service provider (ISP) or from behind your
firewall without a static IP address. If so, make sure to determine the range of IP addresses used
by client computers.
Warning
If you use 0.0.0.0/0 for SSH access, you make it possible for all IP addresses to access
your public EC2 instances using SSH. This approach is acceptable for a short time in a
test environment, but it's unsafe for production environments. In production, authorize
only a specific IP address or range of addresses to access your EC2 instances using SSH.
238
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance
239
Amazon Relational Database Service User Guide
Step 2: Create a PostgreSQL DB instance
6. Choose the EC2 instance identifier to open the list of EC2 instances, and then select your EC2
instance.
7. In the Details tab, note the following values, which you need when you connect using SSH:
8. Wait until the Instance state for your EC2 instance has a status of Running before continuing.
240
Amazon Relational Database Service User Guide
Step 2: Create a PostgreSQL DB instance
In this example, you use Easy create to create a DB instance running the PostgreSQL database engine
with a db.t3.micro DB instance class.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the upper-right corner of the Amazon RDS console, choose the AWS Region in which you want to
create the DB instance.
3. In the navigation pane, choose Databases.
4. Choose Create database and make sure that Easy create is chosen.
The Create database page should look similar to the following image.
241
Amazon Relational Database Service User Guide
Step 2: Create a PostgreSQL DB instance
9. To use an automatically generated master password for the DB instance, select Auto generate a
password.
To enter your master password, make sure Auto generate a password is cleared, and then enter the
same password in Master password and Confirm password.
10. To set up a connection with the EC2 instance you created previously, open Set up EC2 connection -
optional.
Select Connect to an EC2 compute resource. Choose the EC2 instance you created previously.
242
Amazon Relational Database Service User Guide
Step 2: Create a PostgreSQL DB instance
243
Amazon Relational Database Service User Guide
Step 2: Create a PostgreSQL DB instance
You can examine the default settings used with Easy create. The Editable after database is created
column shows which options you can change after you create the database.
• If a setting has No in that column, and you want a different setting, you can use Standard create
to create the DB instance.
• If a setting has Yes in that column, and you want a different setting, you can either use Standard
create to create the DB instance, or modify the DB instance after you create it to change the
setting.
12. Choose Create database.
To view the master username and password for the DB instance, choose View credential details.
You can use the username and password that appears to connect to the DB instance as the master
user.
244
Amazon Relational Database Service User Guide
Step 3: Connect to a PostgreSQL DB instance
Important
You can't view the master user password again. If you don't record it, you might have to
change it.
If you need to change the master user password after the DB instance is available, you can
modify the DB instance to do so. For more information about modifying a DB instance, see
Modifying an Amazon RDS DB instance (p. 401).
13. In the Databases list, choose the name of the new PostgreSQL DB instance to show its details.
When the status changes to Available, you can connect to the DB instance. Depending on the DB
instance class and the amount of storage, it can take up to 20 minutes before the new instance is
available.
1. Find the endpoint (DNS name) and port number for your DB instance.
a. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
b. In the upper-right corner of the Amazon RDS console, choose the AWS Region for the DB
instance.
c. In the navigation pane, choose Databases.
d. Choose the PostgreSQL DB instance name to display its details.
e. On the Connectivity & security tab, copy the endpoint. Also note the port number. You need
both the endpoint and the port number to connect to the DB instance.
245
Amazon Relational Database Service User Guide
Step 3: Connect to a PostgreSQL DB instance
2. Connect to the EC2 instance that you created earlier by following the steps in Connect to your Linux
instance in the Amazon EC2 User Guide for Linux Instances.
We recommend that you connect to your EC2 instance using SSH. If the SSH client utility is installed
on Windows, Linux, or Mac, you can connect to the instance using the following command format:
246
Amazon Relational Database Service User Guide
Step 3: Connect to a PostgreSQL DB instance
3. Get the latest bug fixes and security updates by updating the software on your EC2 instance. To do
this, use the following command.
Note
The -y option installs the updates without asking for confirmation. To examine updates
before installing, omit this option.
4. To install the psql command-line client from PostgreSQL on Amazon Linux 2023, run the following
command:
5. Connect to the PostgreSQL DB instance. For example, enter the following command at a command
prompt on a client computer. This action lets you connect to the PostgreSQL DB instance using the
psql client.
Substitute the DB instance endpoint (DNS name) for endpoint, substitute the database name --
dbname that you want to connect to for postgres, and substitute the master username that you
used for postgres. Provide the master password that you used when prompted for a password.
After you enter the password for the user, you should see output similar to the following:
postgres=>
For security, it is a best practice to use encrypted connections. Only use an unencrypted PostgreSQL
connection when the client and server are in the same VPC and the network is trusted. For
information about using encrypted connections, see Connecting to a PostgreSQL DB instance over
SSL (p. 2174).
6. Run SQL commands.
For example, the following SQL command shows the current date and time:
SELECT CURRENT_TIMESTAMP;
247
Amazon Relational Database Service User Guide
Step 4: Delete the EC2 instance and DB instance
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the navigation pane, choose Instances.
3. Select the EC2 instance, and choose Instance state, Terminate instance.
4. Choose Terminate when prompted for confirmation.
For more information about deleting an EC2 instance, see Terminate your instance in the Amazon EC2
User Guide for Linux Instances.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases.
3. Choose the DB instance that you want to delete.
4. For Actions, choose Delete.
5. Clear Create final snapshot? and Retain automated backups.
6. Complete the acknowledgement and choose Delete.
248
Amazon Relational Database Service User Guide
Tutorial: Create a web server
and an Amazon RDS DB instance
In the tutorial that follows, you create an EC2 instance that uses the default VPC, subnets, and security
group for your AWS account. This tutorial shows you how to create the DB instance and automatically set
up connectivity with the EC2 instance that you created. The tutorial then shows you how to install the
web server on the EC2 instance. You connect your web server to your DB instance in the VPC using the
DB instance endpoint.
The following diagram shows the configuration when the tutorial is complete.
249
Amazon Relational Database Service User Guide
Launch an EC2 instance
Note
After you complete the tutorial, there is a public and private subnet in each Availability Zone
in your VPC. This tutorial uses the default VPC for your AWS account and automatically sets up
connectivity between your EC2 instance and DB instance. If you would rather configure a new
VPC for this scenario instead, complete the tasks in Tutorial: Create a VPC for use with a DB
instance (IPv4 only) (p. 2706).
1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://
console.aws.amazon.com/ec2/.
2. In the upper-right corner of the AWS Management Console, choose the AWS Region where you want
to create the EC2 instance.
3. Choose EC2 Dashboard, and then choose Launch instance, as shown following.
250
Amazon Relational Database Service User Guide
Launch an EC2 instance
251
Amazon Relational Database Service User Guide
Launch an EC2 instance
For more information about creating a new key pair, see Create a key pair in the Amazon EC2
User Guide for Linux Instances.
e. Under Network settings, set these values and keep the other values as their defaults:
• For Allow SSH traffic from, choose the source of SSH connections to the EC2 instance.
You can choose My IP if the displayed IP address is correct for SSH connections.
Otherwise, you can determine the IP address to use to connect to EC2 instances in your VPC
using Secure Shell (SSH). To determine your public IP address, in a different browser window
or tab, you can use the service at https://checkip.amazonaws.com. An example of an IP
address is 203.0.113.25/32.
In many cases, you might connect through an internet service provider (ISP) or from behind
your firewall without a static IP address. If so, make sure to determine the range of IP
addresses used by client computers.
Warning
If you use 0.0.0.0/0 for SSH access, you make it possible for all IP addresses to
access your public instances using SSH. This approach is acceptable for a short time
252
Amazon Relational Database Service User Guide
Launch an EC2 instance
253
Amazon Relational Database Service User Guide
Launch an EC2 instance
6. Choose the EC2 instance identifier to open the list of EC2 instances, and then select your EC2
instance.
7. In the Details tab, note the following values, which you need when you connect using SSH:
8. Wait until Instance state for your instance is Running before continuing.
9. Complete Create an Amazon RDS DB instance (p. 255).
254
Amazon Relational Database Service User Guide
Create a 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 upper-right corner of the AWS Management Console, check the AWS Region. It should be
the same as the one where you created your EC2 instance.
3. In the navigation pane, choose Databases.
4. Choose Create database.
5. On the Create database page, choose Standard create.
6. For Engine options, choose MySQL.
7. For Templates, choose Free tier.
255
Amazon Relational Database Service User Guide
Create a DB instance
256
Amazon Relational Database Service User Guide
Create a DB instance
257
Amazon Relational Database Service User Guide
Create a DB instance
13. In the Database authentication section, make sure Password authentication is selected.
14. Open the Additional configuration section, and enter sample for Initial database name. Keep
the default settings for the other options.
15. To create your MySQL DB instance, choose Create database.
Your new DB instance appears in the Databases list with the status Creating.
16. Wait for the Status of your new DB instance to show as Available. Then choose the DB instance
name to show its details.
17. In the Connectivity & security section, view the Endpoint and Port of the DB instance.
258
Amazon Relational Database Service User Guide
Create a DB instance
Note the endpoint and port for your DB instance. You use this information to connect your web
server to your DB instance.
18. Complete Install a web server on your EC2 instance (p. 264).
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the upper-right corner of the AWS Management Console, check the AWS Region. It should be
the same as the one where you created your EC2 instance.
3. In the navigation pane, choose Databases.
4. Choose Create database.
5. On the Create database page, choose Standard create.
6. For Engine options, choose PostgreSQL.
7. For Templates, choose Free tier.
259
Amazon Relational Database Service User Guide
Create a DB instance
260
Amazon Relational Database Service User Guide
Create a DB instance
261
Amazon Relational Database Service User Guide
Create a DB instance
262
Amazon Relational Database Service User Guide
Create a DB instance
13. In the Database authentication section, make sure Password authentication is selected.
14. Open the Additional configuration section, and enter sample for Initial database name. Keep
the default settings for the other options.
263
Amazon Relational Database Service User Guide
Install a web server
Your new DB instance appears in the Databases list with the status Creating.
16. Wait for the Status of your new DB instance to show as Available. Then choose the DB instance
name to show its details.
17. In the Connectivity & security section, view the Endpoint and Port of the DB instance.
Note the endpoint and port for your DB instance. You use this information to connect your web
server to your DB instance.
18. Complete Install a web server on your EC2 instance (p. 264).
264
Amazon Relational Database Service User Guide
Install a web server
To connect to your EC2 instance and install the Apache web server with PHP
1. Connect to the EC2 instance that you created earlier by following the steps in Connect to your Linux
instance in the Amazon EC2 User Guide for Linux Instances.
We recommend that you connect to your EC2 instance using SSH. If the SSH client utility is installed
on Windows, Linux, or Mac, you can connect to the instance using the following command format:
2. Get the latest bug fixes and security updates by updating the software on your EC2 instance. To do
this, use the following command.
Note
The -y option installs the updates without asking for confirmation. To examine updates
before installing, omit this option.
3. After the updates complete, install the Apache web server, PHP, and MariaDB or PostgreSQL
software using the following commands. This command installs multiple software packages and
related dependencies at the same time.
MySQL
PostgreSQL
If you receive an error, your instance probably wasn't launched with an Amazon Linux 2023 AMI. You
might be using the Amazon Linux 2 AMI instead. You can view your version of Amazon Linux using
the following command.
cat /etc/system-release
265
Amazon Relational Database Service User Guide
Install a web server
You can test that your web server is properly installed and started. To do this, enter the public
Domain Name System (DNS) name of your EC2 instance in the address bar of a web browser, for
example: http://ec2-42-8-168-21.us-west-1.compute.amazonaws.com. If your web server
is running, then you see the Apache test page.
If you don't see the Apache test page, check your inbound rules for the VPC security group that you
created in Tutorial: Create a VPC for use with a DB instance (IPv4 only) (p. 2706). Make sure that
your inbound rules include one allowing HTTP (port 80) access for the IP address to connect to the
web server.
Note
The Apache test page appears only when there is no content in the document root
directory, /var/www/html. After you add content to the document root directory, your
content appears at the public DNS address of your EC2 instance. Before this point, it
appears on the Apache test page.
5. Configure the web server to start with each system boot using the systemctl command.
To allow ec2-user to manage files in the default root directory for your Apache web server, modify the
ownership and permissions of the /var/www directory. There are many ways to accomplish this task.
In this tutorial, you add ec2-user to the apache group, to give the apache group ownership of the /
var/www directory and assign write permissions to the group.
2. Log out to refresh your permissions and include the new apache group.
exit
3. Log back in again and verify that the apache group exists with the groups command.
groups
4. Change the group ownership of the /var/www directory and its contents to the apache group.
5. Change the directory permissions of /var/www and its subdirectories to add group write
permissions and set the group ID on subdirectories created in the future.
6. Recursively change the permissions for files in the /var/www directory and its subdirectories to add
group write permissions.
266
Amazon Relational Database Service User Guide
Install a web server
Now, ec2-user (and any future members of the apache group) can add, delete, and edit files in the
Apache document root. This makes it possible for you to add content, such as a static website or a PHP
application.
Note
A web server running the HTTP protocol provides no transport security for the data that it sends
or receives. When you connect to an HTTP server using a web browser, much information is
visible to eavesdroppers anywhere along the network pathway. This information includes the
URLs that you visit, the content of web pages that you receive, and the contents (including
passwords) of any HTML forms.
The best practice for securing your web server is to install support for HTTPS (HTTP Secure).
This protocol protects your data with SSL/TLS encryption. For more information, see Tutorial:
Configure SSL/TLS with the Amazon Linux AMI in the Amazon EC2 User Guide.
To add content to the Apache web server that connects to your DB instance
1. While still connected to your EC2 instance, change the directory to /var/www and create a new
subdirectory named inc.
cd /var/www
mkdir inc
cd inc
2. Create a new file in the inc directory named dbinfo.inc, and then edit the file by calling nano (or
the editor of your choice).
>dbinfo.inc
nano dbinfo.inc
3. Add the following contents to the dbinfo.inc file. Here, db_instance_endpoint is your DB
instance endpoint, without the port, for your DB instance.
Note
We recommend placing the user name and password information in a folder that isn't part
of the document root for your web server. Doing this reduces the possibility of your security
information being exposed.
Make sure to change master password to a suitable password in your application.
<?php
define('DB_SERVER', 'db_instance_endpoint');
define('DB_USERNAME', 'tutorial_user');
define('DB_PASSWORD', 'master password');
define('DB_DATABASE', 'sample');
?>
4. Save and close the dbinfo.inc file. If you are using nano, save and close the file by using Ctrl+S
and Ctrl+X.
5. Change the directory to /var/www/html.
267
Amazon Relational Database Service User Guide
Install a web server
cd /var/www/html
6. Create a new file in the html directory named SamplePage.php, and then edit the file by calling
nano (or the editor of your choice).
>SamplePage.php
nano SamplePage.php
MySQL
if (strlen($employee_name) || strlen($employee_address)) {
AddEmployee($connection, $employee_name, $employee_address);
}
?>
268
Amazon Relational Database Service User Guide
Install a web server
<td>ID</td>
<td>NAME</td>
<td>ADDRESS</td>
</tr>
<?php
while($query_data = mysqli_fetch_row($result)) {
echo "<tr>";
echo "<td>",$query_data[0], "</td>",
"<td>",$query_data[1], "</td>",
"<td>",$query_data[2], "</td>";
echo "</tr>";
}
?>
</table>
mysqli_free_result($result);
mysqli_close($connection);
?>
</body>
</html>
<?php
$checktable = mysqli_query($connection,
269
Amazon Relational Database Service User Guide
Install a web server
return false;
}
?>
PostgreSQL
<html>
<body>
<h1>Sample page</h1>
<?php
if (!$connection){
echo "Failed to connect to PostgreSQL";
exit;
}
if (strlen($employee_name) || strlen($employee_address)) {
AddEmployee($connection, $employee_name, $employee_address);
}
?>
270
Amazon Relational Database Service User Guide
Install a web server
<tr>
<td>ID</td>
<td>NAME</td>
<td>ADDRESS</td>
</tr>
<?php
while($query_data = pg_fetch_row($result)) {
echo "<tr>";
echo "<td>",$query_data[0], "</td>",
"<td>",$query_data[1], "</td>",
"<td>",$query_data[2], "</td>";
echo "</tr>";
}
?>
</table>
pg_free_result($result);
pg_close($connection);
?>
</body>
</html>
<?php
271
Amazon Relational Database Service User Guide
Install a web server
return false;
}
?>
You can use SamplePage.php to add data to your DB instance. The data that you add is then displayed
on the page. To verify that the data was inserted into the table, install MySQL client on the Amazon EC2
instance. Then connect to the DB instance and query the table.
For information about installing the MySQL client and connecting to a DB instance, see Connecting to a
DB instance running the MySQL database engine (p. 1630).
To make sure that your DB instance is as secure as possible, verify that sources outside of the VPC can't
connect to your DB instance.
After you have finished testing your web server and your database, you should delete your DB instance
and your Amazon EC2 instance.
• To delete a DB instance, follow the instructions in Deleting a DB instance (p. 489). You don't need to
create a final snapshot.
• To terminate an Amazon EC2 instance, follow the instruction in Terminate your instance in the Amazon
EC2 User Guide.
272
Amazon Relational Database Service User Guide
Tutorial: Create a Lambda function to
access your Amazon RDS DB instance
With Amazon RDS, you can run a managed relational database in the cloud using common database
products like Microsoft SQL Server, MariaDB, MySQL, Oracle Database, and PostgreSQL. By using
Lambda to access your database, you can read and write data in response to events, such as a new
customer registering with your website. Your function, database instance, and proxy scale automatically
to meet periods of high demand.
1. Launch an RDS for MySQL database instance and a proxy in your AWS account's default VPC.
2. Create and test a Lambda function that creates a new table in your database and writes data to it.
3. Create an Amazon SQS queue and configure it to invoke your Lambda function whenever a new
message is added.
4. Test the complete setup by adding messages to your queue using the AWS Management Console and
monitoring the results using CloudWatch Logs.
• How to use Amazon RDS to create a database instance and a proxy, and connect a Lambda function to
the proxy.
• How to use Lambda to perform create and read operations on an Amazon RDS database.
• How to use Amazon SQS to invoke a Lambda function.
You can complete this tutorial using the AWS Management Console or the AWS Command Line Interface
(AWS CLI).
273
Amazon Relational Database Service User Guide
Prerequisites
Prerequisites
Before you begin, complete the steps in the following sections:
An Amazon RDS DB instance is an isolated database environment running in the AWS Cloud. An instance
can contain one or more user-created databases. Unless you specify otherwise, Amazon RDS creates
new database instances in the default VPC included in your AWS account. For more information about
Amazon VPC, see the Amazon Virtual Private Cloud User Guide.
In this tutorial, you create a new instance in your AWS account's default VPC and create a database
named ExampleDB in that instance. You can create your DB instance and database using either the AWS
Management Console or the AWS CLI.
• Leave all the remaining default options selected and scroll down to the Additional configuration
section.
• Expand this section and enter ExampleDB as the Initial database name.
7. Leave all the remaining default options selected and choose Create database.
274
Amazon Relational Database Service User Guide
Create Lambda function and proxy
You can use the RDS console to create a Lambda function and a proxy in the same VPC as the database.
Note
You can only create these associated resources when your database has completed creation and
is in Available status.
1. From the Databases page, check if your database is in the Available status. If so, proceed to the next
step. Else, wait till your database is available.
2. Select your database and choose Set up Lambda connection from Actions.
3. In the Set up Lambda connection page, choose Create new function.
The wizard completes the set up and provides a link to the Lambda console to review your new function.
Note the proxy endpoint before switching to the Lambda console.
Before you create your Lambda function, you create an execution role to give your function the
necessary permissions. For this tutorial, Lambda needs permission to manage the network connection to
the VPC containing your database instance and to poll messages from an Amazon SQS queue.
To give your Lambda function the permissions it needs, this tutorial uses IAM managed policies. These
are policies that grant permissions for many common use cases and are available in your AWS account.
For more information about using managed policies, see Policy best practices (p. 2616).
275
Amazon Relational Database Service User Guide
Create a Lambda deployment package
1. Open the Roles page of the IAM console and choose Create role.
2. For the Trusted entity type, choose AWS service, and for the Use case, choose Lambda.
3. Choose Next.
4. Add the IAM managed policies by doing the following:
Later in the tutorial, you need the Amazon Resource Name (ARN) of the execution role you just created.
1. Open the Roles page of the IAM console and choose your role (lambda-vpc-sqs-role).
2. Copy the ARN displayed in the Summary section.
The following example Python code uses the PyMySQL package to open a connection to your database.
The first time you invoke your function, it also creates a new table called Customer. The table uses the
following schema, where CustID is the primary key:
Customer(CustID, Name)
The function also uses PyMySQL to add records to this table. The function adds records using customer
IDs and names specified in messages you will add to your Amazon SQS queue.
The code creates the connection to your database outside of the handler function. Creating the
connection in the initialization code allows the connection to be re-used by subsequent invocations
of your function and improves performance. In a production application, you can also use provisioned
concurrency to initialize a requested number of database connections. These connections are available as
soon as your function is invoked.
import sys
import logging
import pymysql
import json
import os
276
Amazon Relational Database Service User Guide
Create a Lambda deployment package
# rds settings
user_name = os.environ['USER_NAME']
password = os.environ['PASSWORD']
rds_proxy_host = os.environ['RDS_PROXY_HOST']
db_name = os.environ['DB_NAME']
logger = logging.getLogger()
logger.setLevel(logging.INFO)
item_count = 0
sql_string = f"insert into Customer (CustID, Name) values({CustID}, '{Name}')"
Note
In this example, your database access credentials are stored as environment variables. In
production applications, we recommend that you use AWS Secrets Manager as a more secure
option. Note that if your Lambda function is in a VPC, to connect to Secrets Manager you need
to create a VPC endpoint. See How to connect to Secrets Manager service within a Virtual
Private Cloud to learn more.
To include the PyMySQL dependency with your function code, create a .zip deployment package. The
following commands work for Linux, macOS, or Unix:
277
Amazon Relational Database Service User Guide
Update the Lambda function
mkdir package
pip install --target package pymysql
3. Create a zip file containing your application code and the PyMySQL library. In Linux or MacOS,
run the following CLI commands. In Windows, use your preferred zip tool to create the
lambda_function.zip file. Your lambda_function.py source code file and the folders
containing your dependencies must be installed at the root of the .zip file.
cd package
zip -r ../lambda_function.zip .
cd ..
zip lambda_function.zip lambda_function.py
You can also create your deployment package using a Python virtual environment. See Deploy
Python Lambda functions with .zip file archives.
1. Open the Functions page of the Lambda console and choose your function
LambdaFunctionWithRDS.
2. Change the Runtime of the function to Python 3.10.
3. Change the Handler to lambda_function.lambda_handler.
4. In the Code tab, choose Upload from and then .zip file.
5. Select the lambda_function.zip file you created in the previous stage and choose Save.
Now configure the function with the execution role you created earlier. This grants the function the
permissions it needs to access your database instance and poll an Amazon SQS queue.
1. In the Functions page of the Lambda console, select the Configuration tab, then choose
Permissions.
2. In Execution role, choose Edit.
3. In Existing role, choose your execution role (lambda-vpc-sqs-role).
4. Choose Save.
1. In the Functions page of the Lambda console, select the Configuration tab, then choose
Environment variables.
2. Choose Edit.
3. To add your database access credentials, do the following:
a. Choose Add environment variable, then for Key enter USER_NAME and for Value enter admin.
278
Amazon Relational Database Service User Guide
Test your Lambda function in the console
b. Choose Add environment variable, then for Key enter DB_NAME and for Value enter
ExampleDB.
c. Choose Add environment variable, then for Key enter PASSWORD and for Value enter the
password you chose when you created your database.
d. Choose Add environment variable, then for Key enter RDS_PROXY_HOST and for Value enter
the RDS Proxy endpoint you noted earlier.
e. Choose Save.
You can now use the Lambda console to test your function. You create a test event which mimics the
data your function will receive when you invoke it using Amazon SQS in the final stage of the tutorial.
Your test event contains a JSON object specifying a customer ID and customer name to add to the
Customer table your function creates.
1. Open the Functions page of the Lambda console and choose your function.
2. Choose the Test section.
3. Choose Create new event and enter myTestEvent for the event name.
4. Copy the following code into Event JSON and choose Save.
{
"Records": [
{
"messageId": "059f36b4-87a3-44ab-83d2-661975830a7d",
"receiptHandle": "AQEBwJnKyrHigUMZj6rYigCgxlaS3SLy0a...",
"body": "{\n \"CustID\": 1021,\n \"Name\": \"Martha Rivera\"\n}",
"attributes": {
"ApproximateReceiveCount": "1",
"SentTimestamp": "1545082649183",
"SenderId": "AIDAIENQZJOLO23YVJ4VO",
"ApproximateFirstReceiveTimestamp": "1545082649185"
},
"messageAttributes": {},
"md5OfBody": "e4e68fb7bd0e697a0ae8f1bb342846b3",
"eventSource": "aws:sqs",
"eventSourceARN": "arn:aws:sqs:us-west-2:123456789012:my-queue",
"awsRegion": "us-west-2"
}
]
}
5. Choose Test.
279
Amazon Relational Database Service User Guide
Create an Amazon SQS queue
In the Execution results tab, you should see results similar to the following displayed in the Function
Logs:
You have successfully tested the integration of your Lambda function and Amazon RDS database
instance. Now you create the Amazon SQS queue you will use to invoke your Lambda function in the
final stage of the tutorial.
1. Open the Queues page of the Amazon SQS console and select Create queue.
2. Leave the Type as Standard and enter LambdaRDSQueue for the name of your queue.
3. Leave all the default options selected and choose Create queue.
An event source mapping is a Lambda resource which reads items from a stream or queue and invokes
a Lambda function. When you configure an event source mapping, you can specify a batch size so that
records from your stream or queue are batched together into a single payload. In this example, you
set the batch size to 1 so that your Lambda function is invoked every time you send a message to your
queue. You can configure the event source mapping using either the AWS CLI or the Lambda console.
1. Open the Functions page of the Lambda console and select your function
(LambdaFunctionWithRDS).
280
Amazon Relational Database Service User Guide
Test and monitor your setup
You are now ready to test your complete setup by adding a message to your Amazon SQS queue.
To test your complete setup, add messages to your Amazon SQS queue using the console. You then use
CloudWatch Logs to confirm that your Lambda function is writing records to your database as expected.
1. Open the Queues page of the Amazon SQS console and select your queue (LambdaRDSQueue).
2. Choose Send and receive messages and paste the following JSON into the Message body in the
Send message section.
{
"CustID": 1054,
"Name": "Richard Roe"
}
Sending your message to the queue will cause Lambda to invoke your function through your event
source mapping. To confirm that Lambda has invoked your function as expected, use CloudWatch
Logs to verify that the function has written the customer name and ID to your database table.
4. Open the Log groups page of the CloudWatch console and select the log group for your function (/
aws/lambda/LambdaFunctionWithRDS).
5. In the Log streams section, choose the most recent log stream.
Your table should contain two customer records, one from each invocation of your function. In the
log stream, you should see messages similar to the following:
281
Amazon Relational Database Service User Guide
Clean up your resources
1. Sign in to the AWS Management Console and open the Amazon SQS console at https://
console.aws.amazon.com/sqs/.
2. Select the queue you created.
3. Choose Delete.
4. Enter delete in the text box.
5. Choose Delete.
282
Amazon Relational Database Service User Guide
Tutorials in this guide
Topics
• Tutorials in this guide (p. 283)
• Tutorials in other AWS guides (p. 284)
• AWS workshop and lab content portal for Amazon RDS PostgreSQL (p. 284)
• AWS workshop and lab content portal for Amazon RDS MySQL (p. 284)
• Tutorials and sample code in GitHub (p. 285)
• Using this service with an AWS SDK (p. 285)
• Tutorial: Create a VPC for use with a DB instance (IPv4 only) (p. 2706)
Learn how to include a DB instance in a virtual private cloud (VPC) based on the Amazon VPC service.
In this case, the VPC shares data with a web server that is running on an Amazon EC2 instance in the
same VPC.
• Tutorial: Create a VPC for use with a DB instance (dual-stack mode) (p. 2711)
Learn how to include a DB instance in a virtual private cloud (VPC) based on the Amazon VPC service.
In this case, the VPC shares data with an Amazon EC2 instance in the same VPC. In this tutorial, you
create the VPC for this scenario that works with a database running in dual-stack mode.
• Tutorial: Create a web server and an Amazon RDS DB instance (p. 249)
Learn how to install an Apache web server with PHP and create a MySQL database. The web server
runs on an Amazon EC2 instance using Amazon Linux, and the MySQL database is a MySQL DB
instance. Both the Amazon EC2 instance and the DB instance run in an Amazon VPC.
• Tutorial: Restore an Amazon RDS DB instance from a DB snapshot (p. 665)
Learn how to create a Lambda function from the RDS console to access a database through a proxy,
create a table, add a few records, and retrieve the records from the table. You also learn how to invoke
the Lambda function and verify the query results.
• Tutorial: Use tags to specify which DB instances to stop (p. 466)
283
Amazon Relational Database Service User Guide
Tutorials in other AWS guides
Learn how to log a DB instance state change using Amazon EventBridge and AWS Lambda.
• Tutorial: Creating an Amazon CloudWatch alarm for Multi-AZ DB cluster replica lag (p. 713)
Learn how to create a CloudWatch alarm that sends an Amazon SNS message when replica lag for a
Multi-AZ DB cluster has exceeded a threshold. An alarm watches the ReplicaLag metric over a time
period that you specify. The action is a notification sent to an Amazon SNS topic or Amazon EC2 Auto
Scaling policy.
• Tutorial: Rotating a Secret for an AWS Database in the AWS Secrets Manager User Guide
Learn how to create a secret for an AWS database and configure the secret to rotate on a schedule.
You trigger one rotation manually, and then confirm that the new version of the secret continues to
provide access.
• Tutorials and samples in the AWS Elastic Beanstalk Developer Guide
Learn how to deploy applications that use Amazon RDS databases with AWS Elastic Beanstalk.
• Using Data from an Amazon RDS Database to Create an Amazon ML Datasource in the Amazon
Machine Learning Developer Guide
Learn how to create an Amazon Machine Learning (Amazon ML) datasource object from data stored in
a MySQL DB instance.
• Manually Enabling Access to an Amazon RDS Instance in a VPC in the Amazon QuickSight User Guide
Learn how to enable Amazon QuickSight access to an Amazon RDS DB instance in a VPC.
• Creating a DB instance
Learn how to use AWS and SQL tools(Cloudwatch, Enhanced Monitoring, Slow Query Logs,
Performance Insights, PostgreSQL Catalog Views) to understand performance issues and identify ways
to improve performance of your database.
284
Amazon Relational Database Service User Guide
Tutorials and sample code in GitHub
• Creating a DB instance
Learn how to monitor and tune your DB instance using Performance insights.
Learn how to create an application that tracks and reports on work items. This application uses
Amazon RDS, Amazon Simple Email Service, Elastic Beanstalk, and SDK for Java 2.x.
AWS SDK for C++ AWS SDK for C++ code examples
AWS SDK for Java AWS SDK for Java code examples
AWS SDK for JavaScript AWS SDK for JavaScript code examples
AWS SDK for Kotlin AWS SDK for Kotlin code examples
AWS SDK for .NET AWS SDK for .NET code examples
AWS SDK for PHP AWS SDK for PHP code examples
AWS SDK for Python (Boto3) AWS SDK for Python (Boto3) code examples
AWS SDK for Ruby AWS SDK for Ruby code examples
AWS SDK for Rust AWS SDK for Rust code examples
AWS SDK for Swift AWS SDK for Swift code examples
For examples specific to this service, see Code examples for Amazon RDS using AWS SDKs (p. 2441).
Example availability
Can't find what you need? Request a code example by using the Provide feedback link at the
bottom of this page.
285
Amazon Relational Database Service User Guide
Amazon RDS basic operational guidelines
Topics
• Amazon RDS basic operational guidelines (p. 286)
• DB instance RAM recommendations (p. 287)
• Using Enhanced Monitoring to identify operating system issues (p. 287)
• Using metrics to identify performance issues (p. 287)
• Tuning queries (p. 291)
• Best practices for working with MySQL (p. 292)
• Best practices for working with MariaDB (p. 293)
• Best practices for working with Oracle (p. 294)
• Best practices for working with PostgreSQL (p. 294)
• Best practices for working with SQL Server (p. 296)
• Working with DB parameter groups (p. 297)
• Best practices for automating DB instance creation (p. 297)
• Amazon RDS new features and best practices presentation video (p. 298)
Note
For common recommendations for Amazon RDS, see Viewing Amazon RDS
recommendations (p. 688).
• Use metrics to monitor your memory, CPU, replica lag, and storage usage. You can set up Amazon
CloudWatch to notify you when usage patterns change or when you approach the capacity of your
deployment. This way, you can maintain system performance and availability.
• Scale up your DB instance when you are approaching storage capacity limits. You should have
some buffer in storage and memory to accommodate unforeseen increases in demand from your
applications.
• Enable automatic backups and set the backup window to occur during the daily low in write IOPS.
That's when a backup is least disruptive to your database usage.
• If your database workload requires more I/O than you have provisioned, recovery after a failover
or database failure will be slow. To increase the I/O capacity of a DB instance, do any or all of the
following:
• Migrate to a different DB instance class with high I/O capacity.
• Convert from magnetic storage to either General Purpose or Provisioned IOPS storage, depending
on how much of an increase you need. For information on available storage types, see Amazon RDS
storage types (p. 101).
286
Amazon Relational Database Service User Guide
DB instance RAM recommendations
If you convert to Provisioned IOPS storage, make sure you also use a DB instance class that is
optimized for Provisioned IOPS. For information on Provisioned IOPS, see Provisioned IOPS SSD
storage (p. 104).
• If you are already using Provisioned IOPS storage, provision additional throughput capacity.
• If your client application is caching the Domain Name Service (DNS) data of your DB instances, set
a time-to-live (TTL) value of less than 30 seconds. The underlying IP address of a DB instance can
change after a failover. Caching the DNS data for an extended time can thus lead to connection
failures. Your application might try to connect to an IP address that's no longer in service.
• Test failover for your DB instance to understand how long the process takes for your particular use
case. Also test failover to ensure that the application that accesses your DB instance can automatically
connect to the new DB instance after failover occurs.
To tell if your working set is almost all in memory, check the ReadIOPS metric (using Amazon
CloudWatch) while the DB instance is under load. The value of ReadIOPS should be small and stable.
In some cases, scaling up the DB instance class to a class with more RAM results in a dramatic drop in
ReadIOPS. In these cases, your working set was not almost completely in memory. Continue to scale up
until ReadIOPS no longer drops dramatically after a scaling operation, or ReadIOPS is reduced to a very
small amount. For information on monitoring a DB instance's metrics, see Viewing metrics in the Amazon
RDS console (p. 696).
287
Amazon Relational Database Service User Guide
Viewing performance metrics
To troubleshoot performance issues, it's important to understand the baseline performance of the
system. When you set up a DB instance and run it with a typical workload, capture the average,
maximum, and minimum values of all performance metrics. Do so at a number of different intervals (for
example, one hour, 24 hours, one week, two weeks). This can give you an idea of what is normal. It helps
to get comparisons for both peak and off-peak hours of operation. You can then use this information to
identify when performance is dropping below standard levels.
If you use Multi-AZ DB clusters, monitor the time difference between the latest transaction on the writer
DB instance and the latest applied transaction on a reader DB instance. This difference is called replica
lag. For more information, see Replica lag and Multi-AZ DB clusters (p. 504).
You can view the combined Performance Insights and CloudWatch metrics in the Performance Insights
dashboard and monitor your DB instance. To use this monitoring view, Performance Insights must be
turned on for your DB instance. For information about this monitoring view, see Viewing combined
metrics in the Amazon RDS console (p. 699).
You can create a performance analysis report for a specific time period and view the insights identified
and the recommendations to resolve the issues. For more information see, Analyzing database
performance for a period of time (p. 750).
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases, and then choose a DB instance.
3. Choose Monitoring.
The dashboard provides the performance metrics. The metrics default to show the information for
the last three hours.
4. Use the numbered buttons in the upper-right to page through the additional metrics, or adjust the
settings to see more metrics.
5. Choose a performance metric to adjust the time range in order to see data for other than the
current day. You can change the Statistic, Time Range, and Period values to adjust the information
displayed. For example, you might want to see the peak values for a metric for each day of the last
two weeks. If so, set Statistic to Maximum, Time Range to Last 2 Weeks, and Period to Day.
You can also view performance metrics using the CLI or API. For more information, see Viewing metrics in
the Amazon RDS console (p. 696).
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases, and then choose a DB instance.
3. Choose Logs & events.
4. In the CloudWatch alarms section, choose Create alarm.
288
Amazon Relational Database Service User Guide
Viewing performance metrics
5. For Send notifications, choose Yes, and for Send notifications to, choose New email or SMS topic.
6. For Topic name, enter a name for the notification, and for With these recipients, enter a comma-
separated list of email addresses and phone numbers.
7. For Metric, choose the alarm statistic and metric to set.
8. For Threshold, specify whether the metric must be greater than, less than, or equal to the threshold,
and specify the threshold value.
9. For Evaluation period, choose the evaluation period for the alarm. For consecutive period(s) of,
choose the period during which the threshold must have been reached in order to trigger the alarm.
10. For Name of alarm, enter a name for the alarm.
11. Choose Create Alarm.
289
Amazon Relational Database Service User Guide
Evaluating performance metrics
CPU
Memory
• Freeable Memory – How much RAM is available on the DB instance, in megabytes. The red line in the
Monitoring tab metrics is marked at 75% for CPU, Memory and Storage Metrics. If instance memory
consumption frequently crosses that line, then this indicates that you should check your workload or
upgrade your instance.
• Swap Usage – How much swap space is used by the DB instance, in megabytes.
Disk space
• Free Storage Space – How much disk space is not currently being used by the DB instance, in
megabytes.
Input/output operations
• Read IOPS, Write IOPS – The average number of disk read or write operations per second.
• Read Latency, Write Latency – The average time for a read or write operation in milliseconds.
• Read Throughput, Write Throughput – The average number of megabytes read from or written to disk
per second.
• Queue Depth – The number of I/O operations that are waiting to be written to or read from disk.
Network traffic
• Network Receive Throughput, Network Transmit Throughput – The rate of network traffic to and from
the DB instance in bytes per second.
Database connections
• DB Connections – The number of client sessions that are connected to the DB instance.
For more detailed individual descriptions of the performance metrics available, see Monitoring Amazon
RDS metrics with Amazon CloudWatch (p. 706).
Generally speaking, acceptable values for performance metrics depend on what your baseline looks
like and what your application is doing. Investigate consistent or trending variances from your baseline.
Advice about specific types of metrics follows:
• High CPU or RAM consumption – High values for CPU or RAM consumption might be appropriate. For
example, they might be so if they are in keeping with your goals for your application (like throughput
or concurrency) and are expected.
290
Amazon Relational Database Service User Guide
Tuning queries
• Disk space consumption – Investigate disk space consumption if space used is consistently at or
above 85 percent of the total disk space. See if it is possible to delete data from the instance or archive
data to a different system to free up space.
• Network traffic – For network traffic, talk with your system administrator to understand what
expected throughput is for your domain network and internet connection. Investigate network traffic if
throughput is consistently lower than expected.
• Database connections – Consider constraining database connections if you see high numbers of
user connections in conjunction with decreases in instance performance and response time. The
best number of user connections for your DB instance will vary based on your instance class and the
complexity of the operations being performed. To determine the number of database connections,
associate your DB instance with a parameter group. In this group, set the User Connections parameter
to other than 0 (unlimited). You can either use an existing parameter group or create a new one. For
more information, see Working with parameter groups (p. 347).
• IOPS metrics – The expected values for IOPS metrics depend on disk specification and server
configuration, so use your baseline to know what is typical. Investigate if values are consistently
different than your baseline. For best IOPS performance, make sure your typical working set will fit
into memory to minimize read and write operations.
For issues with performance metrics, a first step to improve performance is to tune the most used and
most expensive queries. Tune them to see if doing so lowers the pressure on system resources. For more
information, see Tuning queries (p. 291).
If your queries are tuned and an issue persists, consider upgrading your Amazon RDS DB instance
classes (p. 11). You might upgrade it to one with more of the resource (CPU, RAM, disk space, network
bandwidth, I/O capacity) that is related to the issue.
Tuning queries
One of the best ways to improve DB instance performance is to tune your most commonly used
and most resource-intensive queries. Here, you tune them to make them less expensive to run. For
information on improving queries, use the following resources:
• MySQL – See Optimizing SELECT statements in the MySQL documentation. For additional query tuning
resources, see MySQL performance tuning and optimization resources.
• Oracle – See Database SQL Tuning Guide in the Oracle Database documentation.
• SQL Server – See Analyzing a query in the Microsoft documentation. You can also use the execution-,
index-, and I/O-related data management views (DMVs) described in System Dynamic Management
Views in the Microsoft documentation to troubleshoot SQL Server query issues.
A common aspect of query tuning is creating effective indexes. For potential index improvements
for your DB instance, see Database Engine Tuning Advisor in the Microsoft documentation. For
information on using Tuning Advisor on RDS for SQL Server, see Analyzing your database workload on
an Amazon RDS for SQL Server DB instance with Database Engine Tuning Advisor (p. 1605).
• PostgreSQL – See Using EXPLAIN in the PostgreSQL documentation to learn how to analyze a query
plan. You can use this information to modify a query or underlying tables in order to improve query
performance.
For information about how to specify joins in your query for the best performance, see Controlling the
planner with explicit JOIN clauses.
• MariaDB – See Query optimizations in the MariaDB documentation.
291
Amazon Relational Database Service User Guide
Best practices for working with MySQL
Table size
Typically, operating system constraints on file sizes determine the effective maximum table size for
MySQL databases. So, the limits usually aren't determined by internal MySQL constraints.
On a MySQL DB instance, avoid tables in your database growing too large. Although the general storage
limit is 64 TiB, provisioned storage limits restrict the maximum size of a MySQL table file to 16 TiB.
Partition your large tables so that file sizes are well under the 16 TiB limit. This approach can also
improve performance and recovery time. For more information, see MySQL file size limits in Amazon
RDS (p. 1754).
Very large tables (greater than 100 GB in size) can negatively affect performance for both reads
and writes (including DML statements and especially DDL statements). Indexes on larges tables
can significantly improve select performance, but they can also degrade the performance of DML
statements. DDL statements, such as ALTER TABLE, can be significantly slower for the large tables
because those operations might completely rebuild a table in some cases. These DDL statements might
lock the tables for the duration of the operation.
The amount of memory required by MySQL for reads and writes depends on the tables involved in the
operations. It is a best practice to have at least enough RAM to the hold the indexes of actively used
tables. To find the ten largest tables and indexes in a database, use the following query:
Number of tables
Your underlying file system might have a limit on the number of files that represent tables. However,
MySQL has no limit on the number of tables. Despite this, the total number of tables in the MySQL
InnoDB storage engine can contribute to the performance degradation, regardless of the size of those
tables. To limit the operating system impact, you can split the tables across multiple databases in the
same MySQL DB instance. Doing so might limit the number of files in a directory but won't solve the
overall problem.
When there is performance degradation because of a large number of tables (more than 10 thousand), it
is caused by MySQL working with storage files, including opening and closing them. To address this issue,
you can increase the size of the table_open_cache and table_definition_cache parameters.
However, increasing the values of those parameters might significantly increase the amount of memory
MySQL uses, and might even use all of the available memory. For more information, see How MySQL
Opens and Closes Tables in the MySQL documentation.
In addition, too many tables can significantly affect MySQL startup time. Both a clean shutdown and
restart and a crash recovery can be affected, especially in versions prior to MySQL 8.0.
We recommend having fewer than 10,000 tables total across all of the databases in a DB instance. For a
use case with a large number of tables in a MySQL database, see One Million Tables in MySQL 8.0.
292
Amazon Relational Database Service User Guide
Storage engine
Storage engine
The point-in-time restore and snapshot restore features of Amazon RDS for MySQL require a crash-
recoverable storage engine. These features are supported for the InnoDB storage engine only. Although
MySQL supports multiple storage engines with varying capabilities, not all of them are optimized for
crash recovery and data durability. For example, the MyISAM storage engine doesn't support reliable
crash recovery and might prevent a point-in-time restore or snapshot restore from working as intended.
This might result in lost or corrupt data when MySQL is restarted after a crash.
InnoDB is the recommended and supported storage engine for MySQL DB instances on Amazon RDS.
InnoDB instances can also be migrated to Aurora, while MyISAM instances can't be migrated. However,
MyISAM performs better than InnoDB if you require intense, full-text search capability. If you still choose
to use MyISAM with Amazon RDS, following the steps outlined in Automated backups with unsupported
MySQL storage engines (p. 599) can be helpful in certain scenarios for snapshot restore functionality.
If you want to convert existing MyISAM tables to InnoDB tables, you can use the process outlined in the
MySQL documentation. MyISAM and InnoDB have different strengths and weaknesses, so you should
fully evaluate the impact of making this switch on your applications before doing so.
In addition, Federated Storage Engine is currently not supported by Amazon RDS for MySQL.
Table size
Typically, operating system constraints on file sizes determine the effective maximum table size for
MariaDB databases. So, the limits usually aren't determined by internal MariaDB constraints.
On a MariaDB DB instance, avoid tables in your database growing too large. Although the general
storage limit is 64 TiB, provisioned storage limits restrict the maximum size of a MariaDB table file to 16
TiB. Partition your large tables so that file sizes are well under the 16 TiB limit. This approach can also
improve performance and recovery time.
Very large tables (greater than 100 GB in size) can negatively affect performance for both reads
and writes (including DML statements and especially DDL statements). Indexes on larges tables
can significantly improve select performance, but they can also degrade the performance of DML
statements. DDL statements, such as ALTER TABLE, can be significantly slower for the large tables
because those operations might completely rebuild a table in some cases. These DDL statements might
lock the tables for the duration of the operation.
The amount of memory required by MariaDB for reads and writes depends on the tables involved in
the operations. It is a best practice to have at least enough RAM to the hold the indexes of actively used
tables. To find the ten largest tables and indexes in a database, use the following query:
293
Amazon Relational Database Service User Guide
Number of tables
Number of tables
Your underlying file system might have a limit on the number of files that represent tables. However,
MariaDB has no limit on the number of tables. Despite this, the total number of tables in the MariaDB
InnoDB storage engine can contribute to the performance degradation, regardless of the size of those
tables. To limit the operating system impact, you can split the tables across multiple databases in the
same MariaDB DB instance. Doing so might limit the number of files in a directory but doesn’t solve the
overall problem.
When there is performance degradation because of a large number of tables (more than 10,000),
it's caused by MariaDB working with storage files. This work includes MariaDB opening and closing
storage files. To address this issue, you can increase the size of the table_open_cache and
table_definition_cache parameters. However, increasing the values of those parameters might
significantly increase the amount of memory MariaDB uses. It might even use all of the available
memory. For more information, see Optimizing table_open_cache in the MariaDB documentation.
In addition, too many tables can significantly affect MariaDB startup time. Both a clean shutdown and
restart and a crash recovery can be affected. We recommend having fewer than ten thousand tables total
across all of the databases in a DB instance.
Storage engine
The point-in-time restore and snapshot restore features of Amazon RDS for MariaDB require a crash-
recoverable storage engine. Although MariaDB supports multiple storage engines with varying
capabilities, not all of them are optimized for crash recovery and data durability. For example, although
Aria is a crash-safe replacement for MyISAM, it might still prevent a point-in-time restore or snapshot
restore from working as intended. This might result in lost or corrupt data when MariaDB is restarted
after a crash. InnoDB is the recommended and supported storage engine for MariaDB DB instances on
Amazon RDS. If you still choose to use Aria with Amazon RDS, following the steps outlined in Automated
backups with unsupported MariaDB storage engines (p. 600) can be helpful in certain scenarios for
snapshot restore functionality.
If you want to convert existing MyISAM tables to InnoDB tables, you can use the process outlined in the
MariaDB documentation. MyISAM and InnoDB have different strengths and weaknesses, so you should
fully evaluate the impact of making this switch on your applications before doing so.
A 2020 AWS virtual workshop included a presentation on running production Oracle databases on
Amazon RDS. A video of the presentation is available here.
For information on how Amazon RDS implements other common PostgreSQL DBA tasks, see Common
DBA tasks for Amazon RDS for PostgreSQL (p. 2270).
294
Amazon Relational Database Service User Guide
Loading data into a PostgreSQL DB instance
Modify your DB parameter group to include the following settings. Also, test the parameter settings to
find the most efficient settings for your DB instance.
• Increase the value of the maintenance_work_mem parameter. For more information about
PostgreSQL resource consumption parameters, see the PostgreSQL documentation.
• Increase the value of the max_wal_size and checkpoint_timeout parameters to reduce the
number of writes to the write-ahead log (WAL) log.
• Disable the synchronous_commit parameter.
• Disable the PostgreSQL autovacuum parameter.
• Make sure that none of the tables you're importing are unlogged. Data stored in unlogged tables can
be lost during a failover. For more information, see CREATE TABLE UNLOGGED.
Use the pg_dump -Fc (compressed) or pg_restore -j (parallel) commands with these settings.
After the load operation completes, return your DB instance and DB parameters to their normal settings.
Your database administrator needs to know and understand this maintenance operation. For the
PostgreSQL documentation on autovacuum, see The Autovacuum Daemon.
Autovacuum is not a "resource free" operation, but it works in the background and yields to user
operations as much as possible. When enabled, autovacuum checks for tables that have had a large
number of updated or deleted tuples. It also protects against loss of very old data due to transaction ID
wraparound. For more information, see Preventing transaction ID wraparound failures.
Autovacuum should not be thought of as a high-overhead operation that can be reduced to gain better
performance. On the contrary, tables that have a high velocity of updates and deletes will quickly
deteriorate over time if autovacuum is not run.
Important
Not running autovacuum can result in an eventual required outage to perform a much more
intrusive vacuum operation. In some cases, an RDS for PostgreSQL DB instance might become
unavailable because of an over-conservative use of autovacuum. In these cases, the PostgreSQL
database shuts down to protect itself. At that point, Amazon RDS must perform a single-user-
mode full vacuum directly on the DB instance. This full vacuum can result in a multi-hour
295
Amazon Relational Database Service User Guide
Amazon RDS for PostgreSQL best practices video
outage. Thus, we strongly recommend that you do not turn off autovacuum, which is turned on
by default.
The autovacuum parameters determine when and how hard autovacuum works.
Theautovacuum_vacuum_threshold and autovacuum_vacuum_scale_factor parameters
determine when autovacuum is run. The autovacuum_max_workers, autovacuum_nap_time,
autovacuum_cost_limit, and autovacuum_cost_delay parameters determine how hard
autovacuum works. For more information about autovacuum, when it runs, and what parameters are
required, see Routine Vacuuming in the PostgreSQL documentation.
The following query shows the number of "dead" tuples in a table named table1:
• Use Amazon RDS DB events to monitor failovers. For example, you can be notified by text message
or email when a DB instance fails over. For more information about Amazon RDS events, see Working
with Amazon RDS event notification (p. 855).
• If your application caches DNS values, set time to live (TTL) to less than 30 seconds. Setting TTL as so
is a good practice in case there is a failover. In a failover, the IP address might change and the cached
value might no longer be in service.
• We recommend that you do not enable the following modes because they turn off transaction logging,
which is required for Multi-AZ:
• Simple recover mode
• Offline mode
• Read-only mode
• Test to determine how long it takes for your DB instance to failover. Failover time can vary due to
the type of database, the instance class, and the storage type you use. You should also test your
application's ability to continue working if a failover occurs.
• To shorten failover time, do the following:
• Ensure that you have sufficient Provisioned IOPS allocated for your workload. Inadequate I/O can
lengthen failover times. Database recovery requires I/O.
• Use smaller transactions. Database recovery relies on transactions, so if you can break up large
transactions into multiple smaller transactions, your failover time should be shorter.
296
Amazon Relational Database Service User Guide
Amazon RDS for SQL Server best practices video
• Take into consideration that during a failover, there will be elevated latencies. As part of the failover
process, Amazon RDS automatically replicates your data to a new standby instance. This replication
means that new data is being committed to two different DB instances. So there might be some
latency until the standby DB instance has caught up to the new primary DB instance.
• Deploy your applications in all Availability Zones. If an Availability Zone does go down, your
applications in the other Availability Zones will still be available.
When working with a Multi-AZ deployment of SQL Server, remember that Amazon RDS creates replicas
for all SQL Server databases on your instance. If you don't want specific databases to have secondary
replicas, set up a separate DB instance that doesn't use Multi-AZ for those databases.
For information about backing up your DB instance, see Backing up and restoring (p. 590).
To determine the preferred minor version, you can run the describe-db-engine-versions command
with the --default-only option as shown in the following example.
{
"DBEngineVersions": [
{
"Engine": "postgres",
"EngineVersion": "12.5",
"DBParameterGroupFamily": "postgres12",
"DBEngineDescription": "PostgreSQL",
"DBEngineVersionDescription": "PostgreSQL 12.5-R1",
...some output truncated...
}
]
}
297
Amazon Relational Database Service User Guide
Amazon RDS new features and
best practices presentation video
298
Amazon Relational Database Service User Guide
You can configure a DB instance with an option group and a DB parameter group.
• An option group specifies features, called options, that are available for a particular Amazon RDS DB
instance.
• A DB parameter group acts as a container for engine configuration values that are applied to one or
more DB instances.
The options and parameters that are available depend on the DB engine and DB engine version. You can
specify an option group and a DB parameter group when you create a DB instance. You can also modify a
DB instance to specify them.
Topics
• Creating an Amazon RDS DB instance (p. 300)
• Creating Amazon RDS resources with AWS CloudFormation (p. 324)
• Connecting to an Amazon RDS DB instance (p. 325)
• Working with option groups (p. 331)
• Working with parameter groups (p. 347)
• Creating an Amazon ElastiCache cluster using Amazon RDS DB instance settings (p. 374)
299
Amazon Relational Database Service User Guide
Creating a DB instance
Topics
• DB instance prerequisites (p. 300)
• Creating a DB instance (p. 303)
• Settings for DB instances (p. 308)
DB instance prerequisites
Important
Before you can create an Amazon RDS DB instance, you must complete the tasks in Setting up
for Amazon RDS (p. 174).
Topics
• Configure the network for the DB instance (p. 300)
• Additional prerequisites (p. 303)
To set up connectivity between your new DB instance and an Amazon EC2 instance in the same VPC,
do so when you create the DB instance. To connect to your DB instance from resources other than EC2
instances in the same VPC, configure the network connections manually.
Topics
• Configure automatic network connectivity with an EC2 instance (p. 300)
• Configure the network manually (p. 303)
The following are requirements for connecting an EC2 instance with the DB instance:
• The EC2 instance must exist in the AWS Region before you create the DB instance.
If no EC2 instances exist in the AWS Region, the console provides a link to create one.
• The user who is creating the DB instance must have permissions to perform the following operations:
• ec2:AssociateRouteTable
300
Amazon Relational Database Service User Guide
Prerequisites
• ec2:AuthorizeSecurityGroupEgress
• ec2:AuthorizeSecurityGroupIngress
• ec2:CreateRouteTable
• ec2:CreateSubnet
• ec2:CreateSecurityGroup
• ec2:DescribeInstances
• ec2:DescribeNetworkInterfaces
• ec2:DescribeRouteTables
• ec2:DescribeSecurityGroups
• ec2:DescribeSubnets
• ec2:ModifyNetworkInterfaceAttribute
• ec2:RevokeSecurityGroupEgress
Using this option creates a private DB instance. The DB instance uses a DB subnet group with only private
subnets to restrict access to resources within the VPC.
To connect an EC2 instance to the DB instance, choose Connect to an EC2 compute resource in the
Connectivity section on the Create database page.
When you choose Connect to an EC2 compute resource, RDS sets the following options automatically.
You can't change these settings unless you choose not to set up connectivity with an EC2 instance by
choosing Don't connect to an EC2 compute resource.
Network type RDS sets network type to IPv4. Currently, dual-stack mode isn't supported
when you set up a connection between an EC2 instance and the DB
instance.
Virtual Private Cloud (VPC) RDS sets the VPC to the one associated with the EC2 instance.
DB subnet group RDS requires a DB subnet group with a private subnet in the same
Availability Zone as the EC2 instance. If a DB subnet group that meets this
requirement exists, then RDS uses the existing DB subnet group. By default,
this option is set to Automatic setup.
301
Amazon Relational Database Service User Guide
Prerequisites
When a private subnet is available, RDS uses the route table associated
with the subnet and adds any subnets it creates to this route table. When
no private subnet is available, RDS creates a route table without internet
gateway access and adds the subnets it creates to the route table.
RDS also allows you to use existing DB subnet groups. Select Choose
existing if you want to use an existing DB subnet group of your choice.
Public access RDS chooses No so that the DB instance isn't publicly accessible.
For security, it is a best practice to keep the database private and make sure
it isn't accessible from the internet.
VPC security group (firewall) RDS creates a new security group that is associated with the DB instance.
The security group is named rds-ec2-n, where n is a number. This security
group includes an inbound rule with the EC2 VPC security group (firewall)
as the source. This security group that is associated with the DB instance
allows the EC2 instance to access the DB instance.
RDS also creates a new security group that is associated with the EC2
instance. The security group is named ec2-rds-n, where n is a number.
This security group includes an outbound rule with the VPC security
group of the DB instance as the source. This security group allows the EC2
instance to send traffic to the DB instance.
You can add another new security group by choosing Create new and
typing the name of the new security group.
You can add existing security groups by choosing Choose existing and
selecting security groups to add.
Availability Zone When you choose Single DB instance in Availability & durability (Single-
AZ deployment), RDS chooses the Availability Zone of the EC2 instance.
For more information about these settings, see Settings for DB instances (p. 308).
If you change these settings after the DB instance is created, the changes might affect the connection
between the EC2 instance and the DB instance.
302
Amazon Relational Database Service User Guide
Creating a DB instance
By default, Amazon RDS creates the DB instance an Availability Zone automatically for you. To choose
a specific Availability Zone, you need to change the Availability & durability setting to Single DB
instance. Doing so exposes an Availability Zone setting that lets you choose from among the Availability
Zones in your VPC. However, if you choose a Multi-AZ deployment, RDS chooses the Availability Zone of
the primary or writer DB instance automatically, and the Availability Zone setting doesn't appear.
In some cases, you might not have a default VPC or haven't created a VPC. In these cases, you can have
Amazon RDS automatically create a VPC for you when you create a DB instance using the console.
Otherwise, do the following:
• Create a VPC with at least one subnet in each of at least two of the Availability Zones in the AWS
Region where you want to deploy your DB instance. For more information, see Working with a DB
instance in a VPC (p. 2689) and Tutorial: Create a VPC for use with a DB instance (IPv4 only) (p. 2706).
• Specify a VPC security group that authorizes connections to your DB instance. For more information,
see Provide access to your DB instance in your VPC by creating a security group (p. 177) and
Controlling access with security groups (p. 2680).
• Specify an RDS DB subnet group that defines at least two subnets in the VPC that can be used by the
DB instance. For more information, see Working with DB subnet groups (p. 2689).
If you want to connect to a resource that isn't in the same VPC as the DB instance, see the appropriate
scenarios in Scenarios for accessing a DB instance in a VPC (p. 2701).
Additional prerequisites
Before you create your DB instance, consider the following additional prerequisites:
• If you are connecting to AWS using AWS Identity and Access Management (IAM) credentials, your AWS
account must have certain IAM policies. These grant the permissions required to perform Amazon RDS
operations. For more information, see Identity and access management for Amazon RDS (p. 2606).
To use IAM to access the RDS console, sign in to the AWS Management Console with your IAM user
credentials. Then go to the Amazon RDS console at https://console.aws.amazon.com/rds/.
• To tailor the configuration parameters for your DB instance, specify a DB parameter group with the
required parameter settings. For information about creating or modifying a DB parameter group, see
Working with parameter groups (p. 347).
• Determine the TCP/IP port number to specify for your DB instance. The firewalls at some companies
block connections to the default ports for RDS DB instances. If your company firewall blocks the
default port, choose another port for your DB instance.
Creating a DB instance
You can create an Amazon RDS DB instance using the AWS Management Console, the AWS CLI, or the
RDS API.
Console
You can create a DB instance by using the AWS Management Console with Easy create enabled or
not enabled. With Easy create enabled, you specify only the DB engine type, DB instance size, and DB
303
Amazon Relational Database Service User Guide
Creating a DB instance
instance identifier. Easy create uses the default setting for other configuration options. With Easy create
not enabled, you specify more configuration options when you create a database, including ones for
availability, security, backups, and maintenance.
Note
In the following procedure, Standard create is enabled, and Easy create isn't enabled. This
procedure uses Microsoft SQL Server as an example.
For examples that use Easy create to walk you through creating and connecting to sample DB
instances for each engine, see Getting started with Amazon RDS (p. 180).
To create a 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 upper-right corner of the Amazon RDS console, choose the AWS Region in which you want to
create the DB instance.
3. In the navigation pane, choose Databases.
4. Choose Create database, then choose Standard create.
5. For Engine type, choose MariaDB, Microsoft SQL Server, MySQL, Oracle, or PostgreSQL.
304
Amazon Relational Database Service User Guide
Creating a DB instance
6. For Database management type, if you're using Oracle or SQL Server choose Amazon RDS or
Amazon RDS Custom.
Amazon RDS is shown here. For more information on RDS Custom, see Working with Amazon RDS
Custom (p. 978).
7. For Edition, if you're using Oracle or SQL Server choose the DB engine edition that you want to use.
MySQL has only one option for the edition, and MariaDB and PostgreSQL have none.
8. For Version, choose the engine version.
9. In Templates, choose the template that matches your use case. If you choose Production, the
following are preselected in a later step:
305
Amazon Relational Database Service User Guide
Creating a DB instance
You can configure connectivity between an Amazon EC2 instance and the new DB instance during
DB instance creation. For more information, see Configure automatic network connectivity with an
EC2 instance (p. 300).
12. In the Connectivity section under VPC security group (firewall), if you select Create new, a VPC
security group is created with an inbound rule that allows your local computer's IP address to access
the database.
13. For the remaining sections, specify your DB instance settings. For information about each setting,
see Settings for DB instances (p. 308).
14. Choose Create database.
If you chose to use an automatically generated password, the View credential details button
appears on the Databases page.
To view the master user name and password for the DB instance, choose View credential details.
To connect to the DB instance as the master user, use the user name and password that appear.
Important
You can't view the master user password again. If you don't record it, you might have to
change it. If you need to change the master user password after the DB instance is available,
modify the DB instance to do so. For more information about modifying a DB instance, see
Modifying an Amazon RDS DB instance (p. 401).
15. For Databases, choose the name of the new DB instance.
On the RDS console, the details for the new DB instance appear. The DB instance has a status of
Creating until the DB instance is created and ready for use. When the state changes to Available,
you can connect to the DB instance. Depending on the DB instance class and storage allocated, it can
take several minutes for the new instance to be available.
306
Amazon Relational Database Service User Guide
Creating a DB instance
AWS CLI
To create a DB instance by using the AWS CLI, call the create-db-instance command with the following
parameters:
• --db-instance-identifier
• --db-instance-class
• --vpc-security-group-ids
• --db-subnet-group
• --engine
• --master-username
• --master-user-password
• --allocated-storage
• --backup-retention-period
For information about each setting, see Settings for DB instances (p. 308).
Example
For Windows:
307
Amazon Relational Database Service User Guide
Available settings
--db-instance-class db.t3.large ^
--vpc-security-group-ids mysecuritygroup ^
--db-subnet-group mydbsubnetgroup ^
--master-username masterawsuser ^
--manage-master-user-password ^
--backup-retention-period 3
RDS API
To create a DB instance by using the Amazon RDS API, call the CreateDBInstance operation.
For information about each setting, see Settings for DB instances (p. 308).
You can create a DB instance using the console, the create-db-instance CLI command, or the
CreateDBInstance RDS API operation.
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
308
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
a non-CDB. A non-CDB uses the
traditional Oracle architecture.
Auto minor Enable auto minor version upgrade CLI option: All
version upgrade to enable your DB instance to
receive preferred minor DB engine --auto-minor-version-upgrade
version upgrades automatically
when they become available. --no-auto-minor-version-
Amazon RDS performs automatic upgrade
minor version upgrades in the
API parameter:
maintenance window.
AutoMinorVersionUpgrade
For more information, see
Automatically upgrading the minor
engine version (p. 431).
Availability zone The Availability Zone for your DB CLI option: All
instance. Use the default value of
No Preference unless you want to --availability-zone
specify an Availability Zone.
API parameter:
For more information, see Regions,
Availability Zones, and Local AvailabilityZone
Zones (p. 110).
AWS KMS key Only available if Encryption is set to CLI option: All
Enable encryption. Choose the AWS
KMS key to use for encrypting this --kms-key-id
DB instance. For more information,
see Encrypting Amazon RDS API parameter:
resources (p. 2586).
KmsKeyId
Backup The number of days that you want CLI option: All
retention period automatic backups of your DB
instance to be retained. For any --backup-retention-period
nontrivial DB instance, set this value
to 1 or greater. API parameter:
309
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
Backup window The time period during which CLI option: All
Amazon RDS automatically takes
a backup of your DB instance. --preferred-backup-window
Unless you have a specific time that
you want to have your database API parameter:
backed up, use the default of No
PreferredBackupWindow
Preference.
310
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
Character set The character set for your DB CLI option: Oracle
instance. The default value of
AL32UTF8 for the DB character --character-set-name
set is for the Unicode 5.0 UTF-8
Universal character set. You can't API parameter:
change the DB character set after
CharacterSetName
you create the DB instance.
In a single-tenant configuration, a
non-default DB character set affects
only the PDB, not the CDB. For more
information, see Overview of RDS
for Oracle CDBs (p. 1840).
Copy tags to This option copies any DB instance CLI option: All
snapshots tags to a DB snapshot when you
create a snapshot. --copy-tags-to-snapshot
CopyTagsToSnapshot
311
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
Database Choose Amazon RDS if you For the CLI and API, you specify the Oracle
management don't need to customize your database engine type.
type environment. SQL Server
312
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
Database port The port that you want to access the CLI option: All
DB instance through. The default
port is shown. --port
Note RDS API parameter:
The firewalls at some
companies block Port
connections to the default
MariaDB, MySQL, and
PostgreSQL ports. If your
company firewall blocks the
default port, enter another
port for your DB instance.
EngineVersion
313
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
StorageEncrypted
314
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
MonitoringRoleArn
Engine
Initial database The name for the database on your CLI option: All except
name DB instance. If you don't provide a SQL Server
name, Amazon RDS doesn't create a --db-name
database on the DB instance (except
for Oracle and PostgreSQL). The RDS API parameter:
name can't be a word reserved by
DBName
the database engine, and has other
constraints depending on the DB
engine.
Oracle:
PostgreSQL:
315
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
License Valid values for the license model: CLI option: All
Log exports The types of database log files to CLI option: All
publish to Amazon CloudWatch
Logs. --enable-cloudwatch-logs-
exports
For more information, see
Publishing database logs to Amazon RDS API parameter:
CloudWatch Logs (p. 898).
EnableCloudwatchLogsExports
316
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
Master The password for your master user CLI option: All
password account. The password has the
following number of printable ASCII --master-user-password
characters (excluding /, ", a space,
and @) depending on the DB engine: RDS API parameter:
Master The name that you use as the CLI option: All
username master user name to log on to
your DB instance with all database --master-username
privileges.
RDS API parameter:
• It can contain 1–16 alphanumeric
characters and underscores. MasterUsername
• Its first character must be a letter.
• It can't be a word reserved by the
database engine.
Microsoft SQL Enable Microsoft SQL Server CLI options: SQL Server
Server Windows Windows authentication, then
Authentication Browse Directory to choose the --domain
directory where you want to
allow authorized domain users --domain-iam-role-name
to authenticate with this SQL
RDS API parameters:
Server instance using Windows
Authentication. Domain
DomainIAMRoleName
317
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
National The national character set for your CLI option: Oracle
character set DB instance, commonly called the
(NCHAR) NCHAR character set. You can set --nchar-character-set-name
the national character set to either
AL16UTF16 (default) or UTF-8. You API parameter:
can't change the national character
NcharCharacterSetName
set after you create the DB instance.
318
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
319
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
320
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
RDS Proxy Choose Create an RDS Proxy to Not available when creating a DB MariaDB
create a proxy for your DB instance. instance.
Amazon RDS automatically creates MySQL
an IAM role and a Secrets Manager
secret for the proxy. PostgreSQL
321
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
Storage type The storage type for your DB CLI option: All
instance.
--storage-type
If you choose General Purpose
SSD (gp3), you can provision RDS API parameter:
additional provisioned IOPS and
storage throughput under Advanced StorageType
settings.
DBSubnetGroupName
322
Amazon Relational Database Service User Guide
Available settings
Console setting Setting description CLI option and RDS API parameter Supported
DB engines
Time zone The time zone for your DB instance. CLI option: SQL Server
If you don't choose a time zone,
your DB instance uses the default --timezone RDS Custom
time zone. You can't change the for SQL
time zone after the DB instance is RDS API parameter: Server
created.
Timezone
For more information, see Local
time zone for Microsoft SQL Server
DB instances (p. 1371).
Virtual Private A VPC based on the Amazon VPC For the CLI and API, you specify the VPC All
Cloud (VPC) service to associate with this DB security group IDs.
instance.
VPC security The security group to associate with CLI option: All
group (firewall) the DB instance.
--vpc-security-group-ids
For more information, see Overview
of VPC security groups (p. 2680). RDS API parameter:
VpcSecurityGroupIds
323
Amazon Relational Database Service User Guide
Creating resources with AWS CloudFormation
When you use AWS CloudFormation, you can reuse your template to set up your RDS resources
consistently and repeatedly. Describe your resources once, and then provision the same resources over
and over in multiple AWS accounts and Regions.
RDS supports creating resources in AWS CloudFormation. For more information, including examples
of JSON and YAML templates for these resources, see the RDS resource type reference in the AWS
CloudFormation User Guide.
• AWS CloudFormation
• AWS CloudFormation User Guide
• AWS CloudFormation API Reference
• AWS CloudFormation Command Line Interface User Guide
324
Amazon Relational Database Service User Guide
Connecting to a DB instance
Topics
• Finding the connection information for an Amazon RDS DB instance (p. 325)
• Database authentication options (p. 328)
• Encrypted connections (p. 329)
• Scenarios for accessing a DB instance in a VPC (p. 329)
• Connecting to a DB instance that is running a specific DB engine (p. 329)
• Managing connections with RDS Proxy (p. 330)
The endpoint is unique for each DB instance, and the values of the port and user can vary. The following
list shows the most common port for each DB engine:
• MariaDB – 3306
• Microsoft SQL Server – 1433
• MySQL – 3306
• Oracle – 1521
• PostgreSQL – 5432
To connect to a DB instance, use any client for a DB engine. For example, you might use the mysql utility
to connect to a MariaDB or MySQL DB instance. You might use Microsoft SQL Server Management Studio
to connect to a SQL Server DB instance. You might use Oracle SQL Developer to connect to an Oracle DB
instance. Similarly, you might use the psql command line utility to connect to a PostgreSQL DB instance.
To find the connection information for a DB instance, use the AWS Management Console. You can
also use the AWS Command Line Interface (AWS CLI) describe-db-instances command or the RDS API
DescribeDBInstances operation.
325
Amazon Relational Database Service User Guide
Finding the connection information
Console
To find the connection information for a DB instance in the AWS Management Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases to display a list of your DB instances.
3. Choose the name of the DB instance to display its details.
4. On the Connectivity & security tab, copy the endpoint. Also, note the port number. You need both
the endpoint and the port number to connect to the DB instance.
326
Amazon Relational Database Service User Guide
Finding the connection information
5. If you need to find the master user name, choose the Configuration tab and view the Master
username value.
AWS CLI
To find the connection information for a DB instance by using the AWS CLI, call the describe-db-
instances command. In the call, query for the DB instance ID, endpoint, port, and master user name.
327
Amazon Relational Database Service User Guide
Database authentication options
For Windows:
[
[
"mydb",
"mydb.123456789012.us-east-1.rds.amazonaws.com",
3306,
"admin"
],
[
"myoracledb",
"myoracledb.123456789012.us-east-1.rds.amazonaws.com",
1521,
"dbadmin"
],
[
"mypostgresqldb",
"mypostgresqldb.123456789012.us-east-1.rds.amazonaws.com",
5432,
"postgresadmin"
]
]
RDS API
To find the connection information for a DB instance by using the Amazon RDS API, call the
DescribeDBInstances operation. In the output, find the values for the endpoint address, endpoint port,
and master user name.
• Password authentication – Your DB instance performs all administration of user accounts. You create
users and specify passwords with SQL statements. The SQL statements you can use depend on your
DB engine.
• AWS Identity and Access Management (IAM) database authentication – You don't need to use a
password when you connect to a DB instance. Instead, you use an authentication token.
• Kerberos authentication – You use external authentication of database users using Kerberos and
Microsoft Active Directory. Kerberos is a network authentication protocol that uses tickets and
symmetric-key cryptography to eliminate the need to transmit passwords over the network. Kerberos
has been built into Active Directory and is designed to authenticate users to network resources, such as
databases.
IAM database authentication and Kerberos authentication are available only for specific DB engines and
versions.
328
Amazon Relational Database Service User Guide
Encrypted connections
For more information, see Database authentication with Amazon RDS (p. 2566).
Encrypted connections
You can use Secure Socket Layer (SSL) or Transport Layer Security (TLS) from your application to encrypt
a connection to a DB instance. Each DB engine has its own process for implementing SSL/TLS. For more
information, see Using SSL/TLS to encrypt a connection to a DB instance (p. 2591).
A VPC security group controls access to DB instances inside a VPC. Each VPC security group rule enables
a specific source to access a DB instance in a VPC that is associated with that VPC security group. The
source can be a range of addresses (for example, 203.0.113.0/24), or another VPC security group. By
specifying a VPC security group as the source, you allow incoming traffic from all instances (typically
application servers) that use the source VPC security group.
Before attempting to connect to your DB instance, configure your VPC for your use case. The following
are common scenarios for accessing a DB instance in a VPC:
• A DB instance in a VPC accessed by an Amazon EC2 instance in the same VPC – A common use of a
DB instance in a VPC is to share data with an application server that is running in an EC2 instance in
the same VPC. The EC2 instance might run a web server with an application that interacts with the DB
instance.
• A DB instance in a VPC accessed by an EC2 instance in a different VPC – In some cases, your DB
instance is in a different VPC from the EC2 instance that you're using to access it. If so, you can use VPC
peering to access the DB instance.
• A DB instance in a VPC accessed by a client application through the internet – To access a DB
instance in a VPC from a client application through the internet, you configure a VPC with a single
public subnet. You also configure an internet gateway to enable communication over the internet.
To connect to a DB instance from outside of its VPC, the DB instance must be publicly accessible.
Also, access must be granted using the inbound rules of the DB instance's security group, and
other requirements must be met. For more information, see Can't connect to Amazon RDS DB
instance (p. 2727).
• A DB instance in a VPC accessed by a private network – If your DB instance isn't publicly accessible,
you can use one of the following options to access it from a private network:
• An AWS Site-to-Site VPN connection
• An AWS Direct Connect connection
• An AWS Client VPN connection
For more information, see Scenarios for accessing a DB instance in a VPC (p. 2701).
329
Amazon Relational Database Service User Guide
Managing connections with RDS Proxy
• Connecting to a DB instance running the Microsoft SQL Server database engine (p. 1380)
• Connecting to a DB instance running the MySQL database engine (p. 1630)
• Connecting to your RDS for Oracle DB instance (p. 1806)
• Connecting to a DB instance running the PostgreSQL database engine (p. 2167)
330
Amazon Relational Database Service User Guide
Working with option groups
Microsoft SQL Server Options for the Microsoft SQL Server database engine (p. 1514)
PostgreSQL PostgreSQL does not use options and option groups. PostgreSQL
uses extensions and modules to provide additional features.
For more information, see Supported PostgreSQL extension
versions (p. 2156).
To associate an option group with a DB instance, modify the DB instance. For more information, see
Modifying an Amazon RDS DB instance (p. 401).
Both DB instances and DB snapshots can be associated with an option group. In some cases, you might
restore from a DB snapshot or perform a point-in-time restore for a DB instance. In these cases, the
option group associated with the DB snapshot or DB instance is, by default, associated with the restored
DB instance. You can associate a different option group with a restored DB instance. However, the new
option group must contain any persistent or permanent options that were included in the original option
group. Persistent and permanent options are described following.
Options require additional memory to run on a DB instance. Thus, you might need to launch a larger
instance to use them, depending on your current use of your DB instance. For example, Oracle Enterprise
Manager Database Control uses about 300 MB of RAM. If you enable this option for a small DB instance,
you might encounter performance problems or out-of-memory errors.
331
Amazon Relational Database Service User Guide
Creating an option group
Persistent options can't be removed from an option group while DB instances are associated with the
option group. An example of a persistent option is the TDE option for Microsoft SQL Server transparent
data encryption (TDE). You must disassociate all DB instances from the option group before a persistent
option can be removed from the option group. In some cases, you might restore or perform a point-in-
time restore from a DB snapshot. In these cases, if the option group associated with that DB snapshot
contains a persistent option, you can only associate the restored DB instance with that option group.
Permanent options, such as the TDE option for Oracle Advanced Security TDE, can never be removed
from an option group. You can change the option group of a DB instance that is using the permanent
option. However, the option group associated with the DB instance must include the same permanent
option. In some cases, you might restore or perform a point-in-time restore from a DB snapshot. In these
cases, if the option group associated with that DB snapshot contains a permanent option, you can only
associate the restored DB instance with an option group with that permanent option.
For Oracle DB instances, you can copy shared DB snapshots that have the options Timezone or OLS
(or both). To do so, specify a target option group that includes these options when you copy the DB
snapshot. The OLS option is permanent and persistent only for Oracle DB instances running Oracle
version 12.2 or higher. For more information about these options, see Oracle time zone (p. 2087) and
Oracle Label Security (p. 2049).
VPC considerations
The option group associated with the DB instance is linked to the DB instance's VPC. This means that you
can't use the option group assigned to a DB instance if you try to restore the instance to a different VPC.
If you restore a DB instance to a different VPC, you can do one of the following:
With persistent or permanent options, such as Oracle TDE, you must create a new option group. This
option group must include the persistent or permanent option when restoring a DB instance into a
different VPC.
Option settings control the behavior of an option. For example, the Oracle Advanced Security option
NATIVE_NETWORK_ENCRYPTION has a setting that you can use to specify the encryption algorithm for
network traffic to and from the DB instance. Some options settings are optimized for use with Amazon
RDS and cannot be changed.
• Oracle Enterprise Manager Database Express (p. 2035) and Oracle Management Agent for Enterprise
Manager Cloud Control (p. 2039).
• Oracle native network encryption (p. 2057) and Oracle Secure Sockets Layer (p. 2068).
332
Amazon Relational Database Service User Guide
Creating an option group
After you create a new option group, it has no options. To learn how to add options to the option group,
see Adding an option to an option group (p. 335). After you have added the options you want, you can
then associate the option group with a DB instance. This way, the options become available on the DB
instance. For information about associating an option group with a DB instance, see the documentation
for your engine in Working with option groups (p. 331).
Console
One way of creating an option group is by using the AWS Management Console.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Option groups.
3. Choose Create group.
4. In the Create option group window, do the following:
a. For Name, type a name for the option group that is unique within your AWS account. The name
can contain only letters, digits, and hyphens.
b. For Description, type a brief description of the option group. The description is used for display
purposes.
c. For Engine, choose the DB engine that you want.
d. For Major engine version, choose the major version of the DB engine that you want.
5. To continue, choose Create. To cancel the operation instead, choose Cancel.
AWS CLI
To create an option group, use the AWS CLI create-option-group command with the following
required parameters.
• --option-group-name
• --engine-name
• --major-engine-version
• --option-group-description
Example
The following example creates an option group named testoptiongroup, which is associated with the
Oracle Enterprise Edition DB engine. The description is enclosed in quotation marks.
For Windows:
333
Amazon Relational Database Service User Guide
Copying an option group
RDS API
To create an option group, call the Amazon RDS API CreateOptionGroup operation. Include the
following parameters:
• OptionGroupName
• EngineName
• MajorEngineVersion
• OptionGroupDescription
AWS CLI
To copy an option group, use the AWS CLI copy-option-group command. Include the following required
options:
• --source-option-group-identifier
• --target-option-group-identifier
• --target-option-group-description
Example
The following example creates an option group named new-option-group, which is a local copy of the
option group my-option-group.
For Windows:
334
Amazon Relational Database Service User Guide
Adding an option to an option group
RDS API
To copy an option group, call the Amazon RDS API CopyOptionGroup operation. Include the following
required parameters.
• SourceOptionGroupIdentifier
• TargetOptionGroupIdentifier
• TargetOptionGroupDescription
• When you add an option that adds or updates a port value, such as the OEM option.
• When you add or remove an option group with an option that includes a port value.
In these cases, choose the Apply Immediately option in the console. Or you can include the --apply-
immediately option when using the AWS CLI or set the ApplyImmediately parameter to true when
using the Amazon RDS API. Options that don't include port values can be applied immediately, or can be
applied during the next maintenance window for the DB instance.
Note
If you specify a security group as a value for an option in an option group, manage the security
group by modifying the option group. You can't change or remove this security group by
modifying a DB instance. Also, the security group doesn't appear in the DB instance details in
the AWS Management Console or in the output for the AWS CLI command describe-db-
instances.
Console
You can use the AWS Management Console to add an option to an option group.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Option groups.
3. Choose the option group that you want to modify, and then choose Add option.
335
Amazon Relational Database Service User Guide
Adding an option to an option group
a. Choose the option that you want to add. You might need to provide additional values,
depending on the option that you select. For example, when you choose the OEM option, you
must also type a port value and specify a security group.
b. To enable the option on all associated DB instances as soon as you add it, for Apply
Immediately, choose Yes. If you choose No (the default), the option is enabled for each
associated DB instance during its next maintenance window.
336
Amazon Relational Database Service User Guide
Adding an option to an option group
5. When the settings are as you want them, choose Add option.
AWS CLI
To add an option to an option group, run the AWS CLI add-option-to-option-group command with the
option that you want to add. To enable the new option immediately on all associated DB instances,
include the --apply-immediately parameter. By default, the option is enabled for each associated DB
instance during its next maintenance window. Include the following required parameter:
• --option-group-name
Example
The following example adds the Oracle Enterprise Manager Database Control (OEM) option to an option
group named testoptiongroup and immediately enables it. Even if you use the default security group,
you must specify that security group.
337
Amazon Relational Database Service User Guide
Adding an option to an option group
--option-group-name testoptiongroup \
--options OptionName=OEM,Port=5500,DBSecurityGroupMemberships=default \
--apply-immediately
For Windows:
Example
The following example adds the Oracle OEM option to an option group. It also specifies a custom port
and a pair of Amazon EC2 VPC security groups to use for that port.
For Windows:
Example
The following example adds the Oracle option NATIVE_NETWORK_ENCRYPTION to an option group and
specifies the option settings. If no option settings are specified, default values are used.
338
Amazon Relational Database Service User Guide
Listing the options and option settings for an option group
For Windows:
RDS API
To add an option to an option group using the Amazon RDS API, call the ModifyOptionGroup operation
with the option that you want to add. To enable the new option immediately on all associated DB
instances, include the ApplyImmediately parameter and set it to true. By default, the option is
enabled for each associated DB instance during its next maintenance window. Include the following
required parameter:
• OptionGroupName
339
Amazon Relational Database Service User Guide
Modifying an option setting
Console
You can use the AWS Management Console to list all of the options and option settings for an option
group.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Option groups.
3. Choose the name of the option group to display its details. The options and option settings in the
option group are listed.
AWS CLI
To list the options and option settings for an option group, use the AWS CLI describe-option-
groups command. Specify the name of the option group whose options and settings you want to view.
If you don't specify an option group name, all option groups are described.
Example
The following example lists the options and option settings for all option groups.
Example
The following example lists the options and option settings for an option group named
testoptiongroup.
RDS API
To list the options and option settings for an option group, use the Amazon RDS API
DescribeOptionGroups operation. Specify the name of the option group whose options and settings
you want to view. If you don't specify an option group name, all option groups are described.
• When you add an option that adds or updates a port value, such as the OEM option.
• When you add or remove an option group with an option that includes a port value.
In these cases, choose the Apply Immediately option in the console. Or you can include the --apply-
immediately option when using the AWS CLI or set the ApplyImmediately parameter to true when
340
Amazon Relational Database Service User Guide
Modifying an option setting
using the RDS API. Options that don't include port values can be applied immediately, or can be applied
during the next maintenance window for the DB instance.
Note
If you specify a security group as a value for an option in an option group, you manage the
security group by modifying the option group. You can't change or remove this security group
by modifying a DB instance. Also, the security group doesn't appear in the DB instance details
in the AWS Management Console or in the output for the AWS CLI command describe-db-
instances.
Console
You can use the AWS Management Console to modify an option setting.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Option groups.
3. Select the option group whose option that you want to modify, and then choose Modify option.
4. In the Modify option window, from Installed Options, choose the option whose setting you want to
modify. Make the changes that you want.
5. To enable the option as soon as you add it, for Apply Immediately, choose Yes. If you choose No
(the default), the option is enabled for each associated DB instance during its next maintenance
window.
6. When the settings are as you want them, choose Modify Option.
AWS CLI
To modify an option setting, use the AWS CLI add-option-to-option-group command with the
option group and option that you want to modify. By default, the option is enabled for each associated
DB instance during its next maintenance window. To apply the change immediately to all associated
DB instances, include the --apply-immediately parameter. To modify an option setting, use the --
settings argument.
Example
The following example modifies the port that the Oracle Enterprise Manager Database Control (OEM)
uses in an option group named testoptiongroup and immediately applies the change.
For Windows:
341
Amazon Relational Database Service User Guide
Modifying an option setting
Example
The following example modifies the Oracle option NATIVE_NETWORK_ENCRYPTION and changes the
option settings.
For Windows:
342
Amazon Relational Database Service User Guide
Removing an option from an option group
RDS API
To modify an option setting, use the Amazon RDS API ModifyOptionGroup command with the option
group and option that you want to modify. By default, the option is enabled for each associated DB
instance during its next maintenance window. To apply the change immediately to all associated DB
instances, include the ApplyImmediately parameter and set it to true.
If you remove all options from an option group, Amazon RDS doesn't delete the option group. DB
instances that are associated with the empty option group continue to be associated with it; they just
won't have any active options. Alternatively, to remove all options from a DB instance, you can associate
the DB instance with the default (empty) option group.
Console
You can use the AWS Management Console to remove an option from an option group.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Option groups.
3. Select the option group whose option you want to remove, and then choose Delete option.
4. In the Delete option window, do the following:
• Select the check box for the option that you want to delete.
• For the deletion to take effect as soon as you make it, for Apply immediately, choose Yes. If you
choose No (the default), the option is deleted for each associated DB instance during its next
maintenance window.
343
Amazon Relational Database Service User Guide
Deleting an option group
5. When the settings are as you want them, choose Yes, Delete.
AWS CLI
To remove an option from an option group, use the AWS CLI remove-option-from-option-group
command with the option that you want to delete. By default, the option is removed from each
associated DB instance during its next maintenance window. To apply the change immediately, include
the --apply-immediately parameter.
Example
The following example removes the Oracle Enterprise Manager Database Control (OEM) option from an
option group named testoptiongroup and immediately applies the change.
For Windows:
RDS API
To remove an option from an option group, use the Amazon RDS API ModifyOptionGroup action. By
default, the option is removed from each associated DB instance during its next maintenance window. To
apply the change immediately, include the ApplyImmediately parameter and set it to true.
• OptionGroupName
• OptionsToRemove.OptionName
You can't delete a default option group. If you try to delete an option group that is associated with an
RDS resource, an error like the following is returned.
344
Amazon Relational Database Service User Guide
Deleting an option group
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Option groups.
3. Choose the name of the option group to show its details.
4. Check the Associated Instances and Snapshots section for the associated Amazon RDS resources.
If a DB instance is associated with the option group, modify the DB instance to use a different option
group. For more information, see Modifying an Amazon RDS DB instance (p. 401).
If a manual DB snapshot is associated with the option group, modify the DB snapshot to use a different
option group. You can do so using the AWS CLI modify-db-snapshot command.
Note
You can't modify the option group of an automated DB snapshot.
Console
One way of deleting an option group is by using the AWS Management Console.
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Option groups.
3. Choose the option group.
4. Choose Delete group.
5. On the confirmation page, choose Delete to finish deleting the option group, or choose Cancel to
cancel the deletion.
AWS CLI
To delete an option group, use the AWS CLI delete-option-group command with the following
required parameter.
• --option-group-name
Example
345
Amazon Relational Database Service User Guide
Deleting an option group
For Windows:
RDS API
To delete an option group, call the Amazon RDS API DeleteOptionGroup operation. Include the
following parameter:
• OptionGroupName
346
Amazon Relational Database Service User Guide
Working with parameter groups
You manage your database configuration by associating your DB instances and Multi-AZ DB clusters with
parameter groups. Amazon RDS defines parameter groups with default settings. You can also define your
own parameter groups with customized settings.
Note
Some DB engines offer additional features that you can add to your database as options in an
option group. For information about option groups, see Working with option groups (p. 331).
Topics
• Overview of parameter groups (p. 347)
• Working with DB parameter groups (p. 349)
• Working with DB cluster parameter groups for Multi-AZ DB clusters (p. 360)
• Comparing parameter groups (p. 368)
• Specifying DB parameters (p. 369)
Topics
• Default and custom parameter groups (p. 347)
• Static and dynamic DB instance parameters (p. 348)
• Static and dynamic DB cluster parameters (p. 348)
• Character set parameters (p. 349)
• Supported parameters and parameter values (p. 349)
You can't modify the parameter settings of a default parameter group. Instead, you can do the following:
347
Amazon Relational Database Service User Guide
Overview of parameter groups
Note
If you have modified your DB instance to use a custom parameter group, and you start the DB
instance, RDS automatically reboots the DB instance as part of the startup process.
If you update parameters within a DB parameter group, the changes apply to all DB instances that are
associated with that parameter group. Likewise, if you update parameters within a Multi-AZ DB cluster
parameter group, the changes apply to all Aurora DB clusters that are associated with that DB cluster
parameter group.
If you don't want to create a parameter group from scratch, you can copy an existing parameter group
with the AWS CLI copy-db-parameter-group command or copy-db-cluster-parameter-group command.
You might find that copying a parameter group is useful in some cases. For example, you might want to
include most of an existing DB parameter group's custom parameters and values in a new DB parameter
group.
• When you change a static parameter and save the DB parameter group, the parameter change takes
effect after you manually reboot the associated DB instances. For static parameters, the console always
uses pending-reboot for the ApplyMethod.
• When you change a dynamic parameter, by default the parameter change takes effect immediately,
without requiring a reboot. When you use the AWS Management Console to change DB instance
parameter values, it always uses immediate for the ApplyMethod for dynamic parameters. To defer
the parameter change until after you reboot an associated DB instance, use the AWS CLI or RDS API.
Set the ApplyMethod to pending-reboot for the parameter change.
Note
Using pending-reboot with dynamic parameters in the AWS CLI or RDS API on RDS for SQL
Server DB instances generates an error. Use apply-immediately on RDS for SQL Server.
For more information about using the AWS CLI to change a parameter value, see modify-db-
parameter-group. For more information about using the RDS API to change a parameter value, see
ModifyDBParameterGroup.
When you associate a new DB parameter group with a DB instance, RDS applies the modified static
and dynamic parameters only after the DB instance is rebooted. However, if you modify dynamic
parameters in the DB parameter group after you associate it with the DB instance, these changes are
applied immediately without a reboot. For more information about changing the DB parameter group,
see Modifying an Amazon RDS DB instance (p. 401).
If a DB instance isn't using the latest changes to its associated DB parameter group, the console shows
a status of pending-reboot for the DB parameter group. This status doesn't result in an automatic
reboot during the next maintenance window. To apply the latest parameter changes to that DB instance,
manually reboot the DB instance.
• When you change a static parameter and save the DB cluster parameter group, the parameter change
takes effect after you manually reboot the associated DB clusters. For static parameters, the console
always uses pending-reboot for the ApplyMethod.
• When you change a dynamic parameter, by default the parameter change takes effect immediately,
without requiring a reboot. When you use the AWS Management Console to change DB cluster
348
Amazon Relational Database Service User Guide
Working with DB parameter groups
parameter values, it always uses immediate for the ApplyMethod for dynamic parameters. To defer
the parameter change until after an associated DB cluster is rebooted, use the AWS CLI or RDS API. Set
the ApplyMethod to pending-reboot for the parameter change.
For more information about using the AWS CLI to change a parameter value, see modify-db-cluster-
parameter-group. For more information about using the RDS API to change a parameter value, see
ModifyDBClusterParameterGroup.
For some DB engines, you can change character set or collation values for an existing database using the
ALTER DATABASE command, for example:
For more information about changing the character set or collation values for a database, check the
documentation for your DB engine.
In many cases, you can specify integer and Boolean parameter values using expressions, formulas, and
functions. Functions can include a mathematical log expression. However, not all parameters support
expressions, formulas, and functions for parameter values. For more information, see Specifying DB
parameters (p. 369).
Improperly setting parameters in a parameter group can have unintended adverse effects, including
degraded performance and system instability. Always be cautious when modifying database parameters,
and back up your data before modifying a parameter group. Try parameter group setting changes on
a test DB instance or DB cluster before applying those parameter group changes to a production DB
instance or DB cluster.
Topics
• Creating a DB parameter group (p. 350)
• Associating a DB parameter group with a DB instance (p. 351)
• Modifying parameters in a DB parameter group (p. 352)
• Resetting parameters in a DB parameter group to their default values (p. 354)
• Copying a DB parameter group (p. 356)
349
Amazon Relational Database Service User Guide
Working with DB parameter groups
Default parameter group names can include a period, such as default.mysql8.0. However, custom
parameter group names can't include a period.
• The first character must be a letter.
• The name can't end with a hyphen or contain two consecutive hyphens.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. Choose Create parameter group.
AWS CLI
To create a DB parameter group, use the AWS CLI create-db-parameter-group command. The
following example creates a DB parameter group named mydbparametergroup for MySQL version 8.0
with a description of "My new parameter group."
• --db-parameter-group-name
• --db-parameter-group-family
• --description
To list all of the available parameter group families, use the following command:
Note
The output contains duplicates.
350
Amazon Relational Database Service User Guide
Working with DB parameter groups
Example
For Linux, macOS, or Unix:
For Windows:
RDS API
• DBParameterGroupName
• DBParameterGroupFamily
• Description
For information about creating a DB parameter group, see Creating a DB parameter group (p. 350).
For information about creating a DB instance, see Creating an Amazon RDS DB instance (p. 300). For
information about modifying a DB instance, see Modifying an Amazon RDS DB instance (p. 401).
Note
When you associate a new DB parameter group with a DB instance, the modified static and
dynamic parameters are applied only after the DB instance is rebooted. However, if you modify
dynamic parameters in the DB parameter group after you associate it with the DB instance,
these changes are applied immediately without a reboot.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Databases, and then choose the DB instance that you want to
modify.
3. Choose Modify. The Modify DB Instance page appears.
4. Change the DB parameter group setting.
351
Amazon Relational Database Service User Guide
Working with DB parameter groups
AWS CLI
To associate a DB parameter group with a DB instance, use the AWS CLI modify-db-instance
command with the following options:
• --db-instance-identifier
• --db-parameter-group-name
The following example associates the mydbpg DB parameter group with the database-1 DB
instance. The changes are applied immediately by using --apply-immediately. Use --no-apply-
immediately to apply the changes during the next maintenance window. For more information, see
Using the Apply Immediately setting (p. 402).
Example
For Linux, macOS, or Unix:
For Windows:
RDS API
To associate a DB parameter group with a DB instance, use the RDS API ModifyDBInstance operation
with the following parameters:
• DBInstanceName
• DBParameterGroupName
Changes to some parameters are applied to the DB instance immediately without a reboot. Changes
to other parameters are applied only after the DB instance is rebooted. The RDS console shows the
status of the DB parameter group associated with a DB instance on the Configuration tab. For example,
352
Amazon Relational Database Service User Guide
Working with DB parameter groups
suppose that the DB instance isn't using the latest changes to its associated DB parameter group. If so,
the RDS console shows the DB parameter group with a status of pending-reboot. To apply the latest
parameter changes to that DB instance, manually reboot the DB instance.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. In the list, choose the parameter group that you want to modify.
4. For Parameter group actions, choose Edit.
5. Change the values of the parameters that you want to modify. You can scroll through the
parameters using the arrow keys at the top right of the dialog box.
AWS CLI
To modify a DB parameter group, use the AWS CLI modify-db-parameter-group command with the
following required options:
353
Amazon Relational Database Service User Guide
Working with DB parameter groups
• --db-parameter-group-name
• --parameters
The following example modifies the max_connections and max_allowed_packet values in the DB
parameter group named mydbparametergroup.
Example
"ParameterName=max_allowed_packet,ParameterValue=1024,ApplyMethod=immediate"
For Windows:
"ParameterName=max_allowed_packet,ParameterValue=1024,ApplyMethod=immediate"
DBPARAMETERGROUP mydbparametergroup
RDS API
To modify a DB parameter group, use the RDS API ModifyDBParameterGroup operation with the
following required parameters:
• DBParameterGroupName
• Parameters
When you use the console, you can reset specific parameters to their default values. However, you can't
easily reset all of the parameters in the DB parameter group at once. When you use the AWS CLI or RDS
API, you can reset specific parameters to their default values. You can also reset all of the parameters in
the DB parameter group at once.
Changes to some parameters are applied to the DB instance immediately without a reboot. Changes
to other parameters are applied only after the DB instance is rebooted. The RDS console shows the
status of the DB parameter group associated with a DB instance on the Configuration tab. For example,
suppose that the DB instance isn't using the latest changes to its associated DB parameter group. If so,
the RDS console shows the DB parameter group with a status of pending-reboot. To apply the latest
parameter changes to that DB instance, manually reboot the DB instance.
354
Amazon Relational Database Service User Guide
Working with DB parameter groups
Note
In a default DB parameter group, parameters are always set to their default values.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. In the list, choose the parameter group.
4. For Parameter group actions, choose Edit.
5. Choose the parameters that you want to reset to their default values. You can scroll through the
parameters using the arrow keys at the top right of the dialog box.
AWS CLI
To reset some or all of the parameters in a DB parameter group, use the AWS CLI reset-db-
parameter-group command with the following required option: --db-parameter-group-name.
355
Amazon Relational Database Service User Guide
Working with DB parameter groups
To reset all of the parameters in the DB parameter group, specify the --reset-all-parameters
option. To reset specific parameters, specify the --parameters option.
The following example resets all of the parameters in the DB parameter group named
mydbparametergroup to their default values.
Example
For Linux, macOS, or Unix:
For Windows:
The following example resets the max_connections and max_allowed_packet options to their
default values in the DB parameter group named mydbparametergroup.
Example
For Linux, macOS, or Unix:
For Windows:
DBParameterGroupName mydbparametergroup
RDS API
To reset parameters in a DB parameter group to their default values, use the RDS
API ResetDBParameterGroup command with the following required parameter:
DBParameterGroupName.
To reset all of the parameters in the DB parameter group, set the ResetAllParameters parameter to
true. To reset specific parameters, specify the Parameters parameter.
356
Amazon Relational Database Service User Guide
Working with DB parameter groups
group by using the AWS Management Console. You can also use the AWS CLI copy-db-parameter-group
command or the RDS API CopyDBParameterGroup operation.
After you copy a DB parameter group, wait at least 5 minutes before creating your first DB instance that
uses that DB parameter group as the default parameter group. Doing this allows Amazon RDS to fully
complete the copy action before the parameter group is used. This is especially important for parameters
that are critical when creating the default database for a DB instance. An example is the character set
for the default database defined by the character_set_database parameter. Use the Parameter
Groups option of the Amazon RDS console or the describe-db-parameters command to verify that your
DB parameter group is created.
Note
You can't copy a default parameter group. However, you can create a new parameter group that
is based on a default parameter group.
You can't copy a DB parameter group to a different AWS account or AWS Region.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. In the list, choose the custom parameter group that you want to copy.
4. For Parameter group actions, choose Copy.
5. In New DB parameter group identifier, enter a name for the new parameter group.
6. In Description, enter a description for the new parameter group.
7. Choose Copy.
AWS CLI
To copy a DB parameter group, use the AWS CLI copy-db-parameter-group command with the
following required options:
• --source-db-parameter-group-identifier
• --target-db-parameter-group-identifier
• --target-db-parameter-group-description
The following example creates a new DB parameter group named mygroup2 that is a copy of the DB
parameter group mygroup1.
Example
For Linux, macOS, or Unix:
For Windows:
357
Amazon Relational Database Service User Guide
Working with DB parameter groups
RDS API
To copy a DB parameter group, use the RDS API CopyDBParameterGroup operation with the following
required parameters:
• SourceDBParameterGroupIdentifier
• TargetDBParameterGroupIdentifier
• TargetDBParameterGroupDescription
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
AWS CLI
To list all DB parameter groups for an AWS account, use the AWS CLI describe-db-parameter-
groups command.
Example
The following example lists all available DB parameter groups for an AWS account.
For Windows:
358
Amazon Relational Database Service User Guide
Working with DB parameter groups
RDS API
To list all DB parameter groups for an AWS account, use the RDS API DescribeDBParameterGroups
operation.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
AWS CLI
To view the parameter values for a DB parameter group, use the AWS CLI describe-db-parameters
command with the following required parameter.
• --db-parameter-group-name
Example
The following example lists the parameters and parameter values for a DB parameter group named
mydbparametergroup.
RDS API
To view the parameter values for a DB parameter group, use the RDS API DescribeDBParameters
command with the following required parameter.
359
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups
• DBParameterGroupName
Topics
• Creating a DB cluster parameter group (p. 360)
• Modifying parameters in a DB cluster parameter group (p. 362)
• Resetting parameters in a DB cluster parameter group (p. 363)
• Copying a DB cluster parameter group (p. 364)
• Listing DB cluster parameter groups (p. 366)
• Viewing parameter values for a DB cluster parameter group (p. 367)
After you create a DB cluster parameter group, wait at least 5 minutes before creating a DB cluster that
uses that DB cluster parameter group. Doing this allows Amazon RDS to fully create the parameter group
before it is used by the new DB cluster. You can use the Parameter groups page in the Amazon RDS
console or the describe-db-cluster-parameters command to verify that your DB cluster parameter group
is created.
Default parameter group names can include a period, such as default.aurora-mysql5.7. However,
custom parameter group names can't include a period.
• The first character must be a letter.
• The name can't end with a hyphen or contain two consecutive hyphens.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. Choose Create parameter group.
360
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups
8. Choose Create.
AWS CLI
The following example creates a DB cluster parameter group named mydbclusterparametergroup for RDS
for MySQL version 8.0 with a description of "My new cluster parameter group."
• --db-cluster-parameter-group-name
• --db-parameter-group-family
• --description
To list all of the available parameter group families, use the following command:
Note
The output contains duplicates.
Example
For Windows:
{
"DBClusterParameterGroup": {
"DBClusterParameterGroupName": "mydbclusterparametergroup",
"DBParameterGroupFamily": "mysql8.0",
"Description": "My new cluster parameter group",
"DBClusterParameterGroupArn": "arn:aws:rds:us-east-1:123456789012:cluster-
pg:mydbclusterparametergroup2"
}
}
RDS API
To create a DB cluster parameter group, use the RDS API CreateDBClusterParameterGroup action.
361
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups
• DBClusterParameterGroupName
• DBParameterGroupFamily
• Description
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. In the list, choose the parameter group that you want to modify.
4. For Parameter group actions, choose Edit.
5. Change the values of the parameters you want to modify. You can scroll through the parameters
using the arrow keys at the top right of the dialog box.
AWS CLI
• --db-cluster-parameter-group-name
• --parameters
Example
"ParameterName=server_audit_logs_upload,ParameterValue=1,ApplyMethod=immediate"
For Windows:
362
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups
--db-cluster-parameter-group-name mydbclusterparametergroup ^
--parameters
"ParameterName=server_audit_logging,ParameterValue=1,ApplyMethod=immediate" ^
"ParameterName=server_audit_logs_upload,ParameterValue=1,ApplyMethod=immediate"
DBCLUSTERPARAMETERGROUP mydbclusterparametergroup
RDS API
• DBClusterParameterGroupName
• Parameters
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. In the list, choose the parameter group.
4. For Parameter group actions, choose Edit.
5. Choose the parameters that you want to reset to their default values. You can scroll through the
parameters using the arrow keys at the top right of the dialog box.
AWS CLI
To reset parameters in a DB cluster parameter group to their default values, use the AWS CLI reset-
db-cluster-parameter-group command with the following required option: --db-cluster-
parameter-group-name.
To reset all of the parameters in the DB cluster parameter group, specify the --reset-all-
parameters option. To reset specific parameters, specify the --parameters option.
The following example resets all of the parameters in the DB parameter group named
mydbparametergroup to their default values.
363
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups
Example
For Linux, macOS, or Unix:
For Windows:
Example
For Linux, macOS, or Unix:
For Windows:
"ParameterName=server_audit_logs_upload,ParameterValue=1,ApplyMethod=immediate"
DBClusterParameterGroupName mydbclusterparametergroup
RDS API
To reset parameters in a DB cluster parameter group to their default values, use the RDS
API ResetDBClusterParameterGroup command with the following required parameter:
DBClusterParameterGroupName.
To reset all of the parameters in the DB cluster parameter group, set the ResetAllParameters
parameter to true. To reset specific parameters, specify the Parameters parameter.
After you copy a DB cluster parameter group, wait at least 5 minutes before creating a DB cluster that
uses that DB cluster parameter group. Doing this allows Amazon RDS to fully copy the parameter group
364
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups
before it is used by the new DB cluster. You can use the Parameter groups page in the Amazon RDS
console or the describe-db-cluster-parameters command to verify that your DB cluster parameter group
is created.
Note
You can't copy a default parameter group. However, you can create a new parameter group that
is based on a default parameter group.
You can't copy a DB cluster parameter group to a different AWS account or AWS Region.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. In the list, choose the custom parameter group that you want to copy.
4. For Parameter group actions, choose Copy.
5. In New DB parameter group identifier, enter a name for the new parameter group.
6. In Description, enter a description for the new parameter group.
7. Choose Copy.
AWS CLI
• --source-db-cluster-parameter-group-identifier
• --target-db-cluster-parameter-group-identifier
• --target-db-cluster-parameter-group-description
The following example creates a new DB cluster parameter group named mygroup2 that is a copy of the
DB cluster parameter group mygroup1.
Example
For Windows:
RDS API
To copy a DB cluster parameter group, use the RDS API CopyDBClusterParameterGroup operation
with the following required parameters:
365
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups
• SourceDBClusterParameterGroupIdentifier
• TargetDBClusterParameterGroupIdentifier
• TargetDBClusterParameterGroupDescription
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
The DB cluster parameter groups appear in the list with DB cluster parameter group for Type.
AWS CLI
To list all DB cluster parameter groups for an AWS account, use the AWS CLI describe-db-cluster-
parameter-groups command.
Example
The following example lists all available DB cluster parameter groups for an AWS account.
For Windows:
{
"DBClusterParameterGroups": [
{
"DBClusterParameterGroupName": "mydbclusterparametergroup2",
"DBParameterGroupFamily": "mysql8.0",
366
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups
RDS API
To list all DB cluster parameter groups for an AWS account, use the RDS API
DescribeDBClusterParameterGroups action.
Console
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
The DB cluster parameter groups appear in the list with DB cluster parameter group for Type.
3. Choose the name of the DB cluster parameter group to see its list of parameters.
AWS CLI
To view the parameter values for a DB cluster parameter group, use the AWS CLI describe-db-
cluster-parameters command with the following required parameter.
• --db-cluster-parameter-group-name
Example
The following example lists the parameters and parameter values for a DB cluster parameter group
named mydbclusterparametergroup, in JSON format.
{
"Parameters": [
{
"ParameterName": "activate_all_roles_on_login",
"ParameterValue": "0",
"Description": "Automatically set all granted roles as active after the user
has authenticated successfully.",
"Source": "engine-default",
"ApplyType": "dynamic",
"DataType": "boolean",
"AllowedValues": "0,1",
"IsModifiable": true,
"ApplyMethod": "pending-reboot",
367
Amazon Relational Database Service User Guide
Comparing parameter groups
"SupportedEngineModes": [
"provisioned"
]
},
{
"ParameterName": "allow-suspicious-udfs",
"Description": "Controls whether user-defined functions that have only an xxx
symbol for the main function can be loaded",
"Source": "engine-default",
"ApplyType": "static",
"DataType": "boolean",
"AllowedValues": "0,1",
"IsModifiable": false,
"ApplyMethod": "pending-reboot",
"SupportedEngineModes": [
"provisioned"
]
},
...
RDS API
To view the parameter values for a DB cluster parameter group, use the RDS API
DescribeDBClusterParameters command with the following required parameter.
• DBClusterParameterGroupName
In some cases, the allowed values for a parameter aren't shown. These are always parameters where the
source is the database engine default.
To view the values of these parameters, you can run the following SQL statements:
• MySQL:
• PostgreSQL:
1. Sign in to the AWS Management Console and open the Amazon RDS console at https://
console.aws.amazon.com/rds/.
2. In the navigation pane, choose Parameter groups.
3. In the list, choose the two parameter groups that you want to compare.
368
Amazon Relational Database Service User Guide
Specifying DB parameters
Specifying DB parameters
DB parameter types include the following:
• Integer
• Boolean
• String
• Long
• Double
• Timestamp
• Object of other defined data types
• Array of values of type integer, Boolean, string, long, double, timestamp, or object
You can also specify integer and Boolean parameters using expressions, formulas, and functions.
For the Oracle engine, you can use the DBInstanceClassHugePagesDefault formula variable to
specify a Boolean DB parameter. See DB parameter formula variables (p. 370).
For the PostgreSQL engine, you can use an expression to specify a Boolean DB parameter. See Boolean
DB parameter expressions (p. 371).
Contents
• DB parameter formulas (p. 369)
• DB parameter formula variables (p. 370)
• DB parameter formula operators (p. 370)
• DB parameter functions (p. 371)
• Boolean DB parameter expressions (p. 371)
• DB parameter log expressions (p. 372)
• DB parameter value examples (p. 373)
DB parameter formulas
A DB parameter formula is an expression that resolves to an integer value o