0% found this document useful (0 votes)
462 views2,852 pages

Amazon Relational Database Service - User Guide

Uploaded by

Ananda Thimmappa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
462 views2,852 pages

Amazon Relational Database Service - User Guide

Uploaded by

Ananda Thimmappa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2852

Amazon Relational

Database Service
User Guide
Amazon Relational Database Service User Guide

Amazon Relational Database Service: User Guide


Copyright © 2023 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

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

Multi-AZ DB clusters ....................................................................................................... 147


Performance Insights ...................................................................................................... 150
RDS Custom ................................................................................................................... 151
Amazon RDS Proxy ......................................................................................................... 155
Secrets Manager integration ............................................................................................ 161
Engine-native features .................................................................................................... 162
DB instance billing for Amazon RDS ......................................................................................... 163
On-Demand DB instances ................................................................................................ 164
Reserved DB instances .................................................................................................... 165
Setting up ..................................................................................................................................... 174
Sign up for an AWS account .................................................................................................... 174
Create an administrative user ................................................................................................... 174
Grant programmatic access ...................................................................................................... 175
Determine requirements .......................................................................................................... 176
Provide access to your DB instance ........................................................................................... 177
Getting started ............................................................................................................................... 180
Creating and connecting to a MariaDB DB instance ..................................................................... 181
Prerequisites .................................................................................................................. 182
Step 1: Create an EC2 instance ......................................................................................... 182
Step 2: Create a MariaDB DB instance ............................................................................... 185
Step 3: Connect to a MariaDB DB instance ......................................................................... 190
Step 4: Delete the EC2 instance and DB instance ................................................................ 193
(Optional) Connect your DB instance to a Lambda function .................................................. 193
Creating and connecting to a Microsoft SQL Server DB instance ................................................... 194
Prerequisites .................................................................................................................. 195
Step 1: Create an EC2 instance ......................................................................................... 195
Step 2: Create a SQL Server DB instance ........................................................................... 199
Step 3: Connecting to your SQL Server DB instance ............................................................ 204
Step 4: Exploring your sample DB instance ........................................................................ 206
Step 5: Delete the EC2 instance and DB instance ................................................................ 208
(Optional) Connect your DB instance to a Lambda function .................................................. 208
Creating and connecting to a MySQL DB instance ....................................................................... 209
Prerequisites .................................................................................................................. 210
Step 1: Create an EC2 instance ......................................................................................... 210
Step 2: Create a MySQL DB instance ................................................................................. 213
Step 3: Connect to a MySQL DB instance ........................................................................... 218
Step 4: Delete the EC2 instance and DB instance ................................................................ 221
(Optional) Connect your DB instance to a Lambda function .................................................. 221
Creating and connecting to an Oracle DB instance ...................................................................... 222
Prerequisites .................................................................................................................. 223
Step 1: Create an EC2 instance ......................................................................................... 223
Step 2: Create an Oracle DB instance ................................................................................ 226
Step 3: Connect your SQL client to an Oracle DB instance .................................................... 231
Step 4: Delete the EC2 instance and DB instance ................................................................ 234
(Optional) Connect your DB instance to a Lambda function .................................................. 234
Creating and connecting to a PostgreSQL DB instance ................................................................ 235
Prerequisites .................................................................................................................. 236
Step 1: Create an EC2 instance ......................................................................................... 236
Step 2: Create a PostgreSQL DB instance ........................................................................... 240
Step 3: Connect to a PostgreSQL DB instance .................................................................... 245
Step 4: Delete the EC2 instance and DB instance ................................................................ 248
(Optional) Connect your DB instance to a Lambda function .................................................. 248
Tutorial: Create a web server and an Amazon RDS DB instance ..................................................... 249
Launch an EC2 instance ................................................................................................... 250
Create a DB instance ....................................................................................................... 255
Install a web server ........................................................................................................ 264
Tutorial: Create a Lambda function to access your Amazon RDS DB instance ................................... 273

iv
Amazon Relational Database Service User Guide

Prerequisites .................................................................................................................. 274


Create an Amazon RDS DB instance .................................................................................. 274
Create Lambda function and proxy ................................................................................... 275
Create a function execution role ....................................................................................... 275
Create a Lambda deployment package .............................................................................. 276
Update the Lambda function ........................................................................................... 278
Test your Lambda function in the console ......................................................................... 279
Create an Amazon SQS queue .......................................................................................... 280
Create an event source mapping to invoke your Lambda function ......................................... 280
Test and monitor your setup ............................................................................................ 281
Clean up your resources .................................................................................................. 282
Tutorials and sample code ............................................................................................................... 283
Tutorials in this guide ............................................................................................................. 283
Tutorials in other AWS guides .................................................................................................. 284
AWS workshop and lab content portal for Amazon RDS PostgreSQL .............................................. 284
AWS workshop and lab content portal for Amazon RDS MySQL .................................................... 284
Tutorials and sample code in GitHub ......................................................................................... 285
Working with AWS SDKs ......................................................................................................... 285
Best practices for Amazon RDS ........................................................................................................ 286
Amazon RDS basic operational guidelines .................................................................................. 286
DB instance RAM recommendations .......................................................................................... 287
Using Enhanced Monitoring to identify operating system issues .................................................... 287
Using metrics to identify performance issues ............................................................................. 287
Viewing performance metrics ........................................................................................... 287
Evaluating performance metrics ....................................................................................... 290
Tuning queries ....................................................................................................................... 291
Best practices for working with MySQL ..................................................................................... 292
Table size ...................................................................................................................... 292
Number of tables ........................................................................................................... 292
Storage engine ............................................................................................................... 293
Best practices for working with MariaDB ................................................................................... 293
Table size ...................................................................................................................... 293
Number of tables ........................................................................................................... 294
Storage engine ............................................................................................................... 294
Best practices for working with Oracle ...................................................................................... 294
Best practices for working with PostgreSQL ............................................................................... 294
Loading data into a PostgreSQL DB instance ...................................................................... 295
Working with the PostgreSQL autovacuum feature ............................................................. 295
Amazon RDS for PostgreSQL best practices video ............................................................... 296
Best practices for working with SQL Server ................................................................................ 296
Amazon RDS for SQL Server best practices video ................................................................ 297
Working with DB parameter groups .......................................................................................... 297
Best practices for automating DB instance creation ..................................................................... 297
Amazon RDS new features and best practices presentation video .................................................. 298
Configuring a DB instance ............................................................................................................... 299
Creating a DB instance ............................................................................................................ 300
Prerequisites .................................................................................................................. 300
Creating a DB instance .................................................................................................... 303
Available settings ........................................................................................................... 308
Creating resources with AWS CloudFormation ............................................................................ 324
RDS and AWS CloudFormation templates .......................................................................... 324
Learn more about AWS CloudFormation ............................................................................ 324
Connecting to a DB instance .................................................................................................... 325
Finding the connection information .................................................................................. 325
Database authentication options ...................................................................................... 328
Encrypted connections .................................................................................................... 329
Scenarios for accessing a DB instance ................................................................................ 329

v
Amazon Relational Database Service User Guide

Connecting to a DB instance running a specific DB engine ................................................... 329


Managing connections with RDS Proxy .............................................................................. 330
Working with option groups .................................................................................................... 331
Option groups overview .................................................................................................. 331
Creating an option group ................................................................................................ 332
Copying an option group ................................................................................................. 334
Adding an option to an option group ................................................................................ 335
Listing the options and option settings for an option group ................................................. 339
Modifying an option setting ............................................................................................ 340
Removing an option from an option group ........................................................................ 343
Deleting an option group ................................................................................................ 344
Working with parameter groups ............................................................................................... 347
Overview of parameter groups ......................................................................................... 347
Working with DB parameter groups .................................................................................. 349
Working with DB cluster parameter groups ........................................................................ 360
Comparing parameter groups ........................................................................................... 368
Specifying DB parameters ................................................................................................ 369
Creating an ElastiCache cluster from Amazon RDS ...................................................................... 374
Overview of ElastiCache cluster creation with RDS DB instance settings ................................. 374
Creating an ElastiCache cluster with settings from a new RDS DB instance .............................. 375
Creating an ElastiCache cluster with settings from an existing RDS DB instance ....................... 377
Managing a DB instance .................................................................................................................. 380
Stopping a DB instance ........................................................................................................... 381
Supported engines, classes, and Regions ........................................................................... 381
Support for Multi-AZ ...................................................................................................... 381
How it works ................................................................................................................. 381
Benefits ......................................................................................................................... 382
Limitations ..................................................................................................................... 382
Option and parameter group considerations ...................................................................... 382
Public IP address ............................................................................................................ 383
Stopping a DB instance ................................................................................................... 383
Starting a DB instance ............................................................................................................ 384
Connecting an AWS compute resource ...................................................................................... 385
Connecting an EC2 instance ............................................................................................. 385
Connecting a Lambda function ......................................................................................... 392
Modifying a DB instance .......................................................................................................... 401
Apply Immediately setting ............................................................................................... 402
Available settings ........................................................................................................... 402
Maintaining a DB instance ....................................................................................................... 418
Viewing pending maintenance .......................................................................................... 418
Applying updates ........................................................................................................... 421
Maintenance for Multi-AZ deployments ............................................................................. 422
The maintenance window ................................................................................................ 423
Adjusting the maintenance window for a DB instance .......................................................... 424
Working with operating system updates ............................................................................ 426
Upgrading the engine version .................................................................................................. 429
Manually upgrading the engine version ............................................................................. 429
Automatically upgrading the minor engine version ............................................................. 431
Renaming a DB instance .......................................................................................................... 434
Renaming to replace an existing DB instance ..................................................................... 434
Rebooting a DB instance ......................................................................................................... 436
Working with DB instance read replicas ..................................................................................... 438
Overview ....................................................................................................................... 439
Creating a read replica .................................................................................................... 445
Promoting a read replica ................................................................................................. 447
Monitoring read replication .............................................................................................. 449
Cross-Region read replicas ............................................................................................... 452

vi
Amazon Relational Database Service User Guide

Tagging RDS resources ............................................................................................................ 461


Overview ....................................................................................................................... 461
Using tags for access control with IAM .............................................................................. 462
Using tags to produce detailed billing reports .................................................................... 462
Adding, listing, and removing tags .................................................................................... 463
Using the AWS Tag Editor ............................................................................................... 465
Copying tags to DB instance snapshots ............................................................................. 465
Tutorial: Use tags to specify which DB instances to stop ...................................................... 466
Enabling backups ........................................................................................................... 468
Working with ARNs ................................................................................................................. 471
Constructing an ARN ....................................................................................................... 471
Getting an existing ARN .................................................................................................. 475
Working with storage .............................................................................................................. 478
Increasing DB instance storage capacity ............................................................................ 478
Managing capacity automatically with storage autoscaling ................................................... 480
Modifying Provisioned IOPS settings ................................................................................. 484
I/O-intensive storage modifications .................................................................................. 486
Modifying General Purpose (gp3) settings .......................................................................... 486
Deleting a DB instance ............................................................................................................ 489
Prerequisites for deleting a DB instance ............................................................................ 489
Considerations when deleting a DB instance ...................................................................... 489
Deleting a DB instance .................................................................................................... 490
Configuring and managing a Multi-AZ deployment ............................................................................. 492
Multi-AZ DB instance deployments ........................................................................................... 493
Modifying a DB instance to be a Multi-AZ DB instance deployment ....................................... 494
Failover process for Amazon RDS ...................................................................................... 495
Multi-AZ DB cluster deployments ............................................................................................. 499
Region and version availability ......................................................................................... 499
Instance class availability ................................................................................................. 499
Overview of Multi-AZ DB clusters ..................................................................................... 500
Limitations for Multi-AZ DB clusters .................................................................................. 501
Managing a Multi-AZ DB cluster with the AWS Management Console ..................................... 502
Working with parameter groups for Multi-AZ DB clusters ..................................................... 503
Upgrading the engine version of a Multi-AZ DB cluster ........................................................ 503
Replica lag and Multi-AZ DB clusters ................................................................................. 504
Failover process for Multi-AZ DB clusters ........................................................................... 505
Creating a Multi-AZ DB cluster ......................................................................................... 508
Connecting to a Multi-AZ DB cluster ................................................................................. 522
Connecting an AWS compute resource and a Multi-AZ DB cluster .......................................... 525
Modifying a Multi-AZ DB cluster ....................................................................................... 539
Renaming a Multi-AZ DB cluster ....................................................................................... 550
Rebooting a Multi-AZ DB cluster ...................................................................................... 552
Working with Multi-AZ DB cluster read replicas .................................................................. 554
Using PostgreSQL logical replication with Multi-AZ DB clusters ............................................. 561
Deleting a Multi-AZ DB cluster ......................................................................................... 563
Using Extended Support .................................................................................................................. 565
Using Blue/Green Deployments for database updates ......................................................................... 566
Overview of Amazon RDS Blue/Green Deployments .................................................................... 567
Benefits ......................................................................................................................... 567
Workflow ....................................................................................................................... 568
Authorizing access .......................................................................................................... 572
Considerations ................................................................................................................ 572
Best practices ................................................................................................................. 574
Region and version availability ......................................................................................... 575
Limitations ..................................................................................................................... 575
Creating a blue/green deployment ........................................................................................... 575
Making changes in the green environment ......................................................................... 576

vii
Amazon Relational Database Service User Guide

Handling lazy loading ..................................................................................................... 576


Creating the blue/green deployment ................................................................................ 577
Viewing a blue/green deployment ............................................................................................ 579
Switching a blue/green deployment ......................................................................................... 582
Switchover timeout ......................................................................................................... 582
Switchover guardrails ...................................................................................................... 583
Switchover actions .......................................................................................................... 583
Switchover best practices ................................................................................................ 584
Verifying CloudWatch metrics before switchover ................................................................ 584
Switching over a blue/green deployment .......................................................................... 585
After switchover ............................................................................................................. 587
Deleting a blue/green deployment ........................................................................................... 587
Backing up and restoring ................................................................................................................. 590
Working with backups ............................................................................................................. 591
Backup storage .............................................................................................................. 591
Backup window .............................................................................................................. 591
Backup retention period .................................................................................................. 593
Enabling automated backups ........................................................................................... 593
Retaining automated backups .......................................................................................... 595
Deleting retained automated backups ............................................................................... 596
Disabling automated backups .......................................................................................... 597
Using AWS Backup ......................................................................................................... 599
Unsupported MySQL storage engines ................................................................................ 599
Unsupported MariaDB storage engines .............................................................................. 600
Backing up and restoring a DB instance ..................................................................................... 600
Cross-Region automated backups ..................................................................................... 602
Creating a DB snapshot ................................................................................................... 613
Restoring from a DB snapshot .......................................................................................... 615
Copying a DB snapshot ................................................................................................... 619
Sharing a DB snapshot .................................................................................................... 633
Exporting DB snapshot data to Amazon S3 ........................................................................ 642
Restoring a DB instance to a specified time ....................................................................... 660
Deleting a DB snapshot ................................................................................................... 663
Tutorial: Restore a DB instance from a DB snapshot ............................................................ 665
Backing up and restoring a Multi-AZ DB cluster .......................................................................... 668
Creating a Multi-AZ DB cluster snapshot ............................................................................ 669
Restoring from a snapshot to a Multi-AZ DB cluster ............................................................ 671
Restoring from a Multi-AZ DB cluster snapshot to a DB instance ........................................... 673
Restoring a Multi-AZ DB cluster to a specified time ............................................................. 675
Monitoring metrics in a DB instance ................................................................................................. 678
Overview of monitoring .......................................................................................................... 679
Monitoring plan ............................................................................................................. 679
Performance baseline ...................................................................................................... 679
Performance guidelines ................................................................................................... 679
Monitoring tools ............................................................................................................. 680
Viewing instance status and recommendations ........................................................................... 683
Viewing Amazon RDS DB instance status ........................................................................... 684
Viewing Amazon RDS recommendations ............................................................................ 688
Viewing metrics in the Amazon RDS console .............................................................................. 696
Viewing combined metrics in the Amazon RDS console ............................................................... 699
Choosing the new monitoring view in the Monitoring tab ................................................... 699
Choosing the new monitoring view with Performance Insights in the navigation pane ............. 700
Choosing the legacy view with Performance Insights in the navigation pane .......................... 701
Creating a custom dashboard with Performance Insights in the navigation pane .................... 702
Choosing the preconfigured dashboard with Performance Insights in the navigation pane ....... 705
Monitoring RDS with CloudWatch ............................................................................................. 706
Overview of Amazon RDS and Amazon CloudWatch ............................................................ 707

viii
Amazon Relational Database Service User Guide

Viewing CloudWatch metrics ............................................................................................ 708


Creating CloudWatch alarms ............................................................................................ 713
Tutorial: Creating a CloudWatch alarm for DB cluster replica lag ........................................... 713
Monitoring DB load with Performance Insights ........................................................................... 720
Overview of Performance Insights .................................................................................... 720
Turning Performance Insights on and off ........................................................................... 727
Turning on the Performance Schema for MariaDB or MySQL ................................................ 731
Performance Insights policies ........................................................................................... 734
Analyzing metrics with the Performance Insights dashboard ................................................ 738
Retrieving metrics with the Performance Insights API .......................................................... 769
Logging Performance Insights calls using AWS CloudTrail .................................................... 786
Analyzing performance with DevOps Guru for RDS ..................................................................... 789
Benefits of DevOps Guru for RDS ..................................................................................... 789
How DevOps Guru for RDS works ..................................................................................... 790
Setting up DevOps Guru for RDS ...................................................................................... 791
Monitoring the OS with Enhanced Monitoring ............................................................................ 797
Overview of Enhanced Monitoring .................................................................................... 797
Setting up and enabling Enhanced Monitoring ................................................................... 798
Viewing OS metrics in the RDS console ............................................................................. 802
Viewing OS metrics using CloudWatch Logs ....................................................................... 805
RDS metrics reference ............................................................................................................. 806
CloudWatch metrics for RDS ............................................................................................ 806
CloudWatch dimensions for RDS ...................................................................................... 813
CloudWatch metrics for Performance Insights .................................................................... 813
Counter metrics for Performance Insights .......................................................................... 814
SQL statistics for Performance Insights ............................................................................. 830
OS metrics in Enhanced Monitoring .................................................................................. 837
Monitoring events, logs, and database activity streams ....................................................................... 846
Viewing logs, events, and streams in the Amazon RDS console ..................................................... 846
Monitoring RDS events ............................................................................................................ 850
Overview of events for Amazon RDS ................................................................................. 850
Viewing Amazon RDS events ............................................................................................ 852
Working with Amazon RDS event notification .................................................................... 855
Creating a rule that triggers on an Amazon RDS event ........................................................ 870
Amazon RDS event categories and event messages ............................................................. 874
Monitoring RDS logs ............................................................................................................... 895
Viewing and listing database log files ............................................................................... 895
Downloading a database log file ...................................................................................... 896
Watching a database log file ............................................................................................ 897
Publishing to CloudWatch Logs ........................................................................................ 898
Reading log file contents using REST ................................................................................ 900
MariaDB database log files .............................................................................................. 902
Microsoft SQL Server database log files ............................................................................ 911
MySQL database log files ................................................................................................ 915
Oracle database log files ................................................................................................. 924
PostgreSQL database log files .......................................................................................... 931
Monitoring RDS API calls in CloudTrail ...................................................................................... 940
CloudTrail integration with Amazon RDS ........................................................................... 940
Amazon RDS log file entries ............................................................................................ 940
Monitoring RDS with Database Activity Streams ......................................................................... 944
Overview ....................................................................................................................... 944
Configuring Oracle unified auditing .................................................................................. 948
Configuring SQL Server auditing ...................................................................................... 949
Starting a database activity stream ................................................................................... 950
Modifying a database activity stream ................................................................................ 951
Getting the activity stream status ..................................................................................... 953
Stopping a database activity stream ................................................................................. 954

ix
Amazon Relational Database Service User Guide

Monitoring activity streams ............................................................................................. 955


Managing access to activity streams .................................................................................. 975
Working with Amazon RDS Custom .................................................................................................. 978
Database customization challenge ............................................................................................ 978
RDS Custom management model and benefits ........................................................................... 979
Shared responsibility model in RDS Custom ....................................................................... 979
Support perimeter and unsupported configurations in RDS Custom ....................................... 981
Key benefits of RDS Custom ............................................................................................ 981
RDS Custom architecture ......................................................................................................... 981
VPC .............................................................................................................................. 982
RDS Custom automation and monitoring ........................................................................... 983
Amazon S3 .................................................................................................................... 986
AWS CloudTrail .............................................................................................................. 986
RDS Custom security ............................................................................................................... 988
How RDS Custom securely manages tasks on your behalf .................................................... 988
SSL certificates ............................................................................................................... 989
Securing your Amazon S3 bucket against the confused deputy problem ................................. 989
Rotating RDS Custom for Oracle credentials for compliance programs ................................... 990
Working with RDS Custom for Oracle ........................................................................................ 993
RDS Custom for Oracle workflow ..................................................................................... 993
Database architecture for Amazon RDS Custom for Oracle ................................................... 997
RDS Custom for Oracle requirements and limitations .......................................................... 999
Setting up your RDS Custom for Oracle environment ........................................................ 1002
Working with CEVs for RDS Custom for Oracle ................................................................. 1015
Configuring an RDS Custom for Oracle DB instance ........................................................... 1035
Managing an RDS Custom for Oracle DB instance ............................................................. 1047
Working with RDS Custom for Oracle replicas .................................................................. 1060
Backing up and restoring an RDS Custom for Oracle DB instance ........................................ 1065
Migrating to RDS Custom for Oracle ............................................................................... 1072
Upgrading a DB instance for RDS Custom for Oracle ......................................................... 1073
Troubleshooting RDS Custom for Oracle .......................................................................... 1078
Working with RDS Custom for SQL Server ............................................................................... 1087
RDS Custom for SQL Server workflow ............................................................................. 1087
RDS Custom for SQL Server requirements and limitations .................................................. 1089
Setting up your RDS Custom for SQL Server environment .................................................. 1099
Bring Your Own Media with RDS Custom for SQL Server .................................................... 1113
Working with CEVs for RDS Custom for SQL Server ........................................................... 1115
Creating and connecting to an RDS Custom for SQL Server DB instance ............................... 1130
Managing an RDS Custom for SQL Server DB instance ....................................................... 1138
Managing a Multi-AZ deployment for RDS Custom for SQL Server ....................................... 1147
Backing up and restoring an RDS Custom for SQL Server DB instance .................................. 1157
Migrating an on-premises database to RDS Custom for SQL Server ..................................... 1165
Upgrading a DB instance for RDS Custom for SQL Server ................................................... 1168
Troubleshooting Amazon RDS Custom for SQL Server ....................................................... 1169
Working with RDS on AWS Outposts ............................................................................................... 1177
Prerequisites ........................................................................................................................ 1178
Support for Amazon RDS features .......................................................................................... 1179
Supported DB instance classes ............................................................................................... 1182
Customer-owned IP addresses ................................................................................................ 1184
Using CoIPs .................................................................................................................. 1184
Limitations ................................................................................................................... 1185
Multi-AZ deployments ........................................................................................................... 1186
Working with the shared responsibility model .................................................................. 1186
Improving availability .................................................................................................... 1186
Prerequisites ................................................................................................................ 1187
Working with API operations for Amazon EC2 permissions ................................................. 1188
Creating DB instances for RDS on Outposts ............................................................................. 1189

x
Amazon Relational Database Service User Guide

Creating read replicas for RDS on Outposts .............................................................................. 1196


Considerations for restoring DB instances ................................................................................ 1198
Using RDS Proxy ........................................................................................................................... 1199
Region and version availability ............................................................................................... 1199
Quotas and limitations .......................................................................................................... 1199
RDS for MariaDB limitations ........................................................................................... 1200
RDS for SQL Server limitations ....................................................................................... 1201
MySQL limitations ......................................................................................................... 1201
PostgreSQL limitations .................................................................................................. 1201
Planning where to use RDS Proxy ........................................................................................... 1202
RDS Proxy concepts and terminology ...................................................................................... 1203
Overview of RDS Proxy concepts .................................................................................... 1203
Connection pooling ....................................................................................................... 1204
Security ....................................................................................................................... 1204
Failover ....................................................................................................................... 1206
Transactions ................................................................................................................. 1206
Getting started with RDS Proxy .............................................................................................. 1207
Setting up network prerequisites .................................................................................... 1207
Setting up database credentials in Secrets Manager .......................................................... 1209
Setting up IAM policies .................................................................................................. 1210
Creating an RDS Proxy .................................................................................................. 1212
Viewing an RDS Proxy ................................................................................................... 1217
Connecting through RDS Proxy ....................................................................................... 1218
Managing an RDS Proxy ........................................................................................................ 1220
Modifying an RDS Proxy ................................................................................................ 1221
Adding a database user ................................................................................................. 1225
Changing database passwords ........................................................................................ 1226
Configuring connection settings ..................................................................................... 1226
Avoiding pinning .......................................................................................................... 1228
Deleting an RDS Proxy .................................................................................................. 1232
Working with RDS Proxy endpoints ......................................................................................... 1232
Overview of proxy endpoints ......................................................................................... 1233
Reader endpoints .......................................................................................................... 1233
Accessing Aurora and RDS databases across VPCs ............................................................. 1233
Creating a proxy endpoint ............................................................................................. 1234
Viewing proxy endpoints ............................................................................................... 1236
Modifying a proxy endpoint ........................................................................................... 1237
Deleting a proxy endpoint ............................................................................................. 1238
Limitations for proxy endpoints ...................................................................................... 1239
Monitoring RDS Proxy with CloudWatch .................................................................................. 1239
Working with RDS Proxy events .............................................................................................. 1244
RDS Proxy events ......................................................................................................... 1244
RDS Proxy examples ............................................................................................................. 1245
Troubleshooting RDS Proxy .................................................................................................... 1247
Verifying connectivity for a proxy ................................................................................... 1248
Common issues and solutions ........................................................................................ 1249
Using RDS Proxy with AWS CloudFormation ............................................................................. 1253
MariaDB on Amazon RDS ............................................................................................................... 1255
MariaDB feature support ....................................................................................................... 1256
MariaDB major versions ................................................................................................. 1256
Supported storage engines ............................................................................................ 1261
Cache warming ............................................................................................................. 1262
Features not supported ................................................................................................. 1263
MariaDB versions .................................................................................................................. 1265
Supported MariaDB minor versions ................................................................................. 1265
Supported MariaDB major versions ................................................................................. 1267
MariaDB 10.3 RDS end of standard support ..................................................................... 1267

xi
Amazon Relational Database Service User Guide

MariaDB 10.2 RDS end of standard support ..................................................................... 1268


Deprecated MariaDB versions ......................................................................................... 1268
Connecting to a DB instance running MariaDB .......................................................................... 1269
Finding the connection information ................................................................................ 1270
Connecting from the MySQL command-line client (unencrypted) ........................................ 1272
Troubleshooting ............................................................................................................ 1273
Securing MariaDB connections ................................................................................................ 1274
MariaDB security ........................................................................................................... 1274
Encrypting with SSL/TLS ............................................................................................... 1275
Using new SSL/TLS certificates ...................................................................................... 1277
Improving query performance with RDS Optimized Reads .......................................................... 1281
Overview ..................................................................................................................... 1281
Use cases ..................................................................................................................... 1281
Best practices ............................................................................................................... 1282
Using .......................................................................................................................... 1282
Monitoring ................................................................................................................... 1283
Limitations ................................................................................................................... 1283
Improving write performance with RDS Optimized Writes for MariaDB ......................................... 1284
Overview ..................................................................................................................... 1284
Using .......................................................................................................................... 1285
Limitations ................................................................................................................... 1288
Upgrading the MariaDB DB engine .......................................................................................... 1289
Overview ..................................................................................................................... 1289
Major version upgrades ................................................................................................. 1290
Upgrading a MariaDB DB instance ................................................................................... 1291
Automatic minor version upgrades .................................................................................. 1291
Upgrading with reduced downtime ................................................................................. 1293
Importing data into a MariaDB DB instance .............................................................................. 1296
Importing data from an external database ....................................................................... 1297
Importing data to a DB instance with reduced downtime ................................................... 1299
Importing data from any source ..................................................................................... 1313
Working with MariaDB replication ........................................................................................... 1318
Working with MariaDB read replicas ................................................................................ 1318
Configuring GTID-based replication with an external source instance ................................... 1328
Configuring binary log file position replication with an external source instance .................... 1331
Options for MariaDB ............................................................................................................. 1334
MariaDB Audit Plugin support ........................................................................................ 1334
Parameters for MariaDB ........................................................................................................ 1338
Viewing MariaDB parameters .......................................................................................... 1338
MySQL parameters that aren't available .......................................................................... 1339
Migrating data from a MySQL DB snapshot to a MariaDB DB instance .......................................... 1341
Performing the migration .............................................................................................. 1341
Incompatibilities between MariaDB and MySQL ................................................................ 1343
MariaDB on Amazon RDS SQL reference .................................................................................. 1344
mysql.rds_replica_status ................................................................................................ 1344
mysql.rds_set_external_master_gtid ................................................................................ 1345
mysql.rds_kill_query_id .................................................................................................. 1347
Local time zone .................................................................................................................... 1349
Known issues and limitations for MariaDB ................................................................................ 1352
File size limits .............................................................................................................. 1352
InnoDB reserved word ................................................................................................... 1353
Custom ports ............................................................................................................... 1353
Performance Insights .................................................................................................... 1353
Microsoft SQL Server on Amazon RDS ............................................................................................. 1354
Common management tasks .................................................................................................. 1355
Limitations ........................................................................................................................... 1357
DB instance class support ...................................................................................................... 1358

xii
Amazon Relational Database Service User Guide

Security ............................................................................................................................... 1360


Compliance programs ............................................................................................................ 1361
HIPAA .......................................................................................................................... 1361
SSL support ......................................................................................................................... 1362
Version support .................................................................................................................... 1362
Version management ............................................................................................................ 1363
Database engine patches and versions ............................................................................. 1363
Deprecation schedule .................................................................................................... 1364
Feature support .................................................................................................................... 1364
SQL Server 2019 features .............................................................................................. 1365
SQL Server 2017 features .............................................................................................. 1365
SQL Server 2016 features .............................................................................................. 1366
SQL Server 2014 features .............................................................................................. 1366
SQL Server 2012 end of support on Amazon RDS ............................................................. 1366
SQL Server 2008 R2 end of support on Amazon RDS ........................................................ 1366
CDC support ........................................................................................................................ 1366
Features not supported and features with limited support ......................................................... 1367
Multi-AZ deployments ........................................................................................................... 1368
Using TDE ............................................................................................................................ 1368
Functions and stored procedures ............................................................................................ 1368
Local time zone .................................................................................................................... 1371
Supported time zones ................................................................................................... 1371
Licensing SQL Server on Amazon RDS ..................................................................................... 1379
Restoring license-terminated DB instances ....................................................................... 1379
SQL Server Developer Edition ......................................................................................... 1379
Connecting to a DB instance running SQL Server ...................................................................... 1380
Before you connect ....................................................................................................... 1380
Finding the DB instance endpoint and port number .......................................................... 1380
Connecting to your DB instance with SSMS ...................................................................... 1381
Connecting to your DB instance with SQL Workbench/J ..................................................... 1384
Security group considerations ......................................................................................... 1385
Troubleshooting ............................................................................................................ 1385
Working with Active Directory with RDS for SQL Server ............................................................. 1387
Working with Self Managed Active Directory with a SQL Server DB instance ......................... 1388
Working with AWS Managed Active Directory with RDS for SQL Server ................................ 1401
Updating applications for new SSL/TLS certificates ................................................................... 1411
Determining whether any applications are connecting to your Microsoft SQL Server DB
instance using SSL ........................................................................................................ 1411
Determining whether a client requires certificate verification in order to connect ................... 1412
Updating your application trust store .............................................................................. 1413
Upgrading the SQL Server DB engine ...................................................................................... 1414
Overview ..................................................................................................................... 1415
Major version upgrades ................................................................................................. 1415
Multi-AZ and in-memory optimization considerations ........................................................ 1417
Read replica considerations ............................................................................................ 1417
Option group considerations .......................................................................................... 1417
Parameter group considerations ..................................................................................... 1417
Testing an upgrade ....................................................................................................... 1417
Upgrading a SQL server DB instance ............................................................................... 1418
Upgrading deprecated DB instances before support ends ................................................... 1418
Importing and exporting SQL Server databases ........................................................................ 1419
Limitations and recommendations .................................................................................. 1420
Setting up ................................................................................................................... 1421
Using native backup and restore ..................................................................................... 1425
Compressing backup files .............................................................................................. 1435
Troubleshooting ............................................................................................................ 1435
Importing and exporting SQL Server data using other methods .......................................... 1437

xiii
Amazon Relational Database Service User Guide

Working with SQL Server read replicas .................................................................................... 1446


Configuring read replicas for SQL Server ......................................................................... 1446
Read replica limitations with SQL Server ......................................................................... 1446
Option considerations ................................................................................................... 1447
Synchronizing database users and objects with a SQL Server read replica ............................. 1448
Troubleshooting a SQL Server read replica problem .......................................................... 1449
Multi-AZ for RDS for SQL Server ............................................................................................ 1450
Adding Multi-AZ to a SQL Server DB instance ................................................................... 1451
Removing Multi-AZ from a SQL Server DB instance ........................................................... 1451
Limitations, notes, and recommendations ........................................................................ 1451
Determining the location of the secondary ...................................................................... 1453
Migrating to Always On AGs .......................................................................................... 1454
Additional features for SQL Server .......................................................................................... 1455
Using SSL with a SQL Server DB instance ........................................................................ 1456
Configuring security protocols and ciphers ....................................................................... 1459
Amazon S3 integration .................................................................................................. 1464
Using Database Mail ..................................................................................................... 1478
Instance store support for tempdb .................................................................................. 1489
Using extended events .................................................................................................. 1491
Access to transaction log backups ................................................................................... 1494
Options for SQL Server ......................................................................................................... 1514
Listing the available options for SQL Server versions and editions ....................................... 1515
Linked Servers with Oracle OLEDB .................................................................................. 1517
Native backup and restore ............................................................................................. 1525
Transparent Data Encryption .......................................................................................... 1528
SQL Server Audit .......................................................................................................... 1536
SQL Server Analysis Services .......................................................................................... 1543
SQL Server Integration Services ...................................................................................... 1562
SQL Server Reporting Services ....................................................................................... 1577
Microsoft Distributed Transaction Coordinator .................................................................. 1590
Common DBA tasks for SQL Server ......................................................................................... 1602
Accessing the tempdb database ...................................................................................... 1603
Analyzing database workload with Database Engine Tuning Advisor .................................... 1605
Collations and character sets .......................................................................................... 1607
Creating a database user ............................................................................................... 1611
Determining a recovery model ....................................................................................... 1611
Determining the last failover time .................................................................................. 1612
Disabling fast inserts ..................................................................................................... 1612
Dropping a SQL Server database .................................................................................... 1613
Renaming a Multi-AZ database ....................................................................................... 1613
Resetting the db_owner role password ........................................................................... 1613
Restoring license-terminated DB instances ....................................................................... 1614
Transitioning a database from OFFLINE to ONLINE ........................................................... 1614
Using CDC ................................................................................................................... 1614
Using SQL Server Agent ................................................................................................ 1617
Working with SQL Server logs ........................................................................................ 1619
Working with trace and dump files ................................................................................. 1620
MySQL on Amazon RDS ................................................................................................................. 1622
MySQL feature support ......................................................................................................... 1624
Supported storage engines ............................................................................................ 1624
Using memcached and other options .............................................................................. 1624
InnoDB cache warming .................................................................................................. 1625
Features not supported ................................................................................................. 1625
MySQL versions .................................................................................................................... 1627
Supported MySQL minor versions ................................................................................... 1627
Supported MySQL major versions ................................................................................... 1629
Deprecated MySQL versions ........................................................................................... 1629

xiv
Amazon Relational Database Service User Guide

Connecting to a DB instance running MySQL ............................................................................ 1630


Finding the connection information ................................................................................ 1631
Connecting from the MySQL command-line client (unencrypted) ........................................ 1633
Connecting from MySQL Workbench ............................................................................... 1634
Connecting with the AWS JDBC Driver for MySQL ............................................................. 1635
Troubleshooting ............................................................................................................ 1636
Securing MySQL connections .................................................................................................. 1637
MySQL security ............................................................................................................ 1637
Password Validation Plugin ............................................................................................ 1638
Encrypting with SSL/TLS ............................................................................................... 1639
Using new SSL/TLS certificates ...................................................................................... 1642
Using Kerberos authentication for MySQL ........................................................................ 1645
Improving query performance with RDS Optimized Reads .......................................................... 1656
Overview ..................................................................................................................... 1656
Use cases ..................................................................................................................... 1656
Best practices ............................................................................................................... 1657
Using .......................................................................................................................... 1657
Monitoring ................................................................................................................... 1658
Limitations ................................................................................................................... 1658
Improving write performance with RDS Optimized Writes for MySQL ........................................... 1659
Overview ..................................................................................................................... 1284
Using .......................................................................................................................... 1660
Limitations ................................................................................................................... 1663
Upgrading the MySQL DB engine ........................................................................................... 1664
Overview ..................................................................................................................... 1664
Major version upgrades ................................................................................................. 1665
Testing an upgrade ....................................................................................................... 1669
Upgrading a MySQL DB instance .................................................................................... 1669
Automatic minor version upgrades .................................................................................. 1669
Upgrading with reduced downtime ................................................................................. 1671
Importing data into a MySQL DB instance ............................................................................... 1674
Overview ..................................................................................................................... 1674
Importing data considerations ........................................................................................ 1676
Restoring a backup into a MySQL DB instance .................................................................. 1680
Importing data from an external database ....................................................................... 1688
Importing data with reduced downtime ........................................................................... 1690
Importing data from any source ..................................................................................... 1703
Working with MySQL replication ............................................................................................. 1708
Working with MySQL read replicas .................................................................................. 1708
Using GTID-based replication ......................................................................................... 1719
Configuring binary log file position replication with an external source instance .................... 1724
Exporting data from a MySQL DB instance ............................................................................... 1728
Prepare an external MySQL database .............................................................................. 1728
Prepare the source MySQL DB instance ........................................................................... 1729
Copy the database ........................................................................................................ 1730
Complete the export ..................................................................................................... 1730
Options for MySQL ............................................................................................................... 1732
MariaDB Audit Plugin .................................................................................................... 1733
memcached .................................................................................................................. 1738
Parameters for MySQL .......................................................................................................... 1742
Common DBA tasks for MySQL .............................................................................................. 1744
Ending a session or query .............................................................................................. 1744
Skipping the current replication error .............................................................................. 1744
Working with InnoDB tablespaces to improve crash recovery times ...................................... 1745
Managing the Global Status History ................................................................................ 1747
Local time zone .................................................................................................................... 1749
Known issues and limitations ................................................................................................. 1752

xv
Amazon Relational Database Service User Guide

InnoDB reserved word ................................................................................................... 1752


Storage-full behavior .................................................................................................... 1752
Inconsistent InnoDB buffer pool size ............................................................................... 1753
Index merge optimization returns incorrect results ............................................................ 1753
Log file size ................................................................................................................. 1754
MySQL parameter exceptions for Amazon RDS DB instances ............................................... 1754
MySQL file size limits in Amazon RDS ............................................................................. 1754
MySQL Keyring Plugin not supported .............................................................................. 1756
Custom ports ............................................................................................................... 1756
MySQL stored procedure limitations ................................................................................ 1756
GTID-based replication with an external source instance .................................................... 1756
RDS for MySQL stored procedures .......................................................................................... 1757
Configuring .................................................................................................................. 1758
Ending a session or query .............................................................................................. 1761
Logging ....................................................................................................................... 1763
Managing the Global Status History ................................................................................ 1764
Replicating ................................................................................................................... 1767
Warming the InnoDB cache ............................................................................................ 1784
Oracle on Amazon RDS ................................................................................................................. 1785
Oracle overview .................................................................................................................... 1786
Oracle features ............................................................................................................. 1786
Oracle versions ............................................................................................................. 1789
Oracle licensing ............................................................................................................ 1793
Oracle users and privileges ............................................................................................ 1796
Oracle instance classes .................................................................................................. 1796
Oracle database architecture .......................................................................................... 1800
Oracle parameters ........................................................................................................ 1801
Oracle character sets ..................................................................................................... 1801
Oracle limitations ......................................................................................................... 1804
Connecting to your Oracle DB instance .................................................................................... 1806
Finding the endpoint ..................................................................................................... 1806
SQL developer .............................................................................................................. 1808
SQL*Plus ...................................................................................................................... 1810
Security group considerations ......................................................................................... 1811
Dedicated and shared server processes ............................................................................ 1811
Troubleshooting ............................................................................................................ 1811
Modifying Oracle sqlnet.ora parameters .......................................................................... 1812
Securing Oracle connections .................................................................................................. 1816
Encrypting with SSL ...................................................................................................... 1816
Using new SSL/TLS certificates ...................................................................................... 1816
Encrypting with NNE ..................................................................................................... 1819
Configuring Kerberos authentication ............................................................................... 1819
Configuring UTL_HTTP access ........................................................................................ 1832
Working with CDBs ............................................................................................................... 1840
Overview of CDBs ......................................................................................................... 1840
Configuring a CDB ........................................................................................................ 1841
Backing up and restoring a CDB ..................................................................................... 1844
Converting a non-CDB to a CDB ..................................................................................... 1844
Upgrading your CDB ..................................................................................................... 1846
Administering your Oracle DB ................................................................................................ 1847
System tasks ................................................................................................................ 1855
Database tasks ............................................................................................................. 1869
Log tasks ..................................................................................................................... 1888
RMAN tasks ................................................................................................................. 1897
Oracle Scheduler tasks .................................................................................................. 1914
Diagnostic tasks ............................................................................................................ 1919
Other tasks .................................................................................................................. 1926

xvi
Amazon Relational Database Service User Guide

Configuring advanced RDS for Oracle features ......................................................................... 1936


Configuring the instance store ........................................................................................ 1936
Turning on HugePages .................................................................................................. 1942
Turning on extended data types ..................................................................................... 1945
Importing data into Oracle .................................................................................................... 1947
Importing using Oracle SQL Developer ............................................................................ 1947
Importing using Oracle Data Pump ................................................................................. 1948
Importing using Oracle Export/Import ............................................................................ 1959
Importing using Oracle SQL*Loader ................................................................................ 1959
Migrating with Oracle materialized views ......................................................................... 1960
Migrating using Oracle transportable tablespaces ............................................................. 1962
Working with Oracle replicas .................................................................................................. 1973
Overview of Oracle replicas ........................................................................................... 1973
Requirements and considerations for Oracle replicas ......................................................... 1974
Preparing to create an Oracle replica .............................................................................. 1977
Creating a mounted Oracle replica .................................................................................. 1978
Modifying the replica mode ........................................................................................... 1979
Working with Oracle replica backups ............................................................................... 1980
Performing an Oracle Data Guard switchover ................................................................... 1982
Troubleshooting Oracle replicas ...................................................................................... 1988
Options for Oracle ................................................................................................................ 1990
Overview of Oracle DB options ...................................................................................... 1990
Amazon S3 integration .................................................................................................. 1992
Application Express (APEX) ............................................................................................. 2009
Amazon EFS integration ................................................................................................ 2020
Java virtual machine (JVM) ............................................................................................ 2031
Enterprise Manager ....................................................................................................... 2034
Label security ............................................................................................................... 2049
Locator ........................................................................................................................ 2052
Multimedia ................................................................................................................... 2055
Native network encryption (NNE) .................................................................................... 2057
OLAP .......................................................................................................................... 2065
Secure Sockets Layer (SSL) ............................................................................................. 2068
Spatial ......................................................................................................................... 2075
SQLT ........................................................................................................................... 2078
Statspack ..................................................................................................................... 2084
Time zone .................................................................................................................... 2087
Time zone file autoupgrade ........................................................................................... 2091
Transparent Data Encryption (TDE) ................................................................................. 2097
UTL_MAIL .................................................................................................................... 2099
XML DB ....................................................................................................................... 2102
Upgrading the Oracle DB engine ............................................................................................ 2103
Overview of Oracle upgrades ......................................................................................... 2103
Major version upgrades ................................................................................................. 2106
Minor version upgrades ................................................................................................. 2107
Upgrade considerations ................................................................................................. 2108
Testing an upgrade ....................................................................................................... 2110
Upgrading an Oracle DB instance ................................................................................... 2111
Upgrading an Oracle DB snapshot .................................................................................. 2111
Tools and third-party software for Oracle ................................................................................ 2114
Setting up ................................................................................................................... 2115
Using Oracle GoldenGate ............................................................................................... 2121
Using the Oracle Repository Creation Utility .................................................................... 2135
Configuring CMAN ........................................................................................................ 2141
Installing a Siebel database on Oracle on Amazon RDS ...................................................... 2143
Oracle Database engine releases ............................................................................................. 2146
PostgreSQL on Amazon RDS .......................................................................................................... 2147

xvii
Amazon Relational Database Service User Guide

Common management tasks .................................................................................................. 2148


The database preview environment ........................................................................................ 2151
Features not supported in the preview environment .......................................................... 2151
Creating a new DB instance in the preview environment .................................................... 2151
PostgreSQL version 16 in the database preview environment ..................................................... 2153
PostgreSQL versions .............................................................................................................. 2154
Deprecation of PostgreSQL version 10 ............................................................................ 2154
Deprecation of PostgreSQL version 9.6 ............................................................................ 2155
Deprecated PostgreSQL versions ..................................................................................... 2155
PostgreSQL extension versions ............................................................................................... 2156
Restricting installation of PostgreSQL extensions .............................................................. 2156
PostgreSQL trusted extensions ....................................................................................... 2157
PostgreSQL features .............................................................................................................. 2158
Custom data types and enumerations ............................................................................. 2158
Event triggers for RDS for PostgreSQL ............................................................................ 2159
Huge pages for RDS for PostgreSQL ............................................................................... 2159
Logical replication ......................................................................................................... 2160
RAM disk for the stats_temp_directory ............................................................................ 2162
Tablespaces for RDS for PostgreSQL .............................................................................. 2162
RDS for PostgreSQL collations for EBCDIC and other mainframe migrations .......................... 2163
Connecting to a PostgreSQL instance ...................................................................................... 2167
Using pgAdmin to connect to a RDS for PostgreSQL DB instance ........................................ 2169
Using psql to connect to your RDS for PostgreSQL DB instance ........................................... 2171
Connecting with the AWS JDBC Driver for PostgreSQL ....................................................... 2171
Troubleshooting connections to your RDS for PostgreSQL instance ...................................... 2172
Securing connections with SSL/TLS ......................................................................................... 2174
Using SSL with a PostgreSQL DB instance ........................................................................ 2174
Updating applications to use new SSL/TLS certificates ...................................................... 2177
Using Kerberos authentication ................................................................................................ 2181
Region and version availability ....................................................................................... 2181
Overview of Kerberos authentication ............................................................................... 2181
Setting up ................................................................................................................... 2182
Managing a DB instance in a Domain .............................................................................. 2191
Connecting with Kerberos authentication ......................................................................... 2192
Using a custom DNS server for outbound network access .......................................................... 2195
Turning on custom DNS resolution .................................................................................. 2195
Turning off custom DNS resolution ................................................................................. 2195
Setting up a custom DNS server ..................................................................................... 2195
Upgrading the PostgreSQL DB engine ..................................................................................... 2197
Overview of upgrading .................................................................................................. 2198
PostgreSQL version numbers .......................................................................................... 2199
RDS version number ..................................................................................................... 2199
Choosing a major version upgrade .................................................................................. 2200
How to perform a major version upgrade ........................................................................ 2203
Automatic minor version upgrades .................................................................................. 2207
Upgrading PostgreSQL extensions .................................................................................. 2209
Upgrading a PostgreSQL DB snapshot engine version ................................................................ 2210
Working with read replicas for RDS for PostgreSQL ................................................................... 2212
Read replica limitations with PostgreSQL ......................................................................... 2212
Read replica configuration with PostgreSQL ..................................................................... 2213
How replication works for different RDS for PostgreSQL versions ........................................ 2215
Monitoring and tuning the replication process .................................................................. 2218
Improving query performance with RDS Optimized Reads .......................................................... 2220
Overview of RDS Optimized Reads in PostgreSQL ............................................................. 2220
Use cases ..................................................................................................................... 2221
Best practices ............................................................................................................... 2221
Using .......................................................................................................................... 2221

xviii
Amazon Relational Database Service User Guide

Monitoring ................................................................................................................... 2222


Limitations ................................................................................................................... 2222
Importing data into PostgreSQL ............................................................................................. 2223
Importing a PostgreSQL database from an Amazon EC2 instance ........................................ 2224
Using the \copy command to import data to a table on a PostgreSQL DB instance ................. 2226
Importing data from Amazon S3 into RDS for PostgreSQL ................................................. 2227
Transporting PostgreSQL databases between DB instances ................................................. 2240
Exporting PostgreSQL data to Amazon S3 ............................................................................... 2247
Installing the extension ................................................................................................. 2247
Overview of exporting to S3 .......................................................................................... 2248
Specifying the Amazon S3 file path to export to ............................................................... 2249
Setting up access to an Amazon S3 bucket ...................................................................... 2250
Exporting query data using the aws_s3.query_export_to_s3 function ................................... 2253
Troubleshooting access to Amazon S3 ............................................................................. 2255
Function reference ........................................................................................................ 2255
Invoking a Lambda function from RDS for PostgreSQL .............................................................. 2259
Step 1: Configure outbound connections ......................................................................... 2259
Step 2: Configure IAM for your instance and Lambda ........................................................ 2260
Step 3: Install the extension ........................................................................................... 2261
Step 4: Use Lambda helper functions .............................................................................. 2262
Step 5: Invoke a Lambda function ................................................................................... 2262
Step 6: Grant users permissions ...................................................................................... 2263
Examples: Invoking Lambda functions ............................................................................. 2264
Lambda function error messages .................................................................................... 2266
Lambda function reference ............................................................................................ 2267
Common DBA tasks for RDS for PostgreSQL ............................................................................ 2270
Collations supported in RDS for PostgreSQL .................................................................... 2270
Understanding PostgreSQL roles and permissions ............................................................. 2271
Working with the PostgreSQL autovacuum ...................................................................... 2280
Logging mechanisms ..................................................................................................... 2290
Managing temporary files with PostgreSQL ...................................................................... 2291
Using pgBadger for log analysis with PostgreSQL ............................................................. 2295
Using PGSnapper for snapping with PostgreSQL ............................................................... 2295
Working with parameters ............................................................................................... 2296
Tuning with wait events for RDS for PostgreSQL ...................................................................... 2306
Essential concepts for RDS for PostgreSQL tuning ............................................................. 2306
RDS for PostgreSQL wait events ..................................................................................... 2309
Client:ClientRead .......................................................................................................... 2311
Client:ClientWrite .......................................................................................................... 2313
CPU ............................................................................................................................ 2314
IO:BufFileRead and IO:BufFileWrite ................................................................................. 2319
IO:DataFileRead ............................................................................................................ 2324
IO:WALWrite ................................................................................................................. 2329
Lock:advisory ............................................................................................................... 2331
Lock:extend .................................................................................................................. 2333
Lock:Relation ................................................................................................................ 2335
Lock:transactionid ......................................................................................................... 2337
Lock:tuple .................................................................................................................... 2339
LWLock:BufferMapping (LWLock:buffer_mapping) ............................................................. 2342
LWLock:BufferIO (IPC:BufferIO) ....................................................................................... 2344
LWLock:buffer_content (BufferContent) ........................................................................... 2345
LWLock:lock_manager (LWLock:lockmanager) ................................................................... 2346
Timeout:PgSleep ........................................................................................................... 2350
Timeout:VacuumDelay ................................................................................................... 2351
Tuning RDS for PostgreSQL with Amazon DevOps Guru proactive insights .................................... 2353
Database has long running idle in transaction connection .................................................. 2353
Using PostgreSQL extensions ................................................................................................. 2356

xix
Amazon Relational Database Service User Guide

Using functions from orafce ........................................................................................... 2357


Managing partitions with the pg_partman extension ......................................................... 2358
Using pgAudit to log database activity ............................................................................ 2362
Scheduling maintenance with the pg_cron extension ......................................................... 2371
Using pglogical to synchronize data ................................................................................ 2378
Reducing bloat with the pg_repack extension ................................................................... 2388
Upgrading and using PLV8 ............................................................................................. 2389
Using PL/Rust to write functions in the Rust language ...................................................... 2390
Managing spatial data with PostGIS ................................................................................ 2394
Supported foreign data wrappers ........................................................................................... 2401
Using the log_fdw extension .......................................................................................... 2401
Using postgres_fdw to access external data ..................................................................... 2402
Working with a MySQL database .................................................................................... 2403
Working with an Oracle database ................................................................................... 2406
Working with a SQL Server database .............................................................................. 2409
Working with Trusted Language Extensions for PostgreSQL ........................................................ 2412
Terminology ................................................................................................................. 2412
Requirements for using Trusted Language Extensions ........................................................ 2413
Setting up Trusted Language Extensions .......................................................................... 2415
Overview of Trusted Language Extensions ....................................................................... 2418
Creating TLE extensions ................................................................................................. 2419
Dropping your TLE extensions from a database ................................................................ 2422
Uninstalling Trusted Language Extensions ........................................................................ 2423
Using PostgreSQL hooks with your TLE extensions ............................................................ 2424
Using Custom Data Types in Trusted Language Extensions ................................................. 2428
Functions reference for Trusted Language Extensions ........................................................ 2428
Hooks reference for Trusted Language Extensions ............................................................. 2438
Code examples ............................................................................................................................. 2441
Actions ................................................................................................................................ 2445
Create a DB instance ..................................................................................................... 2446
Create a DB parameter group ......................................................................................... 2453
Create a snapshot of a DB instance ................................................................................. 2456
Create an authentication token ...................................................................................... 2460
Delete a DB instance ..................................................................................................... 2461
Delete a DB parameter group ......................................................................................... 2465
Describe DB instances ................................................................................................... 2469
Describe DB parameter groups ....................................................................................... 2473
Describe database engine versions .................................................................................. 2477
Describe options for DB instances ................................................................................... 2481
Describe parameters in a DB parameter group .................................................................. 2486
Describe snapshots of DB instances ................................................................................. 2491
Modify a DB instance .................................................................................................... 2494
Reboot a DB instance .................................................................................................... 2495
Retrieve attributes ........................................................................................................ 2496
Update parameters in a DB parameter group ................................................................... 2497
Scenarios ............................................................................................................................. 2500
Get started with DB instances ........................................................................................ 2501
Cross-service examples .......................................................................................................... 2561
Create an Aurora Serverless work item tracker .................................................................. 2562
Security ....................................................................................................................................... 2565
Database authentication ........................................................................................................ 2566
Password authentication ................................................................................................ 2566
IAM database authentication .......................................................................................... 2567
Kerberos authentication ................................................................................................. 2567
Password management with RDS and Secrets Manager .............................................................. 2568
Limitations ................................................................................................................... 2568
Overview ..................................................................................................................... 2568

xx
Amazon Relational Database Service User Guide

Benefits ....................................................................................................................... 2569


Permissions required for Secrets Manager integration ........................................................ 2569
Enforcing RDS management ........................................................................................... 2570
Managing the master user password for a DB instance ...................................................... 2570
Managing the master user password for a Multi-AZ DB cluster ............................................ 2573
Rotating the master user password secret for a DB instance ............................................... 2576
Rotating the master user password secret for a Multi-AZ DB cluster ..................................... 2578
Viewing the details about a secret for a DB instance ......................................................... 2579
Viewing the details about a secret for a Multi-AZ DB cluster ............................................... 2582
Region and version availability ....................................................................................... 2585
Data protection .................................................................................................................... 2585
Data encryption ............................................................................................................ 2585
Internetwork traffic privacy ............................................................................................ 2605
Identity and access management ............................................................................................ 2606
Audience ...................................................................................................................... 2606
Authenticating with identities ......................................................................................... 2606
Managing access using policies ....................................................................................... 2609
How Amazon RDS works with IAM .................................................................................. 2610
Identity-based policy examples ....................................................................................... 2616
AWS managed policies .................................................................................................. 2628
Policy updates .............................................................................................................. 2632
Cross-service confused deputy prevention ........................................................................ 2640
IAM database authentication .......................................................................................... 2642
Troubleshooting ............................................................................................................ 2670
Logging and monitoring ........................................................................................................ 2672
Compliance validation ........................................................................................................... 2674
Resilience ............................................................................................................................. 2675
Backup and restore ....................................................................................................... 2675
Replication ................................................................................................................... 2675
Failover ....................................................................................................................... 2675
Infrastructure security ........................................................................................................... 2676
Security groups ............................................................................................................ 2676
Public accessibility ........................................................................................................ 2676
VPC endpoints (AWS PrivateLink) ............................................................................................ 2677
Considerations .............................................................................................................. 2677
Availability ................................................................................................................... 2677
Creating an interface VPC endpoint ................................................................................ 2678
Creating a VPC endpoint policy ...................................................................................... 2678
Security best practices ........................................................................................................... 2679
Controlling access with security groups ................................................................................... 2680
Overview of VPC security groups .................................................................................... 2680
Security group scenario ................................................................................................. 2680
Creating a VPC security group ........................................................................................ 2682
Associating with a DB instance ....................................................................................... 2682
Master user account privileges ................................................................................................ 2682
Service-linked roles ............................................................................................................... 2684
Service-linked role permissions for Amazon RDS ............................................................... 2684
Service-linked role permissions for Amazon RDS Custom ................................................... 2686
Using Amazon RDS with Amazon VPC ..................................................................................... 2688
Working with a DB instance in a VPC .............................................................................. 2688
Updating the VPC for a DB instance ................................................................................ 2700
Scenarios for accessing a DB instance in a VPC ................................................................. 2701
Tutorial: Create a VPC for use with a DB instance (IPv4 only) .............................................. 2706
Tutorial: Create a VPC for use with a DB instance (dual-stack mode) .................................... 2711
Moving a DB instance into a VPC .................................................................................... 2718
Quotas and constraints .................................................................................................................. 2720
Quotas in Amazon RDS ......................................................................................................... 2720

xxi
Amazon Relational Database Service User Guide

Naming constraints in Amazon RDS ........................................................................................ 2723


Maximum number of database connections ............................................................................. 2724
File size limits in Amazon RDS ................................................................................................ 2726
Troubleshooting ............................................................................................................................ 2727
Can't connect to DB instance ................................................................................................. 2727
Testing the DB instance connection ................................................................................. 2728
Troubleshooting connection authentication ...................................................................... 2729
Security issues ...................................................................................................................... 2729
Error message "failed to retrieve account attributes, certain console functions may be
impaired." .................................................................................................................... 2729
Troubleshooting incompatible-network state ............................................................................ 2730
Causes ......................................................................................................................... 2730
Resolution .................................................................................................................... 2730
Resetting the DB instance owner password .............................................................................. 2731
DB instance outage or reboot ................................................................................................. 2731
Parameter changes not taking effect ....................................................................................... 2732
DB instance out of storage .................................................................................................... 2732
Insufficient DB instance capacity ............................................................................................. 2733
RDS freeable memory issues .................................................................................................. 2734
MySQL and MariaDB issues .................................................................................................... 2734
Maximum MySQL and MariaDB connections ..................................................................... 2734
Diagnosing and resolving incompatible parameters status for a memory limit ....................... 2735
Diagnosing and resolving lag between read replicas .......................................................... 2736
Diagnosing and resolving a MySQL or MariaDB read replication failure ................................. 2737
Creating triggers with binary logging enabled requires SUPER privilege ............................... 2738
Diagnosing and resolving point-in-time restore failures ..................................................... 2740
Replication stopped error .............................................................................................. 2740
Read replica create fails or replication breaks with fatal error 1236 ..................................... 2741
Can't set backup retention period to 0 .................................................................................... 2741
Amazon RDS API reference ............................................................................................................ 2742
Using the Query API ............................................................................................................. 2742
Query parameters ......................................................................................................... 2742
Query request authentication ......................................................................................... 2742
Troubleshooting applications .................................................................................................. 2742
Retrieving errors ........................................................................................................... 2743
Troubleshooting tips ..................................................................................................... 2743
Document history ......................................................................................................................... 2744
Earlier updates ..................................................................................................................... 2812
AWS glossary ............................................................................................................................... 2830

xxii
Amazon Relational Database Service User Guide
Overview

What is Amazon Relational Database


Service (Amazon RDS)?
Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up,
operate, and scale a relational database in the AWS Cloud. It provides cost-efficient, resizable capacity
for an industry-standard relational database and manages common database administration tasks.
Note
This guide covers Amazon RDS database engines other than Amazon Aurora. For information
about using Amazon Aurora, see the Amazon Aurora User Guide.

If you are new to AWS products and services, begin learning more with the following resources:

• For an overview of all AWS products, see What is cloud computing?


• Amazon Web Services provides a number of database services. To learn more about the variety of
database options available on AWS, see Choosing an AWS database service and Running databases on
AWS.

Overview of Amazon RDS


Why do you want to run a relational database in the AWS Cloud? Because AWS takes over many of the
difficult and tedious management tasks of a relational database.

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)

Amazon EC2 and on-premises databases


Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the AWS Cloud.
Amazon EC2 eliminates your need to invest in hardware up front, so you can develop and deploy
applications faster.

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

Feature On-premises management Amazon EC2 management

Application optimization Customer Customer

Scaling Customer Customer

High availability Customer Customer

Database backups Customer Customer

Database software patching Customer Customer

Database software install Customer Customer

Operating system (OS) patching Customer Customer

OS installation Customer Customer

Server maintenance Customer AWS

Hardware lifecycle Customer AWS

Power, network, and cooling Customer AWS

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.

Amazon RDS and Amazon EC2


Amazon RDS is a managed database service. It's responsible for most management tasks. By eliminating
tedious manual tasks, Amazon RDS frees you to focus on your application and your users. We
recommend Amazon RDS over Amazon EC2 as your default choice for most database deployments.

In the following table, you can find a comparison of the management models in Amazon EC2 and
Amazon RDS.

Feature Amazon EC2 management Amazon RDS management

Application optimization Customer Customer

Scaling Customer AWS

High availability Customer AWS

Database backups Customer AWS

Database software patching Customer AWS

Database software install Customer AWS

OS patching Customer AWS

OS installation Customer AWS

Server maintenance AWS AWS

Hardware lifecycle AWS AWS

2
Amazon Relational Database Service User Guide
Amazon RDS Custom for Oracle and Microsoft SQL Server

Feature Amazon EC2 management Amazon RDS management

Power, network, and cooling AWS AWS

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).

Amazon RDS Custom for Oracle and Microsoft SQL


Server
Amazon RDS Custom is an RDS management type that gives you full access to your database and
operating system.

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).

Amazon RDS on AWS Outposts


Amazon RDS on AWS Outposts extends RDS for SQL Server, RDS for MySQL, and RDS for PostgreSQL
databases to AWS Outposts environments. AWS Outposts uses the same hardware as in public AWS
Regions to bring AWS services, infrastructure, and operation models on-premises. With RDS on Outposts,
you can provision managed DB instances close to the business applications that must run on-premises.
For more information, see Working with Amazon RDS on AWS Outposts (p. 1177).

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:

• General Purpose (SSD)


• Provisioned IOPS (PIOPS)
• Magnetic

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 Virtual Private Cloud (Amazon VPC)


You can run a DB instance on a virtual private cloud (VPC) using the Amazon Virtual Private Cloud
(Amazon VPC) service. When you use a VPC, you have control over your virtual networking environment.
You can choose your own IP address range, create subnets, and configure routing and access control lists.
The basic functionality of Amazon RDS is the same whether it's running in a VPC or not. Amazon RDS
manages backups, software patching, automatic failure detection, and recovery. There's no additional
cost to run your DB instance in a VPC. For more information on using Amazon VPC with RDS, see Amazon
VPC VPCs and Amazon RDS (p. 2688).

Amazon RDS uses Network Time Protocol (NTP) to synchronize the time on DB instances.

AWS Regions and Availability Zones


Amazon cloud computing resources are housed in highly available data center facilities in different areas
of the world (for example, North America, Europe, or Asia). Each data center location is called an AWS
Region.

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).

Amazon RDS monitoring


There are several ways that you can track the performance and health of a DB instance. You can use
the Amazon CloudWatch service to monitor the performance and health of a DB instance. CloudWatch
performance charts are shown in the Amazon RDS console. You can also subscribe to Amazon RDS
events to be notified about changes to a DB instance, DB snapshot, or DB parameter group. For more
information, see Monitoring metrics in an Amazon RDS instance (p. 678).

How to work with Amazon RDS


There are several ways that you can interact with Amazon RDS.

5
Amazon Relational Database Service User Guide
AWS Management Console

AWS Management Console


The AWS Management Console is a simple web-based user interface. You can manage your DB instances
from the console with no programming required. To access the Amazon RDS console, sign in to the AWS
Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/.

Command line interface


You can use the AWS Command Line Interface (AWS CLI) to access the Amazon RDS API interactively. To
install the AWS CLI, see Installing the AWS Command Line Interface. To begin using the AWS CLI for RDS,
see AWS Command Line Interface reference for Amazon RDS.

Amazon RDS APIs


If you are a developer, you can access the Amazon RDS programmatically using APIs. For more
information, see Amazon RDS API reference (p. 2742).

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.

How you are charged for Amazon RDS


When you use Amazon RDS, you can choose to use on-demand DB instances or reserved DB instances.
For more information, see DB instance billing for Amazon RDS (p. 163).

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).

Topics specific to database engines


You can review information specific to a particular DB engine in the following sections:

• Amazon RDS for MariaDB (p. 1255)


• Amazon RDS for Microsoft SQL Server (p. 1354)
• Amazon RDS for MySQL (p. 1622)
• Amazon RDS for Oracle (p. 1785)
• Amazon RDS for PostgreSQL (p. 2147)

6
Amazon Relational Database Service User Guide
Topics specific to database engines

7
Amazon Relational Database Service User Guide
Amazon RDS shared responsibility model

Amazon RDS shared responsibility model


Amazon RDS is responsible for hosting the software components and infrastructure of DB instances and
DB cluster. You are responsible for query tuning, which is the process of adjusting SQL queries to improve
performance. Query performance is highly dependent on database design, data size, data distribution,
application workload, and query patterns, which can vary greatly. Monitoring and tuning are highly
individualized processes that you own for your RDS databases. You can use Amazon RDS Performance
Insights and other tools to identify problematic queries.

8
Amazon Relational Database Service User Guide
DB instances

Amazon RDS DB instances


A DB instance is an isolated database environment running in the cloud. It is the basic building block of
Amazon RDS. A DB instance can contain multiple user-created databases, and can be accessed using the
same client tools and applications you might use to access a standalone database instance. DB instances
are simple to create and modify with the AWS command line tools, Amazon RDS API operations, or the
AWS Management Console.
Note
Amazon RDS supports access to databases using any standard SQL client application. Amazon
RDS does not allow direct host access.

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.

In the example endpoint db1.abcdefghijkl.us-east-1.rds.amazonaws.com, the string


abcdefghijkl is a unique identifier for a specific combination of AWS Region and AWS account. The
identifier abcdefghijkl in the example is internally generated by RDS and doesn't change for the
specified combination of Region and account. Thus, all your DB instances in this Region share the same
fixed identifier. Consider the following features of the fixed identifier:

• 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)

DB instance class types


Amazon RDS supports DB instance classes for the following use cases:

• General-purpose (p. 11)


• Memory-optimized (p. 12)
• Burstable-performance (p. 14)

For more information about Amazon EC2 instance types, see Instance types in the Amazon EC2
documentation.

General-purpose instance class types


The following general-purpose DB instance class types are available:

• 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.

Action or recommendation Dates

You can no longer create RDS DB instances that use Now


db.m3 DB instance classes.

Amazon RDS started automatic upgrades of RDS February 1, 2023


DB instances that use db.m3 DB instance classes to
equivalent db.m5 DB instance classes.

Memory-optimized instance class types


The memory-optimized Z family supports the following instance class type:

• 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.

The memory-optimized X family supports the following instance class types:

• 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

The memory-optimized R family supports the following 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.

Action or recommendation Dates

You can no longer create RDS for Oracle DB instances Now


that use db.r4 DB instance classes.

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.

• db.r3 – Instance classes that provide memory optimization.

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.

Action or recommendation Dates

You can no longer create RDS DB instances that use Now


db.r3 DB instance classes.

13
Amazon Relational Database Service User Guide
Supported DB engines

Action or recommendation Dates

Amazon RDS started automatic upgrades of RDS February 1, 2023


DB instances that use db.r3 DB instance classes to
equivalent db.r5 DB instance classes.

Burstable-performance instance class types


The following burstable-performance DB instance class types are available:

• 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).

Supported DB engines for DB instance classes


The following are DB engine–specific considerations for DB instance classes:

Microsoft SQL Server

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

The instance class is supported for all versions of the DB engine.

No

The instance class isn't supported for the DB engine.

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).

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m7g – general-purpose instance classes powered by AWS Graviton3 processors

db.m7g.16xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.m7g.12xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

15
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m7g.8xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.m7g.4xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.m7g.2xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

16
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m7g.xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.m7g.large All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.m6g – general-purpose instance classes powered by AWS Graviton2 processors

db.m6g.16xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

17
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6g.12xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.m6g.8xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.m6g.4xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.m6g.2xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

18
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6g.xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.m6g.large All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.m6gd – general-purpose instance classes powered by AWS Graviton2 processors

db.m6gd.16xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions,
versions, PostgreSQL
MariaDB 13.4 and
10.5.16 and PostgreSQL
higher 10.5 13.7 and
versions, higher 13
and MariaDB versions
10.4.25 and
higher 10.4
versions

19
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6gd.12xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions,
versions, PostgreSQL
MariaDB 13.4 and
10.5.16 and PostgreSQL
higher 10.5 13.7 and
versions, higher 13
and MariaDB versions
10.4.25 and
higher 10.4
versions

db.m6gd.8xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions,
versions, PostgreSQL
MariaDB 13.4 and
10.5.16 and PostgreSQL
higher 10.5 13.7 and
versions, higher 13
and MariaDB versions
10.4.25 and
higher 10.4
versions

db.m6gd.4xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions,
versions, PostgreSQL
MariaDB 13.4 and
10.5.16 and PostgreSQL
higher 10.5 13.7 and
versions, higher 13
and MariaDB versions
10.4.25 and
higher 10.4
versions

20
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6gd.2xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions,
versions, PostgreSQL
MariaDB 13.4 and
10.5.16 and PostgreSQL
higher 10.5 13.7 and
versions, higher 13
and MariaDB versions
10.4.25 and
higher 10.4
versions

db.m6gd.xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions,
versions, PostgreSQL
MariaDB 13.4 and
10.5.16 and PostgreSQL
higher 10.5 13.7 and
versions, higher 13
and MariaDB versions
10.4.25 and
higher 10.4
versions

db.m6gd.large All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions,
versions, PostgreSQL
MariaDB 13.4 and
10.5.16 and PostgreSQL
higher 10.5 13.7 and
versions, higher 13
and MariaDB versions
10.4.25 and
higher 10.4
versions

db.m6id – general-purpose instance classes powered by 3rd generation Intel Xeon Scalable processors

21
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6id.32xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.m6id.24xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.m6id.16xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

22
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6id.12xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.m6id.8xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.m6id.4xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

23
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6id.2xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.m6id.xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.m6id.large MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.m6i – general-purpose instance classes

24
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6i.32xlarge All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

db.m6i.24xlarge All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

db.m6i.16xlarge All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

25
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6i.12xlarge All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

db.m6i.8xlarge All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

db.m6i.4xlarge All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

26
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m6i.2xlarge All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

db.m6i.xlarge All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

db.m6i.large All MariaDB Yes MySQL Oracle All


10.11 version 8.0.28 Database 19c PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4, 12.8,
10.5.15 and 11.13 and
higher 10.5 higher
versions,
and MariaDB
10.4.24 and
higher 10.4
versions

db.m5d – general-purpose instance classes

27
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m5d.24xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.m5d.16xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.m5d.12xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

28
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m5d.8xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.m5d.4xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.m5d.2xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

29
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m5d.xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.m5d.large All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.m5 – general-purpose instance classes

db.m5.24xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.m5.16xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

30
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m5.12xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.m5.8xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.m5.4xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.m5.2xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.m5.xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.m5.large Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.m4 – general-purpose instance classes

31
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m4.16xlarge All MariaDB Yes 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.m4.10xlarge All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.m4.4xlarge All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.m4.2xlarge All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.m4.xlarge All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.m4.large All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.m3 – general-purpose instance classes

32
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.m3.2xlarge No Yes Yes Deprecated Deprecated

db.m3.xlarge No Yes Yes Deprecated Deprecated

db.m3.large No Yes Yes Deprecated Deprecated

db.m3.medium No Yes Yes Deprecated Deprecated

db.x2g – memory-optimized instance classes powered by AWS Graviton2 processors

db.x2g.16xlarge All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.x2g.12xlarge All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.x2g.8xlarge All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

33
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.x2g.4xlarge All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.x2g.2xlarge All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.x2g.xlarge All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.x2g.large All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.x2idn – memory-optimized instance classes powered by 3rd generation Intel Xeon Scalable processors

34
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.x2idn.32xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition only PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.6 and 13.9
higher 10.6 versions.
versions,
MariaDB
10.5.16 and
higher 10.5
versions,
and MariaDB
10.4.25 and
higher 10.4
versions

db.x2idn.24xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition only PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.6 and 13.9
higher 10.6 versions.
versions,
MariaDB
10.5.16 and
higher 10.5
versions,
and MariaDB
10.4.25 and
higher 10.4
versions

db.x2idn.16xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition only PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.6 and 13.9
higher 10.6 versions.
versions,
MariaDB
10.5.16 and
higher 10.5
versions,
and MariaDB
10.4.25 and
higher 10.4
versions

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

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.x2iedn.32xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition only PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.x2iedn.24xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition only PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.x2iedn.16xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition only PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

36
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.x2iedn.8xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition only PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.x2iedn.4xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition and PostgreSQL
versions, Standard 15 versions,
MariaDB Edition 2 PostgreSQL
10.6.7 and (SE2) 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.x2iedn.2xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition and PostgreSQL
versions, Standard 15 versions,
MariaDB Edition 2 PostgreSQL
10.6.7 and (SE2) 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

37
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.x2iedn.xlarge All MariaDB No MySQL 8.0.28 Enterprise All


10.11 and higher Edition and PostgreSQL
versions, Standard 15 versions,
MariaDB Edition 2 PostgreSQL
10.6.7 and (SE2) 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

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)

db.z1d – memory-optimized instance classes

db.z1d.12xlarge No Yes No Yes No

db.z1d.6xlarge No Yes No Yes No

db.z1d.3xlarge No Yes No Yes No

db.z1d.2xlarge No Yes No Yes No

db.z1d.xlarge No Yes No Yes No

db.z1d.large No Yes No Yes No

db.x1e – memory-optimized instance classes

db.x1e.32xlarge No Yes No Yes No

38
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.x1e.16xlarge No Yes No Yes No

db.x1e.8xlarge No Yes No Yes No

db.x1e.4xlarge No Yes No Yes No

db.x1e.2xlarge No Yes No Yes No

db.x1e.xlarge No Yes No Yes No

db.x1 – memory-optimized instance classes

db.x1.32xlarge No Yes No Yes No

db.x1.16xlarge No Yes No Yes No

db.r7g – memory-optimized instance classes powered by AWS Graviton3 processors

db.r7g.16xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.r7g.12xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

39
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r7g.8xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.r7g.4xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.r7g.2xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

40
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r7g.xlarge All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.r7g.large All MariaDB No MySQL 8.0.28 No PostgreSQL


10.11 and higher 15.2 and
versions, higher 15
MariaDB versions,
10.6.10 and PostgreSQL
higher 10.6 14.5 and
versions, higher 14
MariaDB versions, and
10.5.17 and PostgreSQL
higher 10.5 13.4 and
versions, higher 13
and MariaDB versions
10.4.26 and
higher 10.4
versions

db.r6g – memory-optimized instance classes powered by AWS Graviton2 processors

db.r6g.16xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

41
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6g.12xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.r6g.8xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.r6g.4xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.r6g.2xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

42
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6g.xlarge All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.r6g.large All MariaDB No MySQL 8.0.23 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions;
PostgreSQL
12.7 and
higher

db.r6gd – memory-optimized instance classes powered by AWS Graviton2 processors

db.r6gd.16xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4 and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

43
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6gd.12xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4 and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r6gd.8xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4 and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r6gd.4xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4 and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

44
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6gd.2xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4 and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r6gd.xlarge All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4 and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r6gd.large All MariaDB No MySQL 8.0.28 No All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4 and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r6i – memory-optimized instance classes

45
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6i.32xlarge All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

db.r6i.24xlarge All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

46
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6i.16xlarge All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

db.r6i.12xlarge All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

47
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6i.8xlarge All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

db.r6i.4xlarge All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

48
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6i.2xlarge All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

db.r6i.xlarge All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

49
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6i.large All MariaDB Yes MySQL Yes All


10.11 version 8.0.28 PostgreSQL
versions, and higher 15
MariaDB versions, all
10.6.7 and PostgreSQL
higher 10.6 14 versions;
versions, PostgreSQL
MariaDB 13.4 and
10.5.15 and higher 13
higher 10.5 versions,
versions, PostgreSQL
and MariaDB 12.8 and
10.4.24 and higher 12
higher 10.4 versions,
versions PostgreSQL
11.13 and
higher 13
versions, and
PostgreSQL
10.21 and
higher 10
versions

db.r6id – memory-optimized instance classes powered by 3rd generation Intel Xeon Scalable processors

db.r6id.32xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

50
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6id.24xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.r6id.16xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.r6id.12xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

51
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6id.8xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.r6id.4xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.r6id.2xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

52
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r6id.xlarge MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.r6id.large MariaDB No MySQL No PostgreSQL


version version 8.0.28 15.2 and
10.6.10 and and higher higher 15
higher 10.6 versions,
versions, PostgreSQL
MariaDB 14.5 and
version higher 14
10.5.16 and versions, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
version versions
10.4.25 and
higher 10.4
versions

db.r5d – memory-optimized instance classes

db.r5d.24xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

53
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r5d.16xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r5d.12xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r5d.8xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

54
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r5d.4xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r5d.2xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

db.r5d.xlarge All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

55
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r5d.large All MariaDB Yes MySQL 8.0.28 Yes All


10.11 and higher PostgreSQL
versions, 15 versions,
MariaDB PostgreSQL
10.6.7 and 14.5 and
higher 10.6 higher 14
versions, versions,
MariaDB PostgreSQL
10.5.16 and 13.4, and
higher 10.5 PostgreSQL
versions, 13.7 and
and MariaDB higher 13
10.4.25 and versions
higher 10.4
versions

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

db.r5b – memory-optimized instance classes

56
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r5b.24xlarge All MariaDB Yes MySQL 8.0.25 Yes All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.5 and PostgreSQL
higher 10.6 14
versions, versions, all
MariaDB PostgreSQL
10.5.12 and 13 versions;
higher 10.5 PostgreSQL
versions, 12.7 and
MariaDB higher
10.4.24 and
higher 10.4
versions,
and MariaDB
10.3.34 and
higher 10.3
versions

db.r5b.16xlarge All MariaDB Yes MySQL 8.0.25 Yes All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.5 and PostgreSQL
higher 10.6 14
versions, versions, all
MariaDB PostgreSQL
10.5.12 and 13 versions;
higher 10.5 PostgreSQL
versions, 12.7 and
MariaDB higher
10.4.24 and
higher 10.4
versions,
and MariaDB
10.3.34 and
higher 10.3
versions

57
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r5b.12xlarge All MariaDB Yes MySQL 8.0.25 Yes All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.5 and PostgreSQL
higher 10.6 14
versions, versions, all
MariaDB PostgreSQL
10.5.12 and 13 versions;
higher 10.5 PostgreSQL
versions, 12.7 and
MariaDB higher
10.4.24 and
higher 10.4
versions,
and MariaDB
10.3.34 and
higher 10.3
versions

db.r5b.8xlarge All MariaDB Yes MySQL 8.0.25 >Yes All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.5 and PostgreSQL
higher 10.6 14
versions, versions, all
MariaDB PostgreSQL
10.5.12 and 13 versions;
higher 10.5 PostgreSQL
versions, 12.7 and
MariaDB higher
10.4.24 and
higher 10.4
versions,
and MariaDB
10.3.34 and
higher 10.3
versions

58
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r5b.4xlarge All MariaDB Yes MySQL 8.0.25 Yes All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.5 and PostgreSQL
higher 10.6 14
versions, versions, all
MariaDB PostgreSQL
10.5.12 and 13 versions;
higher 10.5 PostgreSQL
versions, 12.7 and
MariaDB higher
10.4.24 and
higher 10.4
versions,
and MariaDB
10.3.34 and
higher 10.3
versions

db.r5b.2xlarge All MariaDB Yes MySQL 8.0.25 Yes All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.5 and PostgreSQL
higher 10.6 14
versions, versions, all
MariaDB PostgreSQL
10.5.12 and 13 versions;
higher 10.5 PostgreSQL
versions, 12.7 and
MariaDB higher
10.4.24 and
higher 10.4
versions,
and MariaDB
10.3.34 and
higher 10.3
versions

59
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r5b.xlarge All MariaDB Yes MySQL 8.0.25 Yes All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.5 and PostgreSQL
higher 10.6 14
versions, versions, all
MariaDB PostgreSQL
10.5.12 and 13 versions;
higher 10.5 PostgreSQL
versions, 12.7 and
MariaDB higher
10.4.24 and
higher 10.4
versions,
and MariaDB
10.3.34 and
higher 10.3
versions

db.r5b.large All MariaDB Yes MySQL 8.0.25 Yes All


10.11 and higher PostgreSQL
versions, 15
MariaDB versions, all
10.6.5 and PostgreSQL
higher 10.6 14
versions, versions, all
MariaDB PostgreSQL
10.5.12 and 13 versions;
higher 10.5 PostgreSQL
versions, 12.7 and
MariaDB higher
10.4.24 and
higher 10.4
versions,
and MariaDB
10.3.34 and
higher 10.3
versions

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

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

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

db.r5 – memory-optimized instance classes

db.r5.24xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.r5.16xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.r5.12xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.r5.8xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.r5.4xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

61
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r5.2xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.r5.xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.r5.large Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, and 11
versions;
10.17 and
higher; 9.6.22
and higher

db.r4 – memory-optimized instance classes

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

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

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

db.r3 – memory-optimized instance classes

db.r3.8xlarge** All MariaDB Yes Yes Deprecated Deprecated


10.6 versions,
all MariaDB
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.r3.4xlarge All MariaDB Yes Yes Deprecated Deprecated


10.6 versions,
all MariaDB
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.r3.2xlarge All MariaDB Yes Yes Deprecated Deprecated


10.6 versions,
all MariaDB
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

63
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.r3.xlarge All MariaDB Yes Yes Deprecated Deprecated


10.6 versions,
all MariaDB
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.r3.large All MariaDB Yes Yes Deprecated Deprecated


10.6 versions,
all MariaDB
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.t4g – burstable-performance instance classes powered by AWS Graviton2 processors

db.t4g.2xlarge All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.t4g.xlarge All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

64
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.t4g.large All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.t4g.medium All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14 and 13
versions, and versions, and
all MariaDB PostgreSQL
10.4 versions 12.7 and
higher 12
versions

db.t4g.small All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.t4g.micro All MariaDB No MySQL 8.0.25 No All


10.11 and higher PostgreSQL
versions, all 15
MariaDB 10.6 versions, all
versions, all PostgreSQL
MariaDB 10.5 14
versions, and versions, all
all MariaDB PostgreSQL
10.4 versions 13 versions,
PostgreSQL
12.7 and
higher

db.t3 – burstable-performance instance classes

65
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.t3.2xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, 11, and
10 versions;
PostgreSQL
9.6.22 and
higher
versions

db.t3.xlarge Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, 11, and
10 versions;
PostgreSQL
9.6.22 and
higher
versions

db.t3.large Yes Yes Yes Yes All


PostgreSQL
15, 14, 13, 12,
11, and 10
versions, and
PostgreSQL
9.6.22 and
higher
versions

db.t3.medium Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, 11, and
10 versions;
PostgreSQL
9.6.22 and
higher
versions

db.t3.small Yes Yes Yes Yes All


PostgreSQL
15, 14, 13,
12, 11, and
10 versions;
PostgreSQL
9.6.22 and
higher
versions

66
Amazon Relational Database Service User Guide
Supported DB engines

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.t3.micro Yes No Yes Only on All


Oracle PostgreSQL
Database 15, 14, 13,
12c Release 12, 11, and
1 (12.1.0.2), 10 versions;
which is PostgreSQL
deprecated 9.6.22 and
higher
versions

db.t2 – burstable-performance instance classes

db.t2.2xlarge All MariaDB No 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.t2.xlarge All MariaDB No 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.t2.large All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.t2.medium All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

67
Amazon Relational Database Service User Guide
Determining DB instance class support in AWS Regions

Instance class MariaDB Microsoft MySQL Oracle PostgreSQL


SQL Server

db.t2.small All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

db.t2.micro All MariaDB Yes Yes Deprecated Lower than


10.6 versions, PostgreSQL
all MariaDB 13
10.5 versions,
all MariaDB
10.4 versions,
all MariaDB
10.3 versions

Determining DB instance class support in AWS


Regions
To determine the DB instance classes supported by each DB engine in a specific AWS Region, you can
take one of several approaches. You can use the AWS Management Console, the Amazon RDS Pricing
page, or the describe-orderable-db-instance-options command for the AWS Command Line Interface
(AWS CLI).
Note
When you perform operations with the AWS CLI, it automatically shows the supported DB
instance classes for a specific DB engine, DB engine version, and AWS Region. Examples of the
operations that you can perform include creating and modifying a DB instance.

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)

Using the Amazon RDS pricing page to determine DB instance


class support in AWS Regions
You can use the Amazon RDS Pricing page to determine the DB instance classes supported by each DB
engine in a specific AWS Region.

To use the pricing page to determine the DB instance classes supported by each engine in a
Region

1. Go to Amazon RDS Pricing.

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.

Using the AWS CLI to determine DB instance class support in


AWS Regions
You can use the AWS CLI to determine which DB instance classes are supported for specific DB engines
and DB engine versions in an AWS Region. The following table shows the valid DB engine values.

Engine names Engine values in CLI More information about versions


commands

MariaDB mariadb MariaDB on Amazon RDS versions (p. 1265)

Microsoft SQL Server sqlserver-ee Microsoft SQL Server versions on Amazon


RDS (p. 1362)
sqlserver-se

sqlserver-ex

sqlserver-web

MySQL mysql MySQL on Amazon RDS versions (p. 1627)

Oracle oracle-ee Amazon RDS for Oracle Release Notes

oracle-se2

PostgreSQL postgres Available PostgreSQL database versions (p. 2154)

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)

Listing the DB instance classes that are supported by a specific DB engine


version in an AWS Region
To list the DB instance classes that are supported by a specific DB engine version in an AWS Region, run
the following command.

69
Amazon Relational Database Service User Guide
Determining DB instance class support in AWS Regions

For Linux, macOS, or Unix:

aws rds describe-orderable-db-instance-options --engine engine --engine-version version \


--query "*[].{DBInstanceClass:DBInstanceClass,StorageType:StorageType}|[?
StorageType=='gp2']|[].{DBInstanceClass:DBInstanceClass}" \
--output text \
--region region

For Windows:

aws rds describe-orderable-db-instance-options --engine engine --engine-version version ^


--query "*[].{DBInstanceClass:DBInstanceClass,StorageType:StorageType}|[?
StorageType=='gp2']|[].{DBInstanceClass:DBInstanceClass}" ^
--output text ^
--region region

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 Linux, macOS, or Unix:

aws rds describe-orderable-db-instance-options --engine postgres --engine-version 13.6 \


--query "*[].{DBInstanceClass:DBInstanceClass,StorageType:StorageType}|[?
StorageType=='gp2']|[].{DBInstanceClass:DBInstanceClass}" \
--output text \
--region us-east-1

For Windows:

aws rds describe-orderable-db-instance-options --engine postgres --engine-version 13.6 ^


--query "*[].{DBInstanceClass:DBInstanceClass,StorageType:StorageType}|[?
StorageType=='gp2']|[].{DBInstanceClass:DBInstanceClass}" ^
--output text ^
--region us-east-1

Listing the DB engine versions that support a specific DB instance class in an


AWS Region
To list the DB engine versions that support a specific DB instance class in an AWS Region, run the
following command.

For Linux, macOS, or Unix:

aws rds describe-orderable-db-instance-options --engine engine --db-instance-


class DB_instance_class \
--query "*[].{EngineVersion:EngineVersion,StorageType:StorageType}|[?
StorageType=='gp2']|[].{EngineVersion:EngineVersion}" \
--output text \
--region region

For Windows:

aws rds describe-orderable-db-instance-options --engine engine --db-instance-


class DB_instance_class ^
--query "*[].{EngineVersion:EngineVersion,StorageType:StorageType}|[?
StorageType=='gp2']|[].{EngineVersion:EngineVersion}" ^
--output text ^

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 Linux, macOS, or Unix:

aws rds describe-orderable-db-instance-options --engine postgres --db-instance-class


db.r5.large \
--query "*[].{EngineVersion:EngineVersion,StorageType:StorageType}|[?
StorageType=='gp2']|[].{EngineVersion:EngineVersion}" \
--output text \
--region us-east-1

For Windows:

aws rds describe-orderable-db-instance-options --engine postgres --db-instance-class


db.r5.large ^
--query "*[].{EngineVersion:EngineVersion,StorageType:StorageType}|[?
StorageType=='gp2']|[].{EngineVersion:EngineVersion}" ^
--output text ^
--region us-east-1

Changing your DB instance class


You can change the CPU and memory available to a DB instance by changing its DB instance class. To
change the DB instance class, modify your DB instance by following the instructions in Modifying an
Amazon RDS DB instance (p. 401).

Configuring the processor for a DB instance class in


RDS for Oracle
Amazon RDS DB instance classes support Intel Hyper-Threading Technology, which enables multiple
threads to run concurrently on a single Intel Xeon CPU core. Each thread is represented as a virtual CPU
(vCPU) on the DB instance. A DB instance has a default number of CPU cores, which varies according to
DB instance class. For example, a db.m4.xlarge DB instance class has two CPU cores and two threads per
core by default—four vCPUs in total.
Note
Each vCPU is a hyperthread of an Intel Xeon CPU core.

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)

Overview of configuring the processor


When you use RDS for Oracle, you can usually find a DB instance class that has a combination of memory
and number of vCPUs to suit your workloads. However, you can also specify the following processor
features to optimize youri RDS for Oracle DB instance for specific workloads or business needs:

• 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.

DB instance classes that support processor configuration


You can configure the number of CPU cores and threads per core only when the following conditions are
met:

• 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 – memory-optimized instance classes

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.m6i.32xlarge 128 64 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, 50,
52, 54, 56, 58,
60, 62, 64

db.m5 – general-purpose instance classes

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.m5.24xlarge 96 48 2 4, 6, 8, 10, 12, 1, 2


14, 16, 18, 20,
22, 24, 26, 28,
30, 32, 34, 36,
38, 40, 42, 44,
46, 48

db.m5d – general-purpose instance classes

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.m5d.24xlarge 96 48 2 4, 6, 8, 10, 12, 1, 2


14, 16, 18, 20,
22, 24, 26, 28,
30, 32, 34, 36,
38, 40, 42, 44,
46, 48

db.m4 – general-purpose instance classes

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 – memory-optimized instance classes

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.r6i.32xlarge 128 64 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, 50,
52, 54, 56, 58,
60, 62, 64

db.r5 – memory-optimized instance classes

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.r5.24xlarge 96 48 2 4, 6, 8, 10, 12, 1, 2


14, 16, 18, 20,
22, 24, 26, 28,
30, 32, 34, 36,
38, 40, 42, 44,
46, 48

db.r5 – memory-optimized instance classes

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.r5b.24xlarge 96 48 2 4, 6, 8, 10, 12, 1, 2


14, 16, 18, 20,
22, 24, 26, 28,
30, 32, 34, 36,
38, 40, 42, 44,
46, 48

db.r5d – memory-optimized instance classes

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.r5d.24xlarge 96 48 2 4, 6, 8, 10, 12, 1, 2


14, 16, 18, 20,
22, 24, 26, 28,
30, 32, 34, 36,
38, 40, 42, 44,
46, 48

db.r4 – memory-optimized instance classes

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 – memory-optimized instance classes

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 – memory-optimized instance classes

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.x2idn.32xlarge 128 64 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, 50,
52, 54, 56, 58,
60, 62, 64

db.x2iedn – memory-optimized instance classes

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.x2iedn.32xlarge 128 64 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, 50,
52, 54, 56, 58,
60, 62, 64

db.x2iezn – memory-optimized instance classes

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 – memory-optimized instance classes

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.x1.32xlarge 128 64 2 4, 8, 12, 16, 20, 1, 2


24, 28, 32, 36,
40, 44, 48, 52,
56, 60, 64

db.x1e – memory-optimized instance classes

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.x1e.32xlarge 128 64 2 4, 8, 12, 16, 20, 1, 2


24, 28, 32, 36,
40, 44, 48, 52,
56, 60, 64

db.z1d – memory-optimized instance classes

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

db.z1d.12xlarge 48 24 2 4, 6, 8, 10, 12, 1, 2


14, 16, 18, 20,
22, 24

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:

• Creating an Amazon RDS DB instance (p. 300)


• Modifying an Amazon RDS DB instance (p. 401)
• Restoring from a DB snapshot (p. 615)
• Restoring a DB instance to a specified time (p. 660)

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.

The option has the following syntax.

--processor-features "Name=coreCount,Value=<value>" "Name=threadsPerCore,Value=<value>"

The following are examples that configure the processor:

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)

Setting the number of CPU cores for a DB instance

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 Linux, macOS, or Unix:

aws rds modify-db-instance \


--db-instance-identifier mydbinstance \
--processor-features "Name=coreCount,Value=4" \
--apply-immediately

For Windows:

aws rds modify-db-instance ^


--db-instance-identifier mydbinstance ^
--processor-features "Name=coreCount,Value=4" ^
--apply-immediately

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 Linux, macOS, or Unix:

aws rds modify-db-instance \


--db-instance-identifier mydbinstance \
--processor-features "Name=coreCount,Value=4" "Name=threadsPerCore,Value=1" \
--apply-immediately

For Windows:

aws rds modify-db-instance ^


--db-instance-identifier mydbinstance ^
--processor-features "Name=coreCount,Value=4" "Name=threadsPerCore,Value=1" ^
--apply-immediately

Viewing the valid processor values for a DB instance class

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.

aws rds describe-orderable-db-instance-options --engine oracle-ee --db-instance-class


db.r3.large

Following is sample output for the command in JSON format.

{
"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:

• describe-db-instances – Shows the processor information for the specified DB instance.


• describe-db-snapshots – Shows the processor information for the specified DB snapshot.
• describe-valid-db-instance-modifications – Shows the valid modifications to the processor for the
specified DB instance.

In the output of the preceding commands, the values for the processor features are not null only if the
following conditions are met:

• You are using an RDS for Oracle DB instance.


• Your RDS for Oracle DB instance supports changing processor values.
• The current CPU core and thread settings are set to nondefault values.

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.

Returning to default processor settings for a DB instance

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 Linux, macOS, or Unix:

aws rds modify-db-instance \


--db-instance-identifier mydbinstance \
--use-default-processor-features \
--apply-immediately

For Windows:

aws rds modify-db-instance ^


--db-instance-identifier mydbinstance ^
--use-default-processor-features ^
--apply-immediately

Returning to the default number of CPU cores for a DB instance

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 Linux, macOS, or Unix:

aws rds modify-db-instance \


--db-instance-identifier mydbinstance \
--processor-features "Name=coreCount,Value=DEFAULT" \
--apply-immediately

For Windows:

aws rds modify-db-instance ^


--db-instance-identifier mydbinstance ^
--processor-features "Name=coreCount,Value=DEFAULT" ^
--apply-immediately

Returning to the default number of threads per core for a DB instance

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 Linux, macOS, or Unix:

aws rds modify-db-instance \


--db-instance-identifier mydbinstance \
--processor-features "Name=threadsPerCore,Value=DEFAULT" \
--apply-immediately

For Windows:

aws rds modify-db-instance ^


--db-instance-identifier mydbinstance ^
--processor-features "Name=threadsPerCore,Value=DEFAULT" ^
--apply-immediately

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.

The parameter has the following syntax.

ProcessFeatures "Name=coreCount,Value=<value>" "Name=threadsPerCore,Value=<value>"

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:

• DescribeDBInstances – Shows the processor information for the specified DB instance.


• DescribeDBSnapshots – Shows the processor information for the specified DB snapshot.
• DescribeValidDBInstanceModifications – Shows the valid modifications to the processor for the
specified DB instance.

In the output of the preceding operations, the values for the processor features are not null only if the
following conditions are met:

• You are using an RDS for Oracle DB instance.


• Your RDS for Oracle DB instance supports changing processor values.
• The current CPU core and thread settings are set to nondefault values.

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.

Hardware specifications for DB instance classes


The following terminology is used to describe hardware specifications for DB instance classes:

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

The network speed relative to other DB instance classes.

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)

db.m7g – general-purpose instance classes

db.m7g.16xlarge 64 — 256 EBS-optimized 20,000 30


only

db.m7g.12xlarge 48 — 192 EBS-optimized 15,000 22.5


only

db.m7g.8xlarge 32 — 128 EBS-optimized 10,000 15


only

db.m7g.4xlarge 16 — 64 EBS-optimized Up to 10,000 Up to 15


only

db.m7g.2xlarge* 8 — 32 EBS-optimized Up to 10,000 Up to 15


only

db.m7g.xlarge* 4 — 16 EBS-optimized Up to 10,000 Up to 12.5


only

db.m7g.large* 2 — 8 EBS-optimized Up to 10,000 Up to 12.5


only

db.m6g – general-purpose instance classes

db.m6g.16xlarge 64 — 256 EBS-optimized 19,000 25


only

db.m6g.12xlarge 48 — 192 EBS-optimized 13,500 20


only

db.m6g.8xlarge 32 — 128 EBS-optimized 9,500 12


only

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)

db.m6g.4xlarge 16 — 64 EBS-optimized 6,800 Up to 10


only

db.m6g.2xlarge* 8 — 32 EBS-optimized Up to 4,750 Up to 10


only

db.m6g.xlarge* 4 — 16 EBS-optimized Up to 4,750 Up to 10


only

db.m6g.large* 2 — 8 EBS-optimized Up to 4,750 Up to 10


only

db.m6gd – general-purpose instance classes with SSD storage

db.m6gd.16xlarge 64 — 256 2 x 1900 NVMe 19,000 25


SSD

db.m6gd.12xlarge 48 — 192 2 x 1425 NVMe 13,500 20


SSD

db.m6gd.8xlarge 32 — 128 1 x 1900 NVMe 9,000 12


SSD

db.m6gd.4xlarge 16 — 64 1 x 950 NVMe 4,750 Up to 10


SSD

db.m6gd.2xlarge 8 — 32 1 x 474 NVMe Up to 4,750 Up to 10


SSD

db.m6gd.xlarge 4 — 16 1 x 237 NVMe Up to 4,750 Up to 10


SSD

db.m6gd.large 2 — 8 1 x 118 NVMe Up to 4,750 Up to 10


SSD

db.m6id – general-purpose instance classes with SSD storage

db.m6id.32xlarge 128 — 512 4 x 1900 NVMe 40,000 50


SSD

db.m6id.24xlarge 96 — 384 4 x 1425 NVMe 30,000 37.5


SSD

db.m6id.16xlarge 64 — 256 2 x 1900 NVMe 20,000 25


SSD

db.m6id.12xlarge 48 — 192 2 x 1425 NVMe 15,000 18.75


SSD

db.m6id.8xlarge 32 — 128 1 x 1900 NVMe 10,000 12.5


SSD

db.m6id.4xlarge* 16 — 64 1 x 950 NVMe Up to 10,000 Up to 12.5


SSD

db.m6id.2xlarge* 8 — 32 1 x 474 NVMe Up to 10,000 Up to 12.5


SSD

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)

db.m6id.xlarge* 4 — 16 1 x 237 NVMe Up to 10,000 Up to 12.5


SSD

db.m6id.large* 2 — 8 1 x 118 NVMe Up to 10,000 Up to 12.5


SSD

db.m6i – general-purpose instance classes

db.m6i.32xlarge 128 — 512 EBS-optimized 50,000 40


only

db.m6i.24xlarge 96 — 384 EBS-optimized 37,500 30


only

db.m6i.16xlarge 64 — 256 EBS-optimized 25,000 20


only

db.m6i.12xlarge 48 — 192 EBS-optimized 18,750 15


only

db.m6i.8xlarge 32 — 128 EBS-optimized 12,500 10


only

db.m6i.4xlarge* 16 — 64 EBS-optimized Up to 12,500 Up to 10


only

db.m6i.2xlarge* 8 — 32 EBS-optimized Up to 12,500 Up to 10


only

db.m6i.xlarge* 4 — 16 EBS-optimized Up to 12,500 Up to 10


only

db.m6i.large* 2 — 8 EBS-optimized Up to 12,500 Up to 10


only

db.m5d – general-purpose instance classes that use NVMe SSDs

db.m5d.24xlarge 96 345 384 4 x 900 NVMe 19,000 25


SSD

db.m5d.16xlarge 64 262 256 4 x 600 NVMe 13,600 20


SSD

db.m5d.12xlarge 48 173 192 2 x 900 NVMe 9,500 10


SSD

db.m5d.8xlarge 32 131 128 2 x 600 NVMe 6,800 10


SSD

db.m5d.4xlarge 16 61 64 2 x 300 NVMe 4,750 Up to 10


SSD

db.m5d.2xlarge* 8 31 32 1 x 300 NVMe Up to 4,750 Up to 10


SSD

db.m5d.xlarge* 4 15 16 1 x 150 NVMe Up to 4,750 Up to 10


SSD

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)

db.m5d.large* 2 10 8 1 x 75 NVMe SSD Up to 4,750 Up to 10

db.m5 – general-purpose instance classes

db.m5.24xlarge 96 345 384 EBS-optimized 19,000 25


only

db.m5.16xlarge 64 262 256 EBS-optimized 13,600 20


only

db.m5.12xlarge 48 173 192 EBS-optimized 9,500 10


only

db.m5.8xlarge 32 131 128 EBS-optimized 6,800 10


only

db.m5.4xlarge 16 61 64 EBS-optimized 4,750 Up to 10


only

db.m5.2xlarge* 8 31 32 EBS-optimized Up to 4,750 Up to 10


only

db.m5.xlarge* 4 15 16 EBS-optimized Up to 4,750 Up to 10


only

db.m5.large* 2 10 8 EBS-optimized Up to 4,750 Up to 10


only

db.m4 – general-purpose instance classes

db.m4.16xlarge 64 188 256 EBS-optimized 10,000 25


only

db.m4.10xlarge 40 124.5 160 EBS-optimized 4,000 10


only

db.m4.4xlarge 16 53.5 64 EBS-optimized 2,000 High


only

db.m4.2xlarge 8 25.5 32 EBS-optimized 1,000 High


only

db.m4.xlarge 4 13 16 EBS-optimized 750 High


only

db.m4.large 2 6.5 8 EBS-optimized 450 Moderate


only

db.m3 – general-purpose instance classes

db.m3.2xlarge 8 26 30 EBS-optimized 1,000 High


only

db.m3.xlarge 4 13 15 EBS-optimized 500 High


only

db.m3.large 2 6.5 7.5 EBS only — Moderate

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)

db.m3.medium 1 3 3.75 EBS only — Moderate

db.m1 – general-purpose instance classes

db.m1.xlarge 4 4 15 EBS-optimized 450 High


only

db.m1.large 2 2 7.5 EBS-optimized 450 Moderate


only

db.m1.medium 1 1 3.75 EBS only — Moderate

db.m1.small 1 1 1.7 EBS only — Very Low

db.x2iezn – memory-optimized instance classes

db.x2iezn.12xlarge >48 — 1,536 EBS-optimized 19,000 100


only

db.x2iezn.8xlarge 32 — 1,024 EBS-optimized 12,000 75


only

db.x2iezn.6xlarge 24 — 768 EBS-optimized Up to 9,500 50


only

db.x2iezn.4xlarge 16 — 512 EBS-optimized Up to 4,750 Up to 25


only

db.x2iezn.2xlarge 8 — 256 EBS-optimized Up to 3,170 Up to 25


only

db.x2iedn – memory-optimized instance classes with SSD storage

db.x2iedn.32xlarge 128 — 4,096 2 x 1900 NVMe 80,000 100


SSD

db.x2iedn.24xlarge 96 — 3,072 2 x 1425 NVMe 60,000 75


SSD

db.x2iedn.16xlarge 64 — 2,048 1 x 1900 NVMe 40,000 50


SSD

db.x2iedn.8xlarge 32 — 1,024 1 x 950 NVMe 20,000 25


SSD

db.x2iedn.4xlarge 16 — 512 1 x 475 NVMe Up to 20,000 Up to 25


SSD

db.x2iedn.2xlarge 8 — 256 1 x 237 NVMe Up to 20,000 Up to 25


SSD

db.x2iedn.xlarge 4 — 128 1 x 118 NVMe Up to 20,000 Up to 25


SSD

db.x2idn – memory-optimized instance classes with SSD storage

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)

db.x2idn.32xlarge 128 — 2,048 2 x 1900 NVMe 80,000 100


SSD

db.x2idn.24xlarge 96 — 1,536 2 x 1425 NVMe 60,000 75


SSD

db.x2idn.16xlarge 64 — 1,024 1 x 1900 NVMe 40,000 50


SSD

db.x2g – memory-optimized instance classes

db.x2g.16xlarge 64 — 1024 EBS-optimized 19,000 25


only

db.x2g.12xlarge 48 — 768 EBS-optimized 14,250 20


only

db.x2g.8xlarge 32 — 512 EBS-optimized 9,500 12


only

db.x2g.4xlarge 16 — 256 EBS-optimized 4,750 Up to 10


only

db.x2g.2xlarge 8 — 128 EBS-optimized Up to 4,750 Up to 10


only

db.x2g.xlarge 4 — 64 EBS-optimized Up to 4,750 Up to 10


only

db.x2g.large 2 — 32 EBS-optimized Up to 4,750 Up to 10


only

db.z1d – memory-optimized instance classes with SSD storage

db.z1d.12xlarge 48 271 384 2 x 900 NVMe 14,000 25


SSD

db.z1d.6xlarge 24 134 192 1 x 900 NVMe 7,000 10


SSD

db.z1d.3xlarge 12 75 96 1 x 450 NVMe 3,500 Up to 10


SSD

db.z1d.2xlarge 8 53 64 1 x 300 NVMe 2,333 Up to 10


SSD

db.z1d.xlarge* 4 28 32 1 x 150 NVMe Up to 2,333 Up to 10


SSD

db.z1d.large* 2 15 16 1 x 75 NVMe SSD Up to 2,333 Up to 10

db.x1e – memory-optimized instance classes

db.x1e.32xlarge 128 340 3,904 EBS-optimized 14,000 25


only

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)

db.x1e.16xlarge 64 179 1,952 EBS-optimized 7,000 10


only

db.x1e.8xlarge 32 91 976 EBS-optimized 3,500 Up to 10


only

db.x1e.4xlarge 16 47 488 EBS-optimized 1,750 Up to 10


only

db.x1e.2xlarge 8 23 244 EBS-optimized 1,000 Up to 10


only

db.x1e.xlarge 4 12 122 EBS-optimized 500 Up to 10


only

db.x1 – memory-optimized instance classes

db.x1.32xlarge 128 349 1,952 EBS-optimized 14,000 25


only

db.x1.16xlarge 64 174.5 976 EBS-optimized 7,000 10


only

db.r7g – memory-optimized instance classes

db.r7g.16xlarge 64 — 512 EBS-optimized 20,000 30


only

db.r7g.12xlarge 48 — 384 EBS-optimized 15,000 22.5


only

db.r7g.8xlarge 32 — 256 EBS-optimized 10,000 15


only

db.r7g.4xlarge 16 — 128 EBS-optimized Up to 10,000 Up to 15


only

db.r7g.2xlarge* 8 — 64 EBS-optimized Up to 10,000 Up to 15


only

db.r7g.xlarge* 4 — 32 EBS-optimized Up to 10,000 Up to 12.5


only

db.r7g.large* 2 — 16 EBS-optimized Up to 10,000 Up to 12.5


only

db.r6g – memory-optimized instance classes

db.r6g.16xlarge 64 — 512 EBS-optimized 19,000 25


only

db.r6g.12xlarge 48 — 384 EBS-optimized 13,500 20


only

db.r6g.8xlarge 32 — 256 EBS-optimized 9,000 12


only

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)

db.r6g.4xlarge 16 — 128 EBS-optimized 4,750 Up to 10


only

db.r6g.2xlarge* 8 — 64 EBS-optimized Up to 4,750 Up to 10


only

db.r6g.xlarge* 4 — 32 EBS-optimized Up to 4,750 Up to 10


only

db.r6g.large* 2 — 16 EBS-optimized Up to 4,750 Up to 10


only

db.r6gd – memory-optimized instance classes with SSD storage

db.r6gd.16xlarge 64 — 512 2 x 1900 NVMe 19,000 25


SSD

db.r6gd.12xlarge 48 — 384 2 x 1425 NVMe 13,500 20


SSD

db.r6gd.8xlarge 32 — 256 1 x 1900 NVMe 9,000 12


SSD

db.r6gd.4xlarge 16 — 128 1 x 950 NVMe 4,750 Up to 10


SSD

db.r6gd.2xlarge 8 — 64 1 x 474 NVMe Up to 4,750 Up to 10


SSD

db.r6gd.xlarge 4 — 32 1 x 237 NVMe Up to 4,750 Up to 10


SSD

db.r6gd.large 2 — 16 1 x 118 NVMe Up to 4,750 Up to 10


SSD

db.r6id – general-purpose instance classes with SSD storage

db.r6id.32xlarge 128 — 1,024 4x1900 NVMe 40,000 50


SSD

db.r6id.24xlarge 96 — 768 4x1425 NVMe 30,000 37.5


SSD

db.r6id.16xlarge 64 — 512 2x1900 NVMe 20,000 25


SSD

db.r6id.12xlarge 48 — 384 2x1425 NVMe 15,000 18.75


SSD

db.r6id.8xlarge 32 — 256 1x1900 NVMe 10,000 12.5


SSD

db.r6id.4xlarge* 16 — 128 1x950 NVMe SSD Up to 10,000 Up to 12.5

db.r6id.2xlarge* 8 — 64 1x474 NVMe SSD Up to 10,000 Up to 12.5

db.r6id.xlarge* 4 — 32 1x237 NVMe SSD Up to 10,000 Up to 12.5

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)

db.r6id.large* 2 — 16 1x118 NVMe SSD Up to 10,000 Up to 12.5

db.r6i – memory-optimized instance classes

db.r6i.32xlarge 128 — 1,024 EBS-optimized 40,000 50


only

db.r6i.24xlarge 96 — 768 EBS-optimized 30,000 37.5


only

db.r6i.16xlarge 64 — 512 EBS-optimized 20,000 25


only

db.r6i.12xlarge 48 — 384 EBS-optimized 15,000 18.75


only

db.r6i.8xlarge 32 — 256 EBS-optimized 10,000 12.5


only

db.r6i.4xlarge* 16 — 128 EBS-optimized Up to 10,000 Up to 12.5


only

db.r6i.2xlarge* 8 — 64 EBS-optimized Up to 10,000 Up to 12.5


only

db.r6i.xlarge* 4 — 32 EBS-optimized Up to 10,000 Up to 12.5


only

db.r6i.large* 2 — 16 EBS-optimized Up to 10,000 Up to 12.5


only

db.r5d – memory-optimized instance classes with SSD storage

db.r5d.24xlarge 96 347 768 4 x 900 NVMe 19,000 25


SSD

db.r5d.16xlarge 64 264 512 4 x 600 NVMe 13,600 20


SSD

db.r5d.12xlarge 48 173 384 2 x 900 NVMe 9,500 10


SSD

db.r5d.8xlarge 32 132 256 2 x 600 NVMe 6,800 10


SSD

db.r5d.4xlarge 16 71 128 2 x 300 NVMe 4,750 Up to 10


SSD

db.r5d.2xlarge* 8 38 64 1 x 300 NVMe Up to 4,750 Up to 10


SSD

db.r5d.xlarge* 4 19 32 1 x 150 NVMe Up to 4,750 Up to 10


SSD

db.r5d.large* 2 10 16 1 x 75 NVMe SSD Up to 4,750 Up to 10

db.r5b – memory-optimized instance classes

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.24xlarge 96 347 768 EBS-optimized 60,000 25


only

db.r5b.16xlarge 64 264 512 EBS-optimized 40,000 20


only

db.r5b.12xlarge 48 173 384 EBS-optimized 30,000 10


only

db.r5b.8xlarge 32 132 256 EBS-optimized 20,000 10


only

db.r5b.4xlarge 16 71 128 EBS-optimized 10,000 Up to 10


only

db.r5b.2xlarge* 8 38 64 EBS-optimized Up to 10,000 Up to 10


only

db.r5b.xlarge* 4 19 32 EBS-optimized Up to 10,000 Up to 10


only

db.r5b.large* 2 10 16 EBS-optimized Up to 10,000 Up to 10


only

db.r5b – Oracle memory-optimized instance classes preconfigured for high memory, storage, and I/O

db.r5b.8xlarge.tpc2.mem3x 32 — 768 EBS-optimized 60,000 25


only

db.r5b.6xlarge.tpc2.mem4x 24 — 768 EBS-optimized 60,000 25


only

db.r5b.4xlarge.tpc2.mem4x 16 — 512 EBS-optimized 40,000 20


only

db.r5b.4xlarge.tpc2.mem3x 16 — 384 EBS-optimized 30,000 10


only

db.r5b.4xlarge.tpc2.mem2x 16 — 256 EBS-optimized 20,000 10


only

db.r5b.2xlarge.tpc2.mem8x 8 — 512 EBS-optimized 40,000 20


only

db.r5b.2xlarge.tpc2.mem4x 8 — 256 EBS-optimized 20,000 10


only

db.r5b.2xlarge.tpc1.mem2x 8 — 128 EBS-optimized 10,000 Up to 10


only

db.r5b.xlarge.tpc2.mem4x 4 — 128 EBS-optimized 10,000 Up to 10


only

db.r5b.xlarge.tpc2.mem2x 4 — 64 EBS-optimized Up to 10,000 Up to 10


only

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.r5b.large.tpc1.mem2x 2 — 32 EBS-optimized Up to 10,000 Up to 10


only

db.r5 – memory-optimized instance classes

db.r5.24xlarge 96 347 768 EBS-optimized 19,000 25


only

db.r5.16xlarge 64 264 512 EBS-optimized 13,600 20


only

db.r5.12xlarge 48 173 384 EBS-optimized 9,500 12


only

db.r5.8xlarge 32 132 256 EBS-optimized 6,800 10


only

db.r5.4xlarge 16 71 128 EBS-optimized 4,750 Up to 10


only

db.r5.2xlarge* 8 38 64 EBS-optimized Up to 4,750 Up to 10


only

db.r5.xlarge* 4 19 32 EBS-optimized Up to 4,750 Up to 10


only

db.r5.large* 2 10 16 EBS-optimized Up to 4,750 Up to 10


only

db.r5 – Oracle memory-optimized instance classes preconfigured for high memory, storage, and I/O

db.r5.12xlarge.tpc2.mem2x 48 — 768 EBS-optimized 19,000 25


only

db.r5.8xlarge.tpc2.mem3x 32 — 768 EBS-optimized 19,000 25


only

db.r5.6xlarge.tpc2.mem4x 24 — 768 EBS-optimized 19,000 25


only

db.r5.4xlarge.tpc2.mem4x 16 — 512 EBS-optimized 13,600 20


only

db.r5.4xlarge.tpc2.mem3x 16 — 384 EBS-optimized 9,500 10


only

db.r5.4xlarge.tpc2.mem2x 16 — 256 EBS-optimized 6,800 10


only

db.r5.2xlarge.tpc2.mem8x 8 — 512 EBS-optimized 13,600 20


only

db.r5.2xlarge.tpc2.mem4x 8 — 256 EBS-optimized 6,800 10


only

db.r5.2xlarge.tpc1.mem2x 8 — 128 EBS-optimized 4,750 Up to 10


only

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)

db.r5.xlarge.tpc2.mem4x 4 — 128 EBS-optimized 4,750 Up to 10


only

db.r5.xlarge.tpc2.mem2x 4 — 64 EBS-optimized Up to 4,750 Up to 10


only

db.r5.large.tpc1.mem2x 2 — 32 EBS-optimized Up to 4,750 Up to 10


only

db.r4 – memory-optimized instance classes

db.r4.16xlarge 64 195 488 EBS-optimized 14,000 25


only

db.r4.8xlarge 32 99 244 EBS-optimized 7,000 10


only

db.r4.4xlarge 16 53 122 EBS-optimized 3,500 Up to 10


only

db.r4.2xlarge 8 27 61 EBS-optimized 1,700 Up to 10


only

db.r4.xlarge 4 13.5 30.5 EBS-optimized 850 Up to 10


only

db.r4.large 2 7 15.25 EBS-optimized 425 Up to 10


only

db.r3 – memory-optimized instance classes

db.r3.8xlarge 32 104 244 EBS only — 10

db.r3.4xlarge 16 52 122 EBS-optimized 2,000 High


only

db.r3.2xlarge 8 26 61 EBS-optimized 1,000 High


only

db.r3.xlarge 4 13 30.5 EBS-optimized 500 Moderate


only

db.r3.large 2 6.5 15.25 EBS-optimized — Moderate


only

db.t4g – burstable-performance instance classes

db.t4g.2xlarge* 8 — 32 EBS-optimized Up to 2,780 Up to 5


only

db.t4g.xlarge* 4 — 16 EBS-optimized Up to 2,780 Up to 5


only

db.t4g.large* 2 — 8 EBS-optimized Up to 2,780 Up to 5


only

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)

db.t4g.medium* 2 — 4 EBS-optimized Up to 2,085 Up to 5


only

db.t4g.small* 2 — 2 EBS-optimized Up to 2,085 Up to 5


only

db.t4g.micro* 2 — 1 EBS-optimized Up to 2,085 Up to 5


only

db.t3 – burstable-performance instance classes

db.t3.2xlarge* 8 Variable 32 EBS-optimized Up to 2,048 Up to 5


only

db.t3.xlarge* 4 Variable 16 EBS-optimized Up to 2,048 Up to 5


only

db.t3.large* 2 Variable 8 EBS-optimized Up to 2,048 Up to 5


only

db.t3.medium* 2 Variable 4 EBS-optimized Up to 1,536 Up to 5


only

db.t3.small* 2 Variable 2 EBS-optimized Up to 1,536 Up to 5


only

db.t3.micro* 2 Variable 1 EBS-optimized Up to 1,536 Up to 5


only

db.t2 – burstable-performance instance classes

db.t2.2xlarge 8 Variable 32 EBS only — Moderate

db.t2.xlarge 4 Variable 16 EBS only — Moderate

db.t2.large 2 Variable 8 EBS only — Moderate

db.t2.medium 2 Variable 4 EBS only — Moderate

db.t2.small 1 Variable 2 EBS only — Low

db.t2.micro 1 Variable 1 EBS only — Low

* 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

Amazon RDS DB instance storage


DB instances for Amazon RDS for MySQL, MariaDB, PostgreSQL, Oracle, and Microsoft SQL Server use
Amazon Elastic Block Store (Amazon EBS) volumes for database and log 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.

Amazon RDS storage types


Amazon RDS provides three storage types: General Purpose SSD (also known as gp2 and gp3),
Provisioned IOPS SSD (also known as io1), and magnetic (also known as standard). They differ in
performance characteristics and price, which means that you can tailor your storage performance and
cost to the needs of your database workload. You can create MySQL, MariaDB, Oracle, and PostgreSQL
RDS DB instances with up to 64 tebibytes (TiB) of storage. You can create SQL Server RDS DB instances
with up to 16 TiB of storage. For this amount of storage, use the Provisioned IOPS SSD and General
Purpose SSD storage types.

The following list briefly describes the three storage types:

• 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.

Database engine Amazon RDS storage Number of volumes provisioned


size

MariaDB, MySQL, and Less than 400 GiB 1


PostgreSQL

MariaDB, MySQL, and Between 400 and 4


PostgreSQL 64,000 GiB

Oracle Less than 200 GiB 1

Oracle Between 200 and 4


64,000 GiB

101
Amazon Relational Database Service User Guide
General Purpose SSD storage

Database engine Amazon RDS storage Number of volumes provisioned


size

SQL Server Any 1

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.

General Purpose SSD storage


General Purpose SSD storage offers cost-effective storage that is acceptable for most database
workloads that aren't latency sensitive.
Note
DB instances that use General Purpose SSD storage can experience much longer latency after
read replica creation, Multi-AZ conversion, and DB snapshot restoration than instances that
use Provisioned IOPS storage. If you need a DB instance with minimum latency after these
operations, we recommend using Provisioned IOPS SSD storage (p. 104).

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 20 and 100-1197 IOPS 128-250 MiB/s 3,000


and PostgreSQL 399 GiB

MariaDB, MySQL, Between 400 and 1,200-4,005 IOPS 500-1,000 MiB/s 12,000
and PostgreSQL 1,335 GiB

MariaDB, MySQL, Between 1,336 4008-11,997 IOPS 1,000 MiB/s 12,000


and PostgreSQL and 3,999 GiB

MariaDB, MySQL, Between 4,000 12,000-64,000 1,000 MiB/s N/A*


and PostgreSQL and 65,536 GiB IOPS

Oracle Between 20 and 100-597 IOPS 128-250 MiB/s 3,000


199 GiB

Oracle Between 200 and 600-4,005 IOPS 500-1,000 MiB/s 12,000


1,335 GiB

Oracle Between 1,336 4008-11,997 IOPS 1,000 MiB/s 12,000


and 3,999 GiB

Oracle Between 4,000 12,000-64,000 1,000 MiB/s N/A*


and 65,536 GiB IOPS

SQL Server Between 20 and 100-999 IOPS 128-250 MiB/s 3,000


333 GiB

SQL Server Between 334 and 1,002-2,997 IOPS 250 MiB/s 3,000
999 GiB

SQL Server Between 1,000 3,000-16,000 250 MiB/s N/A*


and 16,384 GiB IOPS

* 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.

DB engine Storage size Baseline storage Range of Range of


performance Provisioned IOPS provisioned
storage
throughput

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

Oracle Less than 200 GiB 3,000 IOPS/125 N/A N/A


MiB/s

Oracle 200 GiB and 12,000 IOPS/500 12,000–64,000 500–4,000 MiB/s


higher MiB/s IOPS

SQL Server 20 GiB–16 TiB 3,000 IOPS/125 3,000–16,000 125–1,000 MiB/s


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).

Provisioned IOPS SSD storage


For a production application that requires fast and consistent I/O performance, we recommend
Provisioned IOPS storage. Provisioned IOPS storage is a storage type that delivers predictable
performance, and consistently low latency. Provisioned IOPS storage is optimized for online transaction
processing (OLTP) workloads that require consistent performance. Provisioned IOPS helps performance
tuning of these workloads.

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.

Database engine Range of storage Range of Provisioned IOPS Maximum


size throughput

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

Oracle Between 100 and 1,000–9,950 IOPS 500 MiB/s


199 GiB

Oracle Between 200 and 1,000–256,000 IOPS 4,000 MiB/s


65,536 GiB

SQL Server Between 20 and 1,000–64,000 IOPS 1,000 MiB/s


16,384 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).

Combining Provisioned IOPS storage with Multi-AZ


deployments or read replicas
For production OLTP use cases, we recommend that you use Multi-AZ deployments for enhanced fault
tolerance with Provisioned IOPS storage for fast and predictable performance.

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 storage costs


With Provisioned IOPS storage, you are charged for the provisioned resources whether or not you use
them in a given month.

For more information about pricing, see Amazon RDS pricing.

Getting the best performance from Amazon RDS Provisioned


IOPS SSD storage
If your workload is I/O constrained, using Provisioned IOPS SSD storage can increase the number of I/O
requests that the system can process concurrently. Increased concurrency allows for decreased latency
because I/O requests spend less time in a queue. Decreased latency allows for faster database commits,
which improves response time and allows for higher database throughput.

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.

Comparing solid-state drive (SSD) storage types


The following table shows use cases and performance characteristics for the SSD storage volumes used
by Amazon RDS.

Characteristic Provisioned IOPS (io1) General Purpose (gp3) General Purpose (gp2)

Description Consistent storage Flexibility in Provides burstable IOPS


performance (IOPS, provisioning storage,
throughput, latency) IOPS, and throughput Balances price
independently performance for a wide
Designed for latency- variety of transactional
sensitive, transactional Balances price workloads
workloads performance for a wide
variety of transactional
workloads

Use cases Transactional workloads Broad range of Broad range of


that require sustained workloads running workloads running
IOPS performance up to on medium-sized on medium-sized
256,000 IOPS relational databases relational databases
in development/test in development/test
environments environments

Latency Single-digit millisecond, Single-digit millisecond, Single-digit millisecond,


provided consistently provided consistently provided consistently
99.9% of the time 99% of the time 99% of the time

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

AWS CLI and RDS API io1 gp3 gp2


name

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.

Monitoring storage performance


Amazon RDS provides several metrics that you can use to determine how your DB instance is performing.
You can view the metrics on the summary page for your instance in Amazon RDS Management Console.
You can also use Amazon CloudWatch to monitor these metrics. For more information, see Viewing
metrics in the Amazon RDS console (p. 696). Enhanced Monitoring provides more detailed I/O metrics;
for more information, see Monitoring OS metrics with Enhanced Monitoring (p. 797).

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.

Factors that affect storage performance


System activities, database workload, and DB instance class can affect storage performance.

System activities
The following system-related activities consume I/O capacity and might reduce DB instance performance
while in progress:

• Multi-AZ standby creation


• Read replica creation
• Changing storage types

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:

• The throughput limit of the underlying instance type is reached.


• Queue depth is consistently less than 1 because your application isn't driving enough I/O operations.
• You experience query contention in the database even though some I/O capacity is unused.

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.

Instance class MariaDB MySQL Oracle PostgreSQL

db.m3 – standard instance classes

db.m3.2xlarge N/A 6 N/A 6

db.m3.xlarge N/A 6 N/A 6

db.m3.large N/A 6 N/A 6

db.m3.medium N/A 32 N/A 32

db.t4g – burstable-performance instance classes

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 – burstable-performance instance classes

db.t3.medium 16 16 32 32

db.t3.small 16 16 32 16

db.t3.micro 6 6 32 6

db.t2 – burstable-performance instance classes

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

Regions, Availability Zones, and Local Zones


Amazon cloud computing resources are hosted in multiple locations world-wide. These locations
are composed of AWS Regions, Availability Zones, and Local Zones. Each AWS Region is a separate
geographic area. Each AWS Region has multiple, isolated locations known as Availability Zones.
Note
For information about finding the Availability Zones for an AWS Region, see Describe your
Availability Zones in the Amazon EC2 documentation.

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.

Region Region Endpoint Protocol


Name

US East us-east-2 rds.us-east-2.amazonaws.com HTTPS


(Ohio)
rds-fips.us-east-2.api.aws HTTPS

rds.us-east-2.api.aws HTTPS

rds-fips.us-east-2.amazonaws.com HTTPS

US East (N. us-east-1 rds.us-east-1.amazonaws.com HTTPS


Virginia)
rds-fips.us-east-1.api.aws HTTPS

rds-fips.us-east-1.amazonaws.com HTTPS

rds.us-east-1.api.aws HTTPS

US us-west-1 rds.us-west-1.amazonaws.com HTTPS


West (N.
California) rds.us-west-1.api.aws HTTPS

rds-fips.us-west-1.amazonaws.com HTTPS

rds-fips.us-west-1.api.aws HTTPS

US West us-west-2 rds.us-west-2.amazonaws.com HTTPS


(Oregon)
rds-fips.us-west-2.amazonaws.com HTTPS

rds.us-west-2.api.aws HTTPS

rds-fips.us-west-2.api.aws HTTPS

Africa af-south-1 rds.af-south-1.amazonaws.com HTTPS


(Cape
Town) rds.af-south-1.api.aws HTTPS

Asia ap-east-1 rds.ap-east-1.amazonaws.com HTTPS


Pacific
(Hong rds.ap-east-1.api.aws HTTPS
Kong)

111
Amazon Relational Database Service User Guide
AWS Regions

Region Region Endpoint Protocol


Name

Asia ap- rds.ap-south-2.amazonaws.com HTTPS


Pacific south-2
(Hyderabad) rds.ap-south-2.api.aws HTTPS

Asia ap- rds.ap-southeast-3.amazonaws.com HTTPS


Pacific southeast-3
(Jakarta) rds.ap-southeast-3.api.aws HTTPS

Asia ap- rds.ap-southeast-4.amazonaws.com HTTPS


Pacific southeast-4
(Melbourne) rds.ap-southeast-4.api.aws HTTPS

Asia ap- rds.ap-south-1.amazonaws.com HTTPS


Pacific south-1
(Mumbai) rds.ap-south-1.api.aws HTTPS

Asia ap- rds.ap-northeast-3.amazonaws.com HTTPS


Pacific northeast-3
(Osaka) rds.ap-northeast-3.api.aws HTTPS

Asia ap- rds.ap-northeast-2.amazonaws.com HTTPS


Pacific northeast-2
(Seoul) rds.ap-northeast-2.api.aws HTTPS

Asia ap- rds.ap-southeast-1.amazonaws.com HTTPS


Pacific southeast-1
(Singapore) rds.ap-southeast-1.api.aws HTTPS

Asia ap- rds.ap-southeast-2.amazonaws.com HTTPS


Pacific southeast-2
(Sydney) rds.ap-southeast-2.api.aws HTTPS

Asia ap- rds.ap-northeast-1.amazonaws.com HTTPS


Pacific northeast-1
(Tokyo) rds.ap-northeast-1.api.aws HTTPS

Canada ca- rds.ca-central-1.amazonaws.com HTTPS


(Central) central-1
rds.ca-central-1.api.aws HTTPS

rds-fips.ca-central-1.api.aws HTTPS

rds-fips.ca-central-1.amazonaws.com HTTPS

Europe eu- rds.eu-central-1.amazonaws.com HTTPS


(Frankfurt) central-1
rds.eu-central-1.api.aws HTTPS

Europe eu-west-1 rds.eu-west-1.amazonaws.com HTTPS


(Ireland)
rds.eu-west-1.api.aws HTTPS

Europe eu-west-2 rds.eu-west-2.amazonaws.com HTTPS


(London)
rds.eu-west-2.api.aws HTTPS

112
Amazon Relational Database Service User Guide
Availability Zones

Region Region Endpoint Protocol


Name

Europe eu- rds.eu-south-1.amazonaws.com HTTPS


(Milan) south-1
rds.eu-south-1.api.aws HTTPS

Europe eu-west-3 rds.eu-west-3.amazonaws.com HTTPS


(Paris)
rds.eu-west-3.api.aws HTTPS

Europe eu- rds.eu-south-2.amazonaws.com HTTPS


(Spain) south-2
rds.eu-south-2.api.aws HTTPS

Europe eu-north-1 rds.eu-north-1.amazonaws.com HTTPS


(Stockholm)
rds.eu-north-1.api.aws HTTPS

Europe eu- rds.eu-central-2.amazonaws.com HTTPS


(Zurich) central-2
rds.eu-central-2.api.aws HTTPS

Israel (Tel il- rds.il-central-1.amazonaws.com HTTPS


Aviv) central-1
rds.il-central-1.api.aws HTTPS

Middle me- rds.me-south-1.amazonaws.com HTTPS


East south-1
(Bahrain) rds.me-south-1.api.aws HTTPS

Middle me- rds.me-central-1.amazonaws.com HTTPS


East (UAE) central-1
rds.me-central-1.api.aws HTTPS

South sa-east-1 rds.sa-east-1.amazonaws.com HTTPS


America
(São rds.sa-east-1.api.aws HTTPS
Paulo)

AWS us-gov- rds.us-gov-east-1.amazonaws.com HTTPS


GovCloud east-1
(US-East) rds.us-gov-east-1.api.aws HTTPS

AWS us-gov- rds.us-gov-west-1.amazonaws.com HTTPS


GovCloud west-1
(US-West) rds.us-gov-west-1.api.aws HTTPS

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.

aws ec2 describe-availability-zones --region region-name

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:

aws ec2 describe-availability-zones --region us-east-1

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.

To use a Local Zone

1. Enable the Local Zone in the Amazon EC2 console.

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 a DB instance in a VPC (p. 2696).


4. Create a DB instance that uses the DB subnet group in 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

Supported features in Amazon RDS by AWS Region


and DB engine
Support for Amazon RDS features and options varies across AWS Regions and specific versions of each
DB engine. To identify RDS DB engine version support and availability in a given AWS Region, you can
use the following sections.

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:

• Version x.y – The specific version alone is available.


• Version x.y and higher – The specified version and all higher minor versions of its major version are
supported. For example, "version 10.11 and higher" means that versions 10.11, 10.11.1, and 10.12 are
available.
• — – The feature isn't currently available for the selected RDS DB engine or in the specified AWS
Region.

Feature quick reference


The following quick reference table lists each feature and available RDS DB engine. Region and specific
version availability appears in the later feature sections.

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

Blue/ Available (p. 118) Available (p. 118) – – –


Green
Deployments

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

Database – – Available (p. 121) – Available (p. 124)


activity
streams

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

Multi- – Available (p. 147) – Available (p. 148) –


AZ DB
clusters

Performance
Available (p. 150) Available (p. 150) Available (p. 150) Available (p. 150) Available (p. 150)
Insights

RDS – – Available (p. 151) – Available (p. 153)


Custom

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 is supported for the following engines:

• RDS for MariaDB version 10.2 and higher


• RDS for MySQL version 5.7 and higher
• RDS for MySQL version 8.0.15 and higher

The Blue/Green Deployments feature isn't supported with the following engines:

• RDS for SQL Server


• RDS for Oracle
• RDS for PostgreSQL

The Blue/Green Deployments feature is supported in all AWS Regions except Israel (Tel Aviv).

Cross-Region automated backups


By using backup replication in Amazon RDS, you can configure your RDS DB instance to replicate
snapshots and transaction logs to a destination Region. When backup replication is configured for a DB
instance, RDS starts a cross-Region copy of all snapshots and transaction logs when they're ready. For
more information, see Replicating automated backups to another AWS Region (p. 602).

Backup replication is available in all AWS Regions except the following:

• Africa (Cape Town)


• Asia Pacific (Hong Kong)
• Asia Pacific (Hyderabad)
• Asia Pacific (Jakarta)
• Europe (Milan)
• Europe (Spain)
• Europe (Zurich)
• Middle East (Bahrain)
• Middle East (UAE)

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

• Backup replication with RDS for SQL Server (p. 119)

Backup replication with RDS for MariaDB


Amazon RDS supports backup replication for all currently available versions of RDS for MariaDB.

Backup replication with RDS for MySQL


Amazon RDS supports backup replication for all currently available versions of RDS for MySQL.

Backup replication with RDS for Oracle


Amazon RDS supports backup replication for all currently available versions of RDS for Oracle.

Backup replication with RDS for PostgreSQL


Amazon RDS supports backup replication for all currently available versions of RDS for PostgreSQL.

Backup replication with RDS for SQL Server


Amazon RDS supports backup replication for all currently available versions of RDS for SQL Server.

Cross-Region read replicas


By using cross-Region read replicas in Amazon RDS, you can create a MariaDB, MySQL, Oracle,
PostgreSQL, or SQL Server read replica in a different Region from the source DB instance. For more
information about cross-Region read replicas, including source and destination Region considerations,
see Creating a read replica in a different AWS Region (p. 452).

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)

Cross-Region read replicas with RDS for MariaDB


Cross-Region read replicas with RDS for MariaDB are available in all Regions for the following versions:

• RDS for MariaDB 10.11 (All available versions)


• RDS for MariaDB 10.6 (All available versions)
• RDS for MariaDB 10.5 (All available versions)
• RDS for MariaDB 10.4 (All available versions)
• RDS for MariaDB 10.3 (All available versions)

Cross-Region read replicas with RDS for MySQL


Cross-Region read replicas with RDS for MySQL are available in all Regions for the following versions:

• RDS for MySQL 8.0 (All available versions)

119
Amazon Relational Database Service User Guide
Cross-Region read replicas

• RDS for MySQL 5.7 (All available versions)

Cross-Region read replicas with RDS for Oracle


Cross-Region read replicas for RDS for Oracle are available in all Regions with the following version
limitations:

• 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 PostgreSQL


Cross-Region read replicas with RDS for PostgreSQL are available in all Regions for the following
versions:

• RDS for PostgreSQL 15 (All available versions)


• RDS for PostgreSQL 14 (All available versions)
• RDS for PostgreSQL 13 (All available versions)
• RDS for PostgreSQL 12 (All available versions)
• RDS for PostgreSQL 11 (All available versions)
• RDS for PostgreSQL 10 (All available versions)

Cross-Region read replicas with RDS for SQL Server


Cross-Region read replicas with RDS for SQL Server are available in all Regions except the following:

• Africa (Cape Town)


• Asia Pacific (Hong Kong)
• Asia Pacific (Hyderabad)
• Asia Pacific (Jakarta)
• Asia Pacific (Melbourne)
• Europe (Milan)
• Europe (Spain)
• Europe (Zurich)
• Middle East (Bahrain)
• Middle East (UAE)

Cross-Region read replicas with RDS for SQL Server are available for the following versions using
Microsoft SQL Server Enterprise Edition:

• RDS for SQL Server 2019 (Version 15.00.4073.23 and higher)


• RDS for SQL Server 2017 (Version 14.00.3281.6 and higher)
• RDS for SQL Server 2016 (Version 13.00.6300.2 and higher)

120
Amazon Relational Database Service User Guide
Database activity streams

Database activity streams


By using Database Activity Streams in Amazon RDS, you can monitor and set alarms for auditing activity
in your Oracle database and SQL Server database. For more information, see Overview of Database
Activity Streams (p. 944).

Database activity streams aren't available with the following engines:

• RDS for MariaDB


• RDS for MySQL
• RDS for PostgreSQL

Topics
• Database activity streams with RDS for Oracle (p. 121)
• Database activity streams with RDS for SQL Server (p. 124)

Database activity streams with RDS for Oracle


The following Regions and engine versions are available for database activity streams with RDS for
Oracle.

For more information on additional requirements for database activity streams with RDS for Oracle, see
Overview of Database Activity Streams (p. 944).

Region RDS for Oracle 21c RDS for Oracle 19c

US East (Ohio) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

US East (N. Virginia) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

US West (N. California) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

US West (Oregon) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Africa (Cape Town) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Asia Pacific (Hong Kong) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

121
Amazon Relational Database Service User Guide
Database activity streams

Region RDS for Oracle 21c RDS for Oracle 19c

Asia Pacific (Hyderabad) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Asia Pacific (Jakarta) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Asia Pacific (Melbourne) – –

Asia Pacific (Mumbai) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Asia Pacific (Osaka) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Asia Pacific (Seoul) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Asia Pacific (Singapore) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Asia Pacific (Sydney) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Asia Pacific (Tokyo) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Canada (Central) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

China (Beijing) – –

China (Ningxia) – –

Europe (Frankfurt) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

122
Amazon Relational Database Service User Guide
Database activity streams

Region RDS for Oracle 21c RDS for Oracle 19c

Europe (Ireland) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Europe (London) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Europe (Milan) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Europe (Paris) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Europe (Spain) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Europe (Stockholm) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Europe (Zurich) – –

Asia Pacific (Melbourne) – –

Middle East (Bahrain) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

Middle East (UAE) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

South America (São Paulo) – Oracle Database


19.0.0.0.ru-2019-07.rur-2019-07.r1 and higher,
using either Enterprise Edition (EE) or Standard
Edition 2 (SE2)

AWS GovCloud (US-East) – –

AWS GovCloud (US-West) – –

123
Amazon Relational Database Service User Guide
Database activity streams

Database activity streams with RDS for SQL Server


The following Regions and engine versions are available for database activity streams with RDS for SQL
Server.

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) – – – –

Israel (Tel Aviv) – – – –

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)

AWS GovCloud (US- – – – –


East)

AWS GovCloud (US- – – – –


West)

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)

Dual-stack mode with RDS for MariaDB


The following Regions and engine versions are available for dual-stack mode with RDS for MariaDB.

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

Israel (Tel Aviv) – – – – –

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

Dual-stack mode with RDS for MySQL


The following Regions and engine versions are available for dual-stack mode with RDS for MySQL.

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 (Hyderabad) All available versions All available versions –

Asia Pacific (Jakarta) All available versions All available versions All available versions

Asia Pacific (Melbourne) 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 (Spain) All available versions All available versions –

Europe (Stockholm) All available versions All available versions All available versions

Europe (Zurich) All available versions All available versions –

Israel (Tel Aviv) – – –

Middle East (Bahrain) All available versions All available versions All available versions

Middle East (UAE) 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

Dual-stack mode with RDS for Oracle


The following Regions and engine versions are available for dual-stack mode with RDS for Oracle.

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

Asia Pacific (Hyderabad) – – –

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 (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 (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) – – –

Israel (Tel Aviv) – – –

Middle East (Bahrain) All available versions All available versions All available versions

Middle East (UAE) – – –

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

Dual-stack mode with RDS for PostgreSQL


The following Regions and engine versions are available for dual-stack mode with RDS for PostgreSQL.

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)

Dual-stack mode with RDS for SQL Server


The following Regions and engine versions are available for dual-stack mode with RDS for SQL Server.

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) – – – –

Israel (Tel Aviv) – – – –

Middle East (Bahrain) All available versions All available versions All available versions –

Middle East (UAE) – – – –

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)

Export snapshots to S3 with RDS for MariaDB


The following Regions and engine versions are available for exporting snapshots to S3 with RDS for
MariaDB.

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) – – – – –

Israel (Tel Aviv) – – – – –

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)

Export snapshots to S3 with RDS for MySQL


TThe following Regions and engine versions are available for exporting snapshots to S3 with RDS for
MySQL.

Region RDS for MySQL 8.0 RDS for MySQL 5.7

US East (Ohio) All available versions All available versions

US East (N. Virginia) All available versions All available versions

US West (N. California) All available versions All available versions

US West (Oregon) All available versions All available versions

Africa (Cape Town) All available versions All available versions

Asia Pacific (Hong Kong) All available versions All available versions

Asia Pacific (Hyderabad) – –

Asia Pacific (Jakarta) – –

Asia Pacific (Melbourne) – –

Asia Pacific (Mumbai) All available versions All available versions

Asia Pacific (Osaka) All available versions All available versions

Asia Pacific (Seoul) All available versions All available versions

Asia Pacific (Singapore) All available versions All available versions

Asia Pacific (Sydney) All available versions All available versions

Asia Pacific (Tokyo) All available versions All available versions

Canada (Central) All available versions All available versions

China (Beijing) All available versions All available versions

China (Ningxia) All available versions All available versions

135
Amazon Relational Database Service User Guide
Export snapshots to S3

Region RDS for MySQL 8.0 RDS for MySQL 5.7

Europe (Frankfurt) All available versions All available versions

Europe (Ireland) All available versions All available versions

Europe (London) All available versions All available versions

Europe (Milan) All available versions All available versions

Europe (Paris) All available versions All available versions

Europe (Spain) – –

Europe (Stockholm) All available versions All available versions

Europe (Zurich) – –

Israel (Tel Aviv) – –

Middle East (Bahrain) All available versions All available versions

Middle East (UAE) – –

South America (São Paulo) All available versions All available versions

AWS GovCloud (US-East) – –

AWS GovCloud (US-West) – –

Export snapshots to S3 with RDS for PostgreSQL


The following Regions and engine versions are available for exporting snapshots to S3 with RDS for
PostgreSQL.

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)

IAM database authentication


By using IAM database authentication in Amazon RDS, you can authenticate without a password when
you connect to a DB instance. Instead, you use an authentication token. For more information, see IAM
database authentication for MariaDB, MySQL, and PostgreSQL (p. 2642).

IAM database authentication isn't available with the following engines:

• RDS for Oracle


• RDS for SQL Server

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)

IAM database authentication with RDS for MariaDB


The following Regions and engine versions are available for IAM database authentication with RDS for
MariaDB.

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 – – –


versions versions

US East (N. All available All available – – –


Virginia) versions versions

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

US West (N. All available All available – – –


California) versions versions

US West All available All available – – –


(Oregon) versions versions

Africa (Cape All available All available – – –


Town) versions versions

Asia Pacific All available All available – – –


(Hong Kong) versions versions

Asia Pacific – – – – –
(Hyderabad)

Asia Pacific All available All available – – –


(Jakarta) versions versions

Asia Pacific – – – – –
(Melbourne)

Asia Pacific All available All available – – –


(Mumbai) versions versions

Asia Pacific All available All available – – –


(Osaka) versions versions

Asia Pacific All available All available – – –


(Seoul) versions versions

Asia Pacific All available All available – – –


(Singapore) versions versions

Asia Pacific All available All available – – –


(Sydney) versions versions

Asia Pacific All available All available – – –


(Tokyo) versions versions

Canada (Central) All available All available – – –


versions versions

China (Beijing) All available All available – – –


versions versions

China (Ningxia) All available All available – – –


versions versions

Europe All available All available – – –


(Frankfurt) versions versions

Europe (Ireland) All available All available – – –


versions versions

Europe (London) All available All available – – –


versions versions

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 (Milan) All available All available – – –


versions versions

Europe (Paris) All available All available – – –


versions versions

Europe (Spain) – – – – –

Europe All available All available – – –


(Stockholm) versions versions

Europe (Zurich) – – – – –

Israel (Tel Aviv) – – – – –

Middle East All available All available – – –


(Bahrain) versions versions

Middle East – – – – –
(UAE)

South America All available All available – – –


(São Paulo) versions versions

AWS GovCloud All available All available – – –


(US-East) versions versions

AWS GovCloud All available All available – – –


(US-West) versions versions

IAM database authentication with RDS for MySQL


IAM database authentication with RDS for MySQL is available in all Regions for the following versions:

• RDS for MySQL 8.0 – All available versions


• RDS for MySQL 5.7 – All available versions

IAM database authentication with RDS for PostgreSQL


IAM database authentication with RDS for PostgreSQL is available in all Regions for the following
versions:

• RDS for PostgreSQL 15 – All available versions


• RDS for PostgreSQL 14 – All available versions
• RDS for PostgreSQL 13 – All available versions
• RDS for PostgreSQL 12 – All available versions
• RDS for PostgreSQL 11 – All available versions
• RDS for PostgreSQL 10 – All available versions

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).

Kerberos authentication isn't available with the following engines:

• RDS for MariaDB

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)

Kerberos authentication with RDS for MySQL


The following Regions and engine versions are available for Kerberos authentication with RDS for
MySQL.

Region RDS for MySQL 8.0 RDS for MySQL 5.7 RDS for MySQL 5.6

US East (Ohio) All versions All versions All versions

US East (N. Virginia) All versions All versions All versions

US West (N. California) All versions All versions All versions

US West (Oregon) All versions All versions All versions

Africa (Cape Town) – – –

Asia Pacific (Hong Kong) – – –

Asia Pacific (Hyderabad) – – –

Asia Pacific (Jakarta) – – –

Asia Pacific (Melbourne) – – –

Asia Pacific (Mumbai) All versions All versions All versions

Asia Pacific (Osaka) – – –

Asia Pacific (Seoul) All versions All versions All versions

Asia Pacific (Singapore) All versions All versions All versions

Asia Pacific (Sydney) All versions All versions All versions

Asia Pacific (Tokyo) All versions All versions All versions

Canada (Central) All versions All versions All versions

China (Beijing) All versions All versions All versions

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

China (Ningxia) All versions All versions All versions

Europe (Frankfurt) All versions All versions All versions

Europe (Ireland) All versions All versions All versions

Europe (London) All versions All versions All versions

Europe (Milan) – – –

Europe (Paris) – – –

Europe (Spain) – – –

Europe (Stockholm) All versions All versions All versions

Europe (Zurich) – – –

Israel (Tel Aviv) – – –

Middle East (Bahrain) – – –

Middle East (UAE) – – –

South America (São Paulo) All versions All versions All versions

AWS GovCloud (US-East) – – –

AWS GovCloud (US-West) – – –

Kerberos authentication with RDS for Oracle


The following Regions and engine versions are available for Kerberos authentication with RDS for Oracle.

Region RDS for Oracle 21c RDS for Oracle 19c RDS for Oracle 12c

US East (Ohio) All versions All versions All versions

US East (N. Virginia) All versions All versions All versions

US West (N. California) All versions All versions All versions

US West (Oregon) All versions All versions All versions

Africa (Cape Town) – – –

Asia Pacific (Hong Kong) – – –

Asia Pacific (Hyderabad) – – –

Asia Pacific (Jakarta) – – –

Asia Pacific (Melbourne) – – –

Asia Pacific (Mumbai) All versions All versions All versions

Asia Pacific (Osaka) – – –

Asia Pacific (Seoul) All versions All versions All versions

142
Amazon Relational Database Service User Guide
Kerberos authentication

Region RDS for Oracle 21c RDS for Oracle 19c RDS for Oracle 12c

Asia Pacific (Singapore) All versions All versions All versions

Asia Pacific (Sydney) All versions All versions All versions

Asia Pacific (Tokyo) All versions All versions All versions

Canada (Central) All versions All versions All versions

China (Beijing) – – –

China (Ningxia) – – –

Europe (Frankfurt) All versions All versions All versions

Europe (Ireland) All versions All versions All versions

Europe (London) All versions All versions All versions

Europe (Milan) – – –

Europe (Paris) – – –

Europe (Spain) – – –

Europe (Stockholm) All versions All versions All versions

Europe (Zurich) – – –

Israel (Tel Aviv) – – –

Middle East (Bahrain) – – –

Middle East (UAE) – – –

South America (São Paulo) All versions All versions All versions

AWS GovCloud (US-East) All versions All versions All versions

AWS GovCloud (US-West) All versions All versions All versions

Kerberos authentication with RDS for PostgreSQL


The following Regions and engine versions are available for Kerberos authentication with RDS for
PostgreSQL.

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)

Kerberos authentication with RDS for SQL Server


The following Regions and engine versions are available for Kerberos authentication with RDS for SQL
Server.

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

Israel (Tel Aviv) – – – –

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).

Multi-AZ DB clusters aren't available with the following engines:

• RDS for MariaDB


• RDS for Oracle
• RDS for SQL Server

Topics
• Multi-AZ DB clusters with RDS for MySQL (p. 147)
• Multi-AZ DB clusters with RDS for PostgreSQL (p. 148)

Multi-AZ DB clusters with RDS for MySQL


The following Regions and engine versions are available for Multi-AZ DB clusters with RDS for MySQL.

Region RDS for MySQL 8.0

US East (Ohio) Version 8.0.28 and higher

US East (N. Virginia) Version 8.0.28 and higher

US West (N. California) –

US West (Oregon) Version 8.0.28 and higher

Africa (Cape Town) Version 8.0.28 and higher

Asia Pacific (Hong Kong) Version 8.0.28 and higher

Asia Pacific (Hyderabad) –

Asia Pacific (Jakarta) Version 8.0.28 and higher

Asia Pacific (Melbourne) –

Asia Pacific (Mumbai) Version 8.0.28 and higher

Asia Pacific (Osaka) Version 8.0.28 and higher

Asia Pacific (Seoul) Version 8.0.28 and higher

Asia Pacific (Singapore) Version 8.0.28 and higher

Asia Pacific (Sydney) Version 8.0.28 and higher

Asia Pacific (Tokyo) Version 8.0.28 and higher

Canada (Central) Version 8.0.28 and higher

147
Amazon Relational Database Service User Guide
Multi-AZ DB clusters

Region RDS for MySQL 8.0

China (Beijing) Version 8.0.28 and higher

China (Ningxia) Version 8.0.28 and higher

Europe (Frankfurt) Version 8.0.28 and higher

Europe (Ireland) Version 8.0.28 and higher

Europe (London) Version 8.0.28 and higher

Europe (Milan) Version 8.0.28 and higher

Europe (Paris) Version 8.0.28 and higher

Europe (Spain) –

Europe (Stockholm) Version 8.0.28 and higher

Europe (Zurich) –

Israel (Tel Aviv) –

Middle East (Bahrain) Version 8.0.28 and higher

Middle East (UAE) –

South America (São Paulo) Version 8.0.28 and higher

AWS GovCloud (US-East) –

AWS GovCloud (US-West) –

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 Linux, macOS, or Unix:

aws rds describe-orderable-db-instance-options \


--engine mysql \
--db-instance-class db.r5d.large \
--query '*[]|[?SupportsClusters == `true`].[EngineVersion]' \
--output text

For Windows:

aws rds describe-orderable-db-instance-options ^


--engine mysql ^
--db-instance-class db.r5d.large ^
--query "*[]|[?SupportsClusters == `true`].[EngineVersion]" ^
--output text

You can change the DB instance class to show the available engine versions for it.

Multi-AZ DB clusters with RDS for PostgreSQL


The following Regions and engine versions are available for Multi-AZ DB clusters with RDS for
PostgreSQL.

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 (N. California) – – –

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 (Hyderabad) – – –

Asia Pacific (Jakarta) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher

Asia Pacific (Melbourne) – – –

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) – – –

Israel (Tel Aviv) – – –

Middle East (Bahrain) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher

Middle East (UAE) – – –

South America (São Paulo) All PostgreSQL 15 versions Version 14.5 and higher Version 13.4 and version
13.7 and higher

AWS GovCloud (US-East) – – –

AWS GovCloud (US-West) – – –

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 Linux, macOS, or Unix:

aws rds describe-orderable-db-instance-options \


--engine postgres \
--db-instance-class db.r5d.large \
--query '*[]|[?SupportsClusters == `true`].[EngineVersion]' \
--output text

For Windows:

aws rds describe-orderable-db-instance-options ^


--engine postgres ^
--db-instance-class db.r5d.large ^
--query "*[]|[?SupportsClusters == `true`].[EngineVersion]" ^
--output text

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

Performance Insights is available in all AWS Regions.

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).

RDS Custom is supported for the following DB engines only:

• RDS for Oracle


• RDS for SQL Server

Topics
• RDS Custom for Oracle (p. 151)
• RDS Custom for SQL Server (p. 153)

RDS Custom for Oracle


The following Regions and engine versions are available for RDS Custom for Oracle.

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

Africa (Cape Town) – – –

Asia Pacific (Hong – – –


Kong)

Asia Pacific (Jakarta) – – –

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

Israel (Tel Aviv) – – –

Middle East (Bahrain) – – –

Middle East (UAE) – – –

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

AWS GovCloud (US- – – –


East)

AWS GovCloud (US- – – –


West)

RDS Custom for SQL Server


You can deploy RDS Custom for SQL Server by using either an RDS provided engine version (RPEV) or a
custom engine version (CEV):

• 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.

Region RPEV AWS provided CEV Customer-provided CEV

US East (Ohio) 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

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

US West (N. California) – – –

US West (Oregon) 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

Africa (Cape Town) – – –

Asia Pacific (Hong – – –


Kong)

Asia Pacific (Hyderabad) – – –

Asia Pacific (Jakarta) – – –

Asia Pacific (Melbourne) – – –

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

Region RPEV AWS provided CEV Customer-provided CEV

Asia Pacific (Osaka) – – –

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

Canada (Central) 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 (Frankfurt) 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

Europe (Ireland) 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

Europe (London) 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

Europe (Milan) – – –

Europe (Paris) – – –

Europe (Spain) – – –

Europe (Stockholm) 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

Europe (Zurich) – – –

Israel (Tel Aviv) – – –

Middle East (Bahrain) – – –

Middle East (UAE) – – –

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

Region RPEV AWS provided CEV Customer-provided CEV

AWS GovCloud (US- – – –


East)

AWS GovCloud (US- – – –


West)

Amazon RDS Proxy


Amazon RDS Proxy is a fully managed, highly available database proxy that makes applications more
scalable by pooling and sharing established database connections. For more information, see Using
Amazon RDS Proxy (p. 1199).

RDS Proxy isn't available with RDS for Oracle.

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)

RDS Proxy with RDS for MariaDB


The following Regions and engine versions are available for RDS Proxy with RDS for MariaDB.

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

Europe (Zurich) All available All available – – –


versions versions

Israel (Tel Aviv) – – – – –

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)

RDS Proxy with RDS for MySQL


The following Regions and engine versions are available for RDS Proxy with RDS for MySQL.

Region RDS for MySQL 8.0 RDS for MySQL 5.7

US East (Ohio) All available versions All available versions

US East (N. Virginia) All available versions All available versions

US West (N. California) All available versions All available versions

US West (Oregon) All available versions All available versions

Africa (Cape Town) All available versions All available versions

Asia Pacific (Hong Kong) All available versions All available versions

Asia Pacific (Hyderabad) – –

Asia Pacific (Jakarta) All available versions All available versions

Asia Pacific (Melbourne) – –

Asia Pacific (Mumbai) All available versions All available versions

Asia Pacific (Osaka) All available versions All available versions

Asia Pacific (Seoul) All available versions All available versions

Asia Pacific (Singapore) All available versions All available versions

Asia Pacific (Sydney) All available versions All available versions

Asia Pacific (Tokyo) All available versions All available versions

Canada (Central) All available versions All available versions

China (Beijing) All available versions All available versions

China (Ningxia) All available versions All available versions

Europe (Frankfurt) All available versions All available versions

Europe (Ireland) All available versions All available versions

Europe (London) All available versions All available versions

157
Amazon Relational Database Service User Guide
Amazon RDS Proxy

Region RDS for MySQL 8.0 RDS for MySQL 5.7

Europe (Milan) All available versions All available versions

Europe (Paris) All available versions All available versions

Europe (Spain) – –

Europe (Stockholm) All available versions All available versions

Europe (Zurich) – –

Israel (Tel Aviv) – –

Middle East (Bahrain) All available versions All available versions

Middle East (UAE) – –

South America (São Paulo) All available versions All available versions

AWS GovCloud (US-East) – –

AWS GovCloud (US-West) – –

RDS Proxy with RDS for PostgreSQL


The following Regions and engine versions are available for RDS Proxy with RDS for PostgreSQL.

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)

RDS Proxy with RDS for SQL Server


The following Regions and engine versions are available for RDS Proxy with RDS for SQL Server.

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) – – – –

Israel (Tel Aviv) – – – –

Middle East (Bahrain) All available versions All available versions All available versions All available versions

Middle East (UAE) – – – –

South America (São All available versions All available versions All available versions All available versions
Paulo)

AWS GovCloud (US- – – – –


East)

AWS GovCloud (US- – – – –


West)

Secrets Manager integration


With AWS Secrets Manager, you can replace hard-coded credentials in your code, including database
passwords, with an API call to Secrets Manager to retrieve the secret programmatically. For more
information about Secrets Manager, see AWS Secrets Manager User Guide.

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:

• Israel (Tel Aviv)


• AWS GovCloud (US-East)
• AWS GovCloud (US-West)

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.

For more information on engine-native features, see:

• MariaDB feature support on Amazon RDS (p. 1256)


• MySQL feature support on Amazon RDS (p. 1624)
• RDS for Oracle features (p. 1786)
• Working with PostgreSQL features supported by Amazon RDS for PostgreSQL (p. 2158)
• Microsoft SQL Server features on Amazon RDS (p. 1364)

162
Amazon Relational Database Service User Guide
DB instance billing for Amazon RDS

DB instance billing for Amazon RDS


Amazon RDS instances are billed based on the following components:

• 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).

For more information, see Backing up and restoring (p. 590).


• Data transfer (per GB) – Data transfer in and out of your DB instance from or to the internet and other
AWS Regions.

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

On-Demand DB instances for Amazon RDS


Amazon RDS on-demand DB instances are billed based on the class of the DB instance (for example,
db.t3.small or db.m5.large). For Amazon RDS pricing information, see the Amazon RDS product page.

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

Reserved DB instances for Amazon RDS


Using reserved DB instances, you can reserve a DB instance for a one- or three-year term. Reserved DB
instances provide you with a significant discount compared to on-demand DB instance pricing. Reserved
DB instances are not physical instances, but rather a billing discount applied to the use of certain on-
demand DB instances in your account. Discounts for reserved DB instances are tied to instance type and
AWS Region.

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.

Overview of reserved DB instances


When you purchase a reserved DB instance in Amazon RDS, you purchase a commitment to getting a
discounted rate, on a specific DB instance type, for the duration of the reserved DB instance. To use an
Amazon RDS reserved DB instance, you create a new DB instance just like you do for an on-demand
instance.

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.

Size-flexible reserved DB instances


When you purchase a reserved DB instance, one thing that you specify is the instance class, for example
db.r5.large. For more information about DB instance classes, see DB instance classes (p. 11).

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

Instance size Single-AZ normalized Multi-AZ DB instance Multi-AZ DB cluster


units per hour normalized units per normalized units per
(deployment with one hour (deployment with hour (deployment with
DB instance) one DB instance and one DB instance and
one standby) two standbys)

micro 0.5 1 1.5

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

8xlarge 64 128 192

10xlarge 80 160 240

12xlarge 96 192 288

16xlarge 128 256 384

24xlarge 192 384 576

32xlarge 256 512 768

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

Reserved DB instance billing example


The price for a reserved DB instance doesn't provide a discount for the costs associated with storage,
backups, and I/O. It provides a discount only on the hourly, on-demand instance usage. The following
example illustrates the total cost per month for a reserved DB instance:

• 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.

Reserved DB instances for a Multi-AZ DB cluster


To purchase the equivalent reserved DB instances for a Multi-AZ DB cluster, you can do one of the
following:

• 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).

Deleting a reserved DB instance


The terms for a reserved DB instance involve a one-year or three-year commitment. You can't cancel a
reserved DB instance. However, you can delete a DB instance that is covered by a reserved DB instance
discount. The process for deleting a DB instance that is covered by a reserved DB instance discount is the
same as for any other DB instance.

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).

Working with reserved DB instances


You can use the AWS Management Console, the AWS CLI, and the RDS API to work with reserved DB
instances.

Console
You can use the AWS Management Console to work with reserved DB instances as shown in the following
procedures.

To get pricing and information about available reserved DB instance offerings

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.

To purchase a reserved 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 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.

To get information about reserved DB instances for your AWS account

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.

Example of getting available reserved DB instance offerings

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

aws rds describe-reserved-db-instances-offerings

This call returns output similar to the following:

OFFERING OfferingId Class Multi-AZ Duration Fixed


Price Usage Price Description Offering Type
OFFERING 438012d3-4052-4cc7-b2e3-8d3372e0e706 db.r3.large y 1y 1820.00
USD 0.368 USD mysql Partial Upfront
OFFERING 649fd0c8-cf6d-47a0-bfa6-060f8e75e95f db.r3.small n 1y 227.50
USD 0.046 USD mysql Partial Upfront
OFFERING 123456cd-ab1c-47a0-bfa6-12345667232f db.r3.small n 1y 162.00
USD 0.00 USD mysql All Upfront
Recurring Charges: Amount Currency Frequency
Recurring Charges: 0.123 USD Hourly
OFFERING 123456cd-ab1c-37a0-bfa6-12345667232d db.r3.large y 1y 700.00
USD 0.00 USD mysql All Upfront
Recurring Charges: Amount Currency Frequency
Recurring Charges: 1.25 USD Hourly
OFFERING 123456cd-ab1c-17d0-bfa6-12345667234e db.r3.xlarge n 1y 4242.00
USD 2.42 USD mysql No Upfront

After you have information about the available reserved DB instance offerings, you can use the
information to purchase an offering.

To purchase a reserved DB instance, use the AWS CLI command purchase-reserved-db-instances-


offering with the following parameters:

• --reserved-db-instances-offering-id – The ID of the offering that you want to purchase. See


the preceding example to get the offering ID.
• --reserved-db-instance-id – You can assign your own identifier to the reserved DB instances
that you purchase to help track them.

Example of purchasing a reserved DB instance

The following example purchases the reserved DB instance offering with ID 649fd0c8-cf6d-47a0-
bfa6-060f8e75e95f, and assigns the identifier of MyReservation.

For Linux, macOS, or Unix:

aws rds purchase-reserved-db-instances-offering \


--reserved-db-instances-offering-id 649fd0c8-cf6d-47a0-bfa6-060f8e75e95f \
--reserved-db-instance-id MyReservation

For Windows:

aws rds purchase-reserved-db-instances-offering ^


--reserved-db-instances-offering-id 649fd0c8-cf6d-47a0-bfa6-060f8e75e95f ^
--reserved-db-instance-id MyReservation

The command returns output similar to the following:

RESERVATION ReservationId Class Multi-AZ Start Time Duration


Fixed Price Usage Price Count State Description Offering Type
RESERVATION MyReservation db.r3.small y 2011-12-19T00:30:23.247Z 1y
455.00 USD 0.092 USD 1 payment-pending mysql Partial Upfront

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.

Example of getting your reserved DB instances

aws rds describe-reserved-db-instances

The command returns output similar to the following:

RESERVATION ReservationId Class Multi-AZ Start Time Duration


Fixed Price Usage Price Count State Description Offering Type
RESERVATION MyReservation db.r3.small y 2011-12-09T23:37:44.720Z 1y
455.00 USD 0.092 USD 1 retired mysql Partial Upfront

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.

Viewing the billing for your reserved DB instances


You can view the billing for your reserved DB instances in the Billing Dashboard in the AWS Management
Console.

To view reserved DB instance billing

1. Sign in to the AWS Management Console.


2. From the account menu at the upper right, choose Billing Dashboard.
3. Choose Bill Details at the upper right of the dashboard.
4. Under AWS Service Charges, expand Relational Database Service.
5. Expand the AWS Region where your reserved DB instances are, for example US West (Oregon).

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

Setting up for Amazon RDS


Before you use Amazon Relational Database Service for the first time, complete the following tasks.

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).

Sign up for an AWS account


If you do not have an AWS account, complete the following steps to create one.

To sign up for an AWS account

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.

Create an administrative user


After you sign up for an AWS account, create an administrative user so that you don't use the root user
for everyday tasks.

Secure your AWS account root user

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

2. Turn on multi-factor authentication (MFA) for your root user.

For instructions, see Enable a virtual MFA device for your AWS account root user (console) in the IAM
User Guide.

Create an administrative user

• 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.

Sign in as the administrative user

• 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.

Grant programmatic access


Users need programmatic access if they want to interact with AWS outside of the AWS Management
Console. The way to grant programmatic access depends on the type of user that's accessing AWS.

To grant users programmatic access, choose one of the following options.

Which user needs To By


programmatic access?

Workforce identity Use temporary credentials to Following the instructions for


sign programmatic requests to the interface that you want to
(Users managed in IAM Identity the AWS CLI, AWS SDKs, or AWS use.
Center) APIs.
• For the AWS CLI, see
Configuring the AWS CLI to
use AWS IAM Identity Center
(successor to AWS Single Sign-
On) in the AWS Command Line
Interface User Guide.
• For AWS SDKs, tools, and
AWS APIs, see IAM Identity
Center authentication in the
AWS SDKs and Tools Reference
Guide.

IAM Use temporary credentials to Following the instructions in


sign programmatic requests to Using temporary credentials
the AWS CLI, AWS SDKs, or AWS with AWS resources in the IAM
APIs. User Guide.

IAM (Not recommended) Following the instructions for


Use long-term credentials to the interface that you want to
sign programmatic requests to use.

175
Amazon Relational Database Service User Guide
Determine requirements

Which user needs To By


programmatic access?
the AWS CLI, AWS SDKs, or AWS • For the AWS CLI, see
APIs. Authenticating using IAM
user credentials in the AWS
Command Line Interface User
Guide.
• For AWS SDKs and tools, see
Authenticate using long-term
credentials in the AWS SDKs
and Tools Reference Guide.
• For AWS APIs, see Managing
access keys for IAM users in
the IAM User Guide.

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.

Provide access to your DB instance in your VPC by


creating a security group
VPC security groups provide access to DB instances in a VPC. They act as a firewall for the associated
DB instance, controlling both inbound and outbound traffic at the DB instance level. DB instances are
created by default with a firewall and a default security group that protect the DB instance.

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).

To create a VPC security group

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.

The Create security group page appears.


5. In Basic details, enter the Security group name and Description. For VPC, choose the VPC that you
want to create your DB instance in.
6. In Inbound rules, choose Add rule.

a. For Type, choose Custom TCP.


b. For Port range, enter the port value to use for your DB instance.
c. For Source, choose a security group name or type the IP address range (CIDR value) from where
you access the DB instance. If you choose My IP, this allows access to the DB instance from the
IP address detected in your browser.
7. If you need to add more IP addresses or different port ranges, choose Add rule and enter the
information for the rule.
8. (Optional) In Outbound rules, add rules for outbound traffic. By default, all outbound traffic is
allowed.
9. 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.

Database engine Documentation

MariaDB Creating and connecting to a MariaDB DB instance (p. 181)

Microsoft SQL Server Creating and connecting to a Microsoft SQL Server DB instance (p. 194)

MySQL Creating and connecting to a MySQL DB instance (p. 209)

Oracle Creating and connecting to an Oracle DB instance (p. 222)

178
Amazon Relational Database Service User Guide
Provide access to your DB instance

Database engine Documentation

PostgreSQL Creating and connecting to a PostgreSQL DB instance (p. 235)

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

Getting started with Amazon RDS


In the following examples, you can find how to create and connect to a DB instance using Amazon
Relational Database Service (Amazon RDS). You can create a DB instance that uses MariaDB, MySQL,
Microsoft SQL Server, Oracle, or PostgreSQL.
Important
Before you can create or connect to a DB instance, make sure to complete the tasks in Setting
up for Amazon RDS (p. 174).

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

Creating and connecting to a MariaDB DB instance


This tutorial creates an EC2 instance and an RDS for MariaDB DB instance. The tutorial shows you how
to access the DB instance from the EC2 instance using a standard MySQL client. As a best practice, this
tutorial creates a private DB instance in a virtual private cloud (VPC). In most cases, other resources in
the same VPC, such as EC2 instances, can access the DB instance, but resources outside of the VPC can't
access it.

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:

• Sign up for an AWS account (p. 174)


• Create an administrative user (p. 174)

Step 1: Create an EC2 instance


Create an Amazon EC2 instance that you will use to connect to your database.

To create an EC2 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 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

The Launch an instance page opens.


4. Choose the following settings on the Launch an instance page.

a. Under Name and tags, for Name, enter ec2-database-connect.


b. Under Application and OS Images (Amazon Machine Image), choose Amazon Linux, and then
choose the Amazon Linux 2023 AMI. Keep the default selections for the other choices.

c. Under Instance type, choose t2.micro.


d. Under Key pair (login), choose a Key pair name to use an existing key pair. To create a new key
pair for the Amazon EC2 instance, choose Create new key pair and then use the Create key pair
window to create it.

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.

The following image shows an example of the Network settings section.

f. Leave the default values for the remaining sections.


g. Review a summary of your EC2 instance configuration in the Summary panel, and when you're
ready, choose Launch instance.
5. On the Launch Status page, note the identifier for your new EC2 instance, for example:
i-1234567890abcdef0.

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:

a. In Instance summary, note the value for Public IPv4 DNS.

b. In Instance details, note the value for Key pair name.

8. Wait until the Instance state for your EC2 instance has a status of Running before continuing.

Step 2: Create a MariaDB DB instance


The basic building block of Amazon RDS is the DB instance. This environment is where you run your
MariaDB databases.

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.

To create a MariaDB DB instance with Easy create

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.

5. In Configuration, choose MariaDB.


6. For DB instance size, choose Free tier.
7. For DB instance identifier, enter database-test1.
8. For Master username, enter a name for the master user, or keep the default name.

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

11. Open View default settings for Easy create.

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.

The DB instance has a status of Creating until it is ready to use.

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.

Step 3: Connect to a MariaDB DB instance


You can use any standard SQL client application to connect to the DB instance. In this example, you
connect to a MariaDB DB instance using the mysql command-line client.

To connect to a MariaDB DB 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 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:

ssh -i location_of_pem_file ec2-user@ec2-instance-public-dns-name

For example, assume that ec2-database-connect-key-pair.pem is


stored in /dir1 on Linux, and the public IPv4 DNS for your EC2 instance is
ec2-12-345-678-90.compute-1.amazonaws.com. Your SSH command would look as follows:

191
Amazon Relational Database Service User Guide
Step 3: Connect to a MariaDB DB instance

ssh -i /dir1/ec2-database-connect-key-pair.pem ec2-


[email protected]

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.

sudo dnf update -y

4. Install the mysql command-line client from MariaDB.

To install the MariaDB command-line client on Amazon Linux 2023, run the following command:

sudo dnf install mariadb105

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.

mysql -h endpoint -P 3306 -u admin -p

After you enter the password for the user, you should see output similar to the following.

Welcome to the MariaDB monitor. Commands end with ; or \g.


Your MariaDB connection id is 156
Server version: 10.6.10-MariaDB-log managed by https://aws.amazon.com/rds/

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

Step 4: Delete the EC2 instance and DB instance


After you connect to and explore the sample EC2 instance and DB instance that you created, delete them
so you're no longer charged for them.

To delete the EC2 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.

To delete the DB instance with no final DB snapshot

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.

(Optional) Connect your DB instance to a Lambda


function
You can also connect your RDS for MariaDB DB instance to a Lambda serverless compute resource.
Lambda functions allow you to run code without provisioning or managing infrastructure. A Lambda
function also allows you to automatically respond to code execution requests at any scale, from a dozen
events a day to hundreds of per second. For more information, see Automatically connecting a Lambda
function and a DB instance (p. 392).

193
Amazon Relational Database Service User Guide
Creating and connecting to a
Microsoft SQL Server DB instance

Creating and connecting to a Microsoft SQL Server


DB instance
This tutorial creates an EC2 instance and an RDS for Microsoft SQL Server DB instance. The tutorial
shows you how to access the DB instance from the EC2 instance using the Microsoft SQL Server
Management Studio client. As a best practice, this tutorial creates a private DB instance in a virtual
private cloud (VPC). In most cases, other resources in the same VPC, such as EC2 instances, can access the
DB instance, but resources outside of the VPC can't access it.

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

• Step 4: Explore your sample SQL Server DB instance (p. 206)


• Step 5: Delete the EC2 instance and DB instance (p. 208)
• (Optional) Connect your DB instance to a Lambda function (p. 208)

Prerequisites
Before you begin, complete the steps in the following sections:

• Sign up for an AWS account (p. 174)


• Create an administrative user (p. 174)

Step 1: Create an EC2 instance


Create an Amazon EC2 instance that you will use to connect to your database.

To create an EC2 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 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

The Launch an instance page opens.


4. Choose the following settings on the Launch an instance page.

a. Under Name and tags, for Name, enter ec2-database-connect.


b. Under Application and OS Images (Amazon Machine Image), choose Windows, and then
choose the Microsoft Windows Server 2022 Base. Keep the default selections for the other
choices.

196
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance

c. Under Instance type, choose t2.micro.


d. Under Key pair (login), choose a Key pair name to use an existing key pair. To create a new key
pair for the Amazon EC2 instance, choose Create new key pair and then use the Create key pair
window to create it.

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

The following image shows an example of the Network settings section.

f. Keep the default values for the remaining sections.


g. Review a summary of your EC2 instance configuration in the Summary panel, and when you're
ready, choose Launch instance.
5. On the Launch Status page, note the identifier for your new EC2 instance, for example:
i-1234567890abcdef0.

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.

Step 2: Create a SQL Server DB instance


The basic building block of Amazon RDS is the DB instance. This environment is where you run your SQL
Server databases.

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.

To create a Microsoft SQL Server DB instance with Easy create

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

5. In Configuration, choose Microsoft SQL Server.


6. For Edition, choose SQL Server Express Edition.
7. For DB instance size, choose Free tier.
8. For DB instance identifier, enter database-test1.

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.

The DB instance has a status of Creating until it is ready to use.

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.

Step 3: Connect to your SQL Server DB instance


In the following procedure, you connect to your DB instance by using Microsoft SQL Server Management
Studio (SSMS).

To connect to an RDS for SQL Server DB instance using SSMS

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.

a. Use the Start menu to open Internet Explorer.


b. Use Internet Explorer to download and install a standalone version of SSMS. If you are
prompted that the site isn't trusted, add the site to the list of trusted sites.
4. Start SQL Server Management Studio (SSMS).

The Connect to Server dialog box appears.


5. Provide the following information for your sample DB instance:

a. For Server type, choose Database Engine.


b. For Server name, enter the DNS name, followed by a comma and the port number (the default
port is 1433). For example, your server name should look as follows:

database-test1.0123456789012.us-west-2.rds.amazonaws.com,1433

c. For Authentication, choose SQL Server Authentication.


d. For Login, enter the username that you chose to use for your sample DB instance. This is also
known as the master username.
e. For Password, enter the password that you chose earlier for your sample DB instance. This is
also known as the master user password.
6. Choose Connect.

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).

Step 4: Explore your sample SQL Server DB instance


You can explore your sample DB instance by using Microsoft SQL Server Management Studio (SSMS).

To explore a DB instance using SSMS

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:

a. In SSMS, on the View menu, choose Object Explorer.


b. Expand your DB instance, expand Databases, and then expand System Databases as shown.

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

Step 5: Delete the EC2 instance and DB instance


After you connect to and explore the sample EC2 instance and DB instance that you created, delete them
so you're no longer charged for them.

To delete the EC2 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.

To delete the DB instance with no final DB snapshot

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.

(Optional) Connect your DB instance to a Lambda


function
You can also connect your RDS for SQL Server DB instance to a Lambda serverless compute resource.
Lambda functions allow you to run code without provisioning or managing infrastructure. A Lambda
function also allows you to automatically respond to code execution requests at any scale, from a dozen
events a day to hundreds of per second. For more information, see Automatically connecting a Lambda
function and a DB instance (p. 392).

208
Amazon Relational Database Service User Guide
Creating and connecting to a MySQL DB instance

Creating and connecting to a MySQL DB instance


This tutorial creates an EC2 instance and an RDS for MySQL DB instance. The tutorial shows you how
to access the DB instance from the EC2 instance using a standard MySQL client. As a best practice, this
tutorial creates a private DB instance in a virtual private cloud (VPC). In most cases, other resources in
the same VPC, such as EC2 instances, can access the DB instance, but resources outside of the VPC can't
access it.

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:

• Sign up for an AWS account (p. 174)


• Create an administrative user (p. 174)

Step 1: Create an EC2 instance


Create an Amazon EC2 instance that you will use to connect to your database.

To create an EC2 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 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

The Launch an instance page opens.


4. Choose the following settings on the Launch an instance page.

a. Under Name and tags, for Name, enter ec2-database-connect.


b. Under Application and OS Images (Amazon Machine Image), choose Amazon Linux, and then
choose the Amazon Linux 2023 AMI. Keep the default selections for the other choices.

c. Under Instance type, choose t2.micro.


d. Under Key pair (login), choose a Key pair name to use an existing key pair. To create a new key
pair for the Amazon EC2 instance, choose Create new key pair and then use the Create key pair
window to create it.

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.

The following image shows an example of the Network settings section.

f. Leave the default values for the remaining sections.


g. Review a summary of your EC2 instance configuration in the Summary panel, and when you're
ready, choose Launch instance.
5. On the Launch Status page, note the identifier for your new EC2 instance, for example:
i-1234567890abcdef0.

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:

a. In Instance summary, note the value for Public IPv4 DNS.

b. In Instance details, note the value for Key pair name.

8. Wait until the Instance state for your EC2 instance has a status of Running before continuing.

Step 2: Create a MySQL DB instance


The basic building block of Amazon RDS is the DB instance. This environment is where you run your
MySQL databases.

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.

To create a MySQL DB instance with Easy create

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.

5. In Configuration, choose MySQL.


6. For DB instance size, choose Free tier.
7. For DB instance identifier, enter database-test1.
8. For Master username, enter a name for the master user, or keep the default name.

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

11. (Optional) Open View default settings for Easy create.

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.

The DB instance has a status of Creating until it is ready to use.

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.

Step 3: Connect to a MySQL DB instance


You can use any standard SQL client application to connect to the DB instance. In this example, you
connect to a MySQL DB instance using the mysql command-line client.

To connect to a MySQL DB 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 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:

ssh -i location_of_pem_file ec2-user@ec2-instance-public-dns-name

For example, assume that ec2-database-connect-key-pair.pem is


stored in /dir1 on Linux, and the public IPv4 DNS for your EC2 instance is
ec2-12-345-678-90.compute-1.amazonaws.com. Your SSH command would look as follows:

219
Amazon Relational Database Service User Guide
Step 3: Connect to a MySQL DB instance

ssh -i /dir1/ec2-database-connect-key-pair.pem ec2-


[email protected]

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.

sudo dnf update -y

4. To install the mysql command-line client from MariaDB on Amazon Linux 2023, run the following
command:

sudo dnf install mariadb105

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.

mysql -h endpoint -P 3306 -u admin -p

After you enter the password for the user, you should see output similar to the following.

Welcome to the MariaDB monitor. Commands end with ; or \g.


Your MySQL connection id is 3082
Server version: 8.0.28 Source distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

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

Step 4: Delete the EC2 instance and DB instance


After you connect to and explore the sample EC2 instance and DB instance that you created, delete them
so you're no longer charged for them.

To delete the EC2 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.

To delete the DB instance with no final DB snapshot

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.

(Optional) Connect your DB instance to a Lambda


function
You can also connect your RDS for MySQL DB instance to a Lambda serverless compute resource.
Lambda functions allow you to run code without provisioning or managing infrastructure. A Lambda
function also allows you to automatically respond to code execution requests at any scale, from a dozen
events a day to hundreds of per second. For more information, see Automatically connecting a Lambda
function and a DB instance (p. 392).

221
Amazon Relational Database Service User Guide
Creating and connecting to an Oracle DB instance

Creating and connecting to an Oracle DB instance


This tutorial creates an EC2 instance and an RDS for Oracle DB instance. The tutorial shows you how
to access the DB instance from the EC2 instance using a standard Oracle client. As a best practice, this
tutorial creates a private DB instance in a virtual private cloud (VPC). In most cases, other resources in
the same VPC, such as EC2 instances, can access the DB instance, but resources outside of the VPC can't
access it.

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:

• Sign up for an AWS account (p. 174)


• Create an administrative user (p. 174)

Step 1: Create an EC2 instance


Create an Amazon EC2 instance that you will use to connect to your database.

To create an EC2 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 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

The Launch an instance page opens.


4. Choose the following settings on the Launch an instance page.

a. Under Name and tags, for Name, enter ec2-database-connect.


b. Under Application and OS Images (Amazon Machine Image), choose Amazon Linux, and then
choose the Amazon Linux 2023 AMI. Keep the default selections for the other choices.

c. Under Instance type, choose t2.micro.


d. Under Key pair (login), choose a Key pair name to use an existing key pair. To create a new key
pair for the Amazon EC2 instance, choose Create new key pair and then use the Create key pair
window to create it.

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.

The following image shows an example of the Network settings section.

f. Leave the default values for the remaining sections.


g. Review a summary of your EC2 instance configuration in the Summary panel, and when you're
ready, choose Launch instance.
5. On the Launch Status page, note the identifier for your new EC2 instance, for example:
i-1234567890abcdef0.

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:

a. In Instance summary, note the value for Public IPv4 DNS.

b. In Instance details, note the value for Key pair name.

8. Wait until the Instance state for your EC2 instance has a status of Running before continuing.

Step 2: Create an Oracle DB instance


The basic building block of Amazon RDS is the DB instance. This environment is where you run your
Oracle databases.

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.

To create an Oracle DB instance with Easy create

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.

5. In Configuration, choose Oracle.


6. For DB instance size, choose Dev/Test.
7. For DB instance identifier, enter database-test1.
8. For Master username, enter a name for the master user, or keep the default name.

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.

11. Open View default settings for Easy create.

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.

The DB instance has a status of Creating until it is ready to use.

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.

Step 3: Connect your SQL client to an Oracle DB


instance
You can use any standard SQL client application to connect to your DB instance. In this example, you
connect to an Oracle DB instance using the Oracle command-line client.

To connect to an Oracle DB 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:

ssh -i location_of_pem_file ec2-user@ec2-instance-public-dns-name

For example, assume that ec2-database-connect-key-pair.pem is


stored in /dir1 on Linux, and the public IPv4 DNS for your EC2 instance is
ec2-12-345-678-90.compute-1.amazonaws.com. Your SSH command would look as follows:

ssh -i /dir1/ec2-database-connect-key-pair.pem ec2-


[email protected]

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.

sudo dnf update -y

4. In a web browser, go to https://www.oracle.com/database/technologies/instant-client/linux-


x86-64-downloads.html.
5. For the latest database version that appears on the web page, copy the .rpm links (not the .zip links)
for the Instant Client Basic Package and SQL*Plus Package. For example, the following links are for
Oracle Database version 21.9:

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

7. Install the packages by running the dnf command as follows:

sudo dnf install oracle-instantclient-*.rpm

8. Start SQL*Plus and connect to the Oracle DB instance. For example, enter the following command.

Substitute the DB instance endpoint (DNS name) for oracle-db-instance-endpoint and


substitute the master user name that you used for admin. When you use Easy create for Oracle,
the database name is DATABASE. Provide the master password that you used when prompted for a
password.

sqlplus admin@oracle-db-instance-endpoint:1521/DATABASE

After you enter the password for the user, you should see output similar to the following.

SQL*Plus: Release 21.0.0.0.0 - Production on Wed Mar 1 16:41:28 2023


Version 21.9.0.0.0

Copyright (c) 1982, 2022, Oracle. All rights reserved.

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:

SELECT SYSDATE FROM DUAL;

233
Amazon Relational Database Service User Guide
Step 4: Delete the EC2 instance and DB instance

Step 4: Delete the EC2 instance and DB instance


After you connect to and explore the sample EC2 instance and DB instance that you created, delete them
so you're no longer charged for them.

To delete the EC2 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.

To delete the DB instance with no final DB snapshot

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.

(Optional) Connect your DB instance to a Lambda


function
You can also connect your RDS for Oracle DB instance to a Lambda serverless compute resource. Lambda
functions allow you to run code without provisioning or managing infrastructure. A Lambda function
also allows you to automatically respond to code execution requests at any scale, from a dozen events a
day to hundreds of per second. For more information, see Automatically connecting a Lambda function
and a DB instance (p. 392).

234
Amazon Relational Database Service User Guide
Creating and connecting to a PostgreSQL DB instance

Creating and connecting to a PostgreSQL DB


instance
This tutorial creates an EC2 instance and an RDS for PostgreSQL DB instance. The tutorial shows you how
to access the DB instance from the EC2 instance using a standard PostgreSQL client. As a best practice,
this tutorial creates a private DB instance in a virtual private cloud (VPC). In most cases, other resources
in the same VPC, such as EC2 instances, can access the DB instance, but resources outside of the VPC
can't access it.

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

• Step 4: Delete the EC2 instance and DB instance (p. 248)


• (Optional) Connect your DB instance to a Lambda function (p. 248)

Prerequisites
Before you begin, complete the steps in the following sections:

• Sign up for an AWS account (p. 174)


• Create an administrative user (p. 174)

Step 1: Create an EC2 instance


Create an Amazon EC2 instance that you will use to connect to your database.

To create an EC2 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 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

The Launch an instance page opens.


4. Choose the following settings on the Launch an instance page.

a. Under Name and tags, for Name, enter ec2-database-connect.


b. Under Application and OS Images (Amazon Machine Image), choose Amazon Linux, and then
choose the Amazon Linux 2023 AMI. Keep the default selections for the other choices.

237
Amazon Relational Database Service User Guide
Step 1: Create an EC2 instance

c. Under Instance type, choose t2.micro.


d. Under Key pair (login), choose a Key pair name to use an existing key pair. To create a new key
pair for the Amazon EC2 instance, choose Create new key pair and then use the Create key pair
window to create it.

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

The following image shows an example of the Network settings section.

f. Leave the default values for the remaining sections.


g. Review a summary of your EC2 instance configuration in the Summary panel, and when you're
ready, choose Launch instance.
5. On the Launch Status page, note the identifier for your new EC2 instance, for example:
i-1234567890abcdef0.

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:

a. In Instance summary, note the value for Public IPv4 DNS.

b. In Instance details, note the value for Key pair name.

8. Wait until the Instance state for your EC2 instance has a status of Running before continuing.

Step 2: Create a PostgreSQL DB instance


The basic building block of Amazon RDS is the DB instance. This environment is where you run your
PostgreSQL databases.

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.

To create a PostgreSQL DB instance with Easy create

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.

5. In Configuration, choose PostgreSQL.


6. For DB instance size, choose Free tier.
7. For DB instance identifier, enter database-test1.
8. For Master username, enter a name for the master user, or keep the default name (postgres).

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

11. Open View default settings for Easy create.

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.

The DB instance has a status of Creating until it is ready to use.

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.

Step 3: Connect to a PostgreSQL DB instance


You can connect to the DB instance using pgadmin or psql. This example explains how to connect to a
PostgreSQL DB instance using the psql command-line client.

To connect to a PostgreSQL DB instance using psql

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:

ssh -i location_of_pem_file ec2-user@ec2-instance-public-dns-name

246
Amazon Relational Database Service User Guide
Step 3: Connect to a PostgreSQL DB instance

For example, assume that ec2-database-connect-key-pair.pem is


stored in /dir1 on Linux, and the public IPv4 DNS for your EC2 instance is
ec2-12-345-678-90.compute-1.amazonaws.com. Your SSH command would look as follows:

ssh -i /dir1/ec2-database-connect-key-pair.pem ec2-


[email protected]

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.

sudo dnf update -y

4. To install the psql command-line client from PostgreSQL on Amazon Linux 2023, run the following
command:

sudo dnf install postgresql15

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.

psql --host=endpoint --port=5432 --dbname=postgres --username=postgres

After you enter the password for the user, you should see output similar to the following:

psql (14.3, server 14.6)


SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256,
compression: off)
Type "help" for help.

postgres=>

For more information on connecting to a PostgreSQL DB instance, see Connecting to a DB instance


running the PostgreSQL database engine (p. 2167). If you can't connect to your DB instance, see
Troubleshooting connections to your RDS for PostgreSQL instance (p. 2172).

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

Step 4: Delete the EC2 instance and DB instance


After you connect to and explore the sample EC2 instance and DB instance that you created, delete them
so you're no longer charged for them.

To delete the EC2 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.

To delete a DB instance with no final DB snapshot

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.

(Optional) Connect your DB instance to a Lambda


function
You can also connect your RDS for PostgreSQL DB instance to a Lambda serverless compute resource.
Lambda functions allow you to run code without provisioning or managing infrastructure. A Lambda
function also allows you to automatically respond to code execution requests at any scale, from a dozen
events a day to hundreds of per second. For more information, see Automatically connecting a Lambda
function and a DB instance (p. 392).

248
Amazon Relational Database Service User Guide
Tutorial: Create a web server
and an Amazon RDS DB instance

Tutorial: Create a web server and an Amazon RDS


DB instance
This tutorial shows you how to install an Apache web server with PHP and create a MySQL or PostgreSQL
database. The web server runs on an Amazon EC2 instance using Amazon Linux 2023, and you can
choose between a MySQL or PostgreSQL DB instance. Both the Amazon EC2 instance and the DB
instance run in a virtual private cloud (VPC) based on the Amazon VPC service.
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.
Note
This tutorial works with Amazon Linux 2023 and might not work for other versions of Linux.

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.

1. Launch an EC2 instance (p. 250)


2. Create an Amazon RDS DB instance (p. 255)
3. Install a web server on your EC2 instance (p. 264)

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).

Launch an EC2 instance


Create an Amazon EC2 instance in the public subnet of your VPC.

To launch an EC2 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 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

4. Choose the following settings in the Launch an instance page.

a. Under Name and tags, for Name, enter tutorial-ec2-instance-web-server.


b. Under Application and OS Images (Amazon Machine Image), choose Amazon Linux, and then
choose the Amazon Linux 2023 AMI. Keep the defaults for the other choices.

251
Amazon Relational Database Service User Guide
Launch an EC2 instance

c. Under Instance type, choose t2.micro.


d. Under Key pair (login), choose a Key pair name to use an existing key pair. To create a new key
pair for the Amazon EC2 instance, choose Create new key pair and then use the Create key pair
window to create it.

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

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 instances
using SSH.
• Turn on Allow HTTPs traffic from the internet.
• Turn on Allow HTTP traffic from the internet.

f. Leave the default values for the remaining sections.


g. Review a summary of your instance configuration in the Summary panel, and when you're
ready, choose Launch instance.
5. On the Launch Status page, note the identifier for your new EC2 instance, for example:
i-1234567890abcdef0.

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:

a. In Instance summary, note the value for Public IPv4 DNS.

b. In Instance details, note the value for Key pair name.

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

Create an Amazon RDS DB instance


Create an RDS for MySQL or RDS for PostgreSQL DB instance that maintains the data used by a web
application.

RDS for MySQL

To create a MySQL 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.

Your DB instance configuration should look similar to the following image.

255
Amazon Relational Database Service User Guide
Create a DB instance

8. In the Availability and durability section, keep the defaults.


9. In the Settings section, set these values:

• DB instance identifier – Type tutorial-db-instance.


• Master username – Type tutorial_user.
• Auto generate a password – Leave the option turned off.
• Master password – Type a password.
• Confirm password – Retype the password.

256
Amazon Relational Database Service User Guide
Create a DB instance

10. In the Instance configuration section, set these values:

• Burstable classes (includes t classes)


• db.t3.micro

11. In the Storage section, keep the defaults.


12. In the Connectivity section, set these values and keep the other values as their defaults:

257
Amazon Relational Database Service User Guide
Create a DB instance

• For Compute resource, choose Connect to an EC2 compute resource.


• For EC2 instance, choose the EC2 instance you created previously, such as tutorial-ec2-
instance-web-server.

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).

RDS for PostgreSQL

To create a PostgreSQL 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 PostgreSQL.
7. For Templates, choose Free tier.

259
Amazon Relational Database Service User Guide
Create a DB instance

Your DB instance configuration should look similar to the following image.

260
Amazon Relational Database Service User Guide
Create a DB instance

261
Amazon Relational Database Service User Guide
Create a DB instance

8. In the Availability and durability section, keep the defaults.


9. In the Settings section, set these values:

• DB instance identifier – Type tutorial-db-instance.


• Master username – Type tutorial_user.
• Auto generate a password – Leave the option turned off.
• Master password – Type a password.
• Confirm password – Retype the password.

10. In the Instance configuration section, set these values:

• Burstable classes (includes t classes)


• db.t3.micro

262
Amazon Relational Database Service User Guide
Create a DB instance

11. In the Storage section, keep the defaults.


12. In the Connectivity section, set these values and keep the other values as their defaults:

• For Compute resource, choose Connect to an EC2 compute resource.


• For EC2 instance, choose the EC2 instance you created previously, such as tutorial-ec2-
instance-web-server.

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

15. To create your PostgreSQL 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.

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).

Install a web server on your EC2 instance


Install a web server on the EC2 instance you created in Launch an EC2 instance (p. 250). The web
server connects to the Amazon RDS DB instance that you created in Create an Amazon RDS DB
instance (p. 255).

264
Amazon Relational Database Service User Guide
Install a web server

Install an Apache web server with PHP and MariaDB


Connect to your EC2 instance and install the 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:

ssh -i location_of_pem_file ec2-user@ec2-instance-public-dns-name

For example, assume that ec2-database-connect-key-pair.pem is


stored in /dir1 on Linux, and the public IPv4 DNS for your EC2 instance is
ec2-12-345-678-90.compute-1.amazonaws.com. Your SSH command would look as follows:

ssh -i /dir1/ec2-database-connect-key-pair.pem ec2-


[email protected]

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.

sudo dnf update -y

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

sudo dnf install -y httpd php php-mysqli mariadb105

PostgreSQL

sudo dnf install -y httpd php php-pgsql postgresql15

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

For more information, see Updating instance software.


4. Start the web server with the command shown following.

sudo systemctl start httpd

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.

sudo systemctl enable httpd

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.

To set file permissions for the Apache web server

1. Add the ec2-user user to the apache group.

sudo usermod -a -G apache ec2-user

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

Your output looks similar to the following:

ec2-user adm wheel apache systemd-journal

4. Change the group ownership of the /var/www directory and its contents to the apache group.

sudo chown -R ec2-user:apache /var/www

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.

sudo chmod 2775 /var/www


find /var/www -type d -exec sudo chmod 2775 {} \;

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

find /var/www -type f -exec sudo chmod 0664 {} \;

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.

Connect your Apache web server to your DB instance


Next, you add content to your Apache web server that connects to your Amazon RDS DB instance.

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

7. Add the following contents to the SamplePage.php file:

MySQL

<?php include "../inc/dbinfo.inc"; ?>


<html>
<body>
<h1>Sample page</h1>
<?php

/* Connect to MySQL and select the database. */


$connection = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD);

if (mysqli_connect_errno()) echo "Failed to connect to MySQL: " .


mysqli_connect_error();

$database = mysqli_select_db($connection, DB_DATABASE);

/* Ensure that the EMPLOYEES table exists. */


VerifyEmployeesTable($connection, DB_DATABASE);

/* If input fields are populated, add a row to the EMPLOYEES table. */


$employee_name = htmlentities($_POST['NAME']);
$employee_address = htmlentities($_POST['ADDRESS']);

if (strlen($employee_name) || strlen($employee_address)) {
AddEmployee($connection, $employee_name, $employee_address);
}
?>

<!-- Input form -->


<form action="<?PHP echo $_SERVER['SCRIPT_NAME'] ?>" method="POST">
<table border="0">
<tr>
<td>NAME</td>
<td>ADDRESS</td>
</tr>
<tr>
<td>
<input type="text" name="NAME" maxlength="45" size="30" />
</td>
<td>
<input type="text" name="ADDRESS" maxlength="90" size="60" />
</td>
<td>
<input type="submit" value="Add Data" />
</td>
</tr>
</table>
</form>

<!-- Display table data. -->


<table border="1" cellpadding="2" cellspacing="2">
<tr>

268
Amazon Relational Database Service User Guide
Install a web server

<td>ID</td>
<td>NAME</td>
<td>ADDRESS</td>
</tr>

<?php

$result = mysqli_query($connection, "SELECT * FROM EMPLOYEES");

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>

<!-- Clean up. -->


<?php

mysqli_free_result($result);
mysqli_close($connection);

?>

</body>
</html>

<?php

/* Add an employee to the table. */


function AddEmployee($connection, $name, $address) {
$n = mysqli_real_escape_string($connection, $name);
$a = mysqli_real_escape_string($connection, $address);

$query = "INSERT INTO EMPLOYEES (NAME, ADDRESS) VALUES ('$n', '$a');";

if(!mysqli_query($connection, $query)) echo("<p>Error adding employee data.</


p>");
}

/* Check whether the table exists and, if not, create it. */


function VerifyEmployeesTable($connection, $dbName) {
if(!TableExists("EMPLOYEES", $connection, $dbName))
{
$query = "CREATE TABLE EMPLOYEES (
ID int(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
NAME VARCHAR(45),
ADDRESS VARCHAR(90)
)";

if(!mysqli_query($connection, $query)) echo("<p>Error creating table.</p>");


}
}

/* Check for the existence of a table. */


function TableExists($tableName, $connection, $dbName) {
$t = mysqli_real_escape_string($connection, $tableName);
$d = mysqli_real_escape_string($connection, $dbName);

$checktable = mysqli_query($connection,

269
Amazon Relational Database Service User Guide
Install a web server

"SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_NAME = '$t' AND


TABLE_SCHEMA = '$d'");

if(mysqli_num_rows($checktable) > 0) return true;

return false;
}
?>

PostgreSQL

<?php include "../inc/dbinfo.inc"; ?>

<html>
<body>
<h1>Sample page</h1>
<?php

/* Connect to PostgreSQL and select the database. */


$constring = "host=" . DB_SERVER . " dbname=" . DB_DATABASE . " user=" .
DB_USERNAME . " password=" . DB_PASSWORD ;
$connection = pg_connect($constring);

if (!$connection){
echo "Failed to connect to PostgreSQL";
exit;
}

/* Ensure that the EMPLOYEES table exists. */


VerifyEmployeesTable($connection, DB_DATABASE);

/* If input fields are populated, add a row to the EMPLOYEES table. */


$employee_name = htmlentities($_POST['NAME']);
$employee_address = htmlentities($_POST['ADDRESS']);

if (strlen($employee_name) || strlen($employee_address)) {
AddEmployee($connection, $employee_name, $employee_address);
}

?>

<!-- Input form -->


<form action="<?PHP echo $_SERVER['SCRIPT_NAME'] ?>" method="POST">
<table border="0">
<tr>
<td>NAME</td>
<td>ADDRESS</td>
</tr>
<tr>
<td>
<input type="text" name="NAME" maxlength="45" size="30" />
</td>
<td>
<input type="text" name="ADDRESS" maxlength="90" size="60" />
</td>
<td>
<input type="submit" value="Add Data" />
</td>
</tr>
</table>
</form>
<!-- Display table data. -->
<table border="1" cellpadding="2" cellspacing="2">

270
Amazon Relational Database Service User Guide
Install a web server

<tr>
<td>ID</td>
<td>NAME</td>
<td>ADDRESS</td>
</tr>

<?php

$result = pg_query($connection, "SELECT * FROM EMPLOYEES");

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>

<!-- Clean up. -->


<?php

pg_free_result($result);
pg_close($connection);
?>
</body>
</html>

<?php

/* Add an employee to the table. */


function AddEmployee($connection, $name, $address) {
$n = pg_escape_string($name);
$a = pg_escape_string($address);
echo "Forming Query";
$query = "INSERT INTO EMPLOYEES (NAME, ADDRESS) VALUES ('$n', '$a');";

if(!pg_query($connection, $query)) echo("<p>Error adding employee data.</p>");


}

/* Check whether the table exists and, if not, create it. */


function VerifyEmployeesTable($connection, $dbName) {
if(!TableExists("EMPLOYEES", $connection, $dbName))
{
$query = "CREATE TABLE EMPLOYEES (
ID serial PRIMARY KEY,
NAME VARCHAR(45),
ADDRESS VARCHAR(90)
)";

if(!pg_query($connection, $query)) echo("<p>Error creating table.</p>");


}
}
/* Check for the existence of a table. */
function TableExists($tableName, $connection, $dbName) {
$t = strtolower(pg_escape_string($tableName)); //table name is case sensitive
$d = pg_escape_string($dbName); //schema is 'public' instead of 'sample' db name
so not using that

$query = "SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_NAME =


'$t';";
$checktable = pg_query($connection, $query);

if (pg_num_rows($checktable) >0) return true;

271
Amazon Relational Database Service User Guide
Install a web server

return false;

}
?>

8. Save and close the SamplePage.php file.


9. Verify that your web server successfully connects to your DB instance by opening a web browser
and browsing to http://EC2 instance endpoint/SamplePage.php, for example: http://
ec2-55-122-41-31.us-west-2.compute.amazonaws.com/SamplePage.php.

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

Tutorial: Using a Lambda function to access an


Amazon RDS database
In this tutorial, you use a Lambda function to write data to an Amazon Relational Database Service
(Amazon RDS) database through RDS Proxy. Your Lambda function reads records from an Amazon
Simple Queue Service (Amazon SQS) queue and writes a new item to a table in your database whenever
a message is added. In this example, you use the AWS Management Console to manually add messages
to your queue. The following diagram shows the AWS resources you use to complete the tutorial.

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.

To complete this tutorial, you carry out the following tasks:

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.

By completing these steps, you learn:

• 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:

• Sign up for an AWS account (p. 174)


• Create an administrative user (p. 174)

Create an Amazon RDS DB instance

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.

To create a database instance

1. Open the Amazon RDS console and choose Create database.


2. Leave the Standard create option selected, then in Engine options, choose MySQL.
3. In Templates, choose Free tier.
4. In Settings, for DB instance identifier, enter MySQLForLambda.
5. Set your username and password by doing the following:

a. In Credentials settings, leave Master username set to admin.


b. For Master password, enter and confirm a password to access your database.
6. Specify the database name by doing the following:

• 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

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.

To create an associated function and proxy

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.

Set the New Lambda function name to LambdaFunctionWithRDS.


4. In the RDS Proxy section, select the Connect using RDS Proxy option. Further choose Create new
proxy.

• For Database credentials, choose Database username and password.


• For Username, specify admin.
• For Password, enter the password you created for your database instance.
5. Select Set up to complete the proxy and Lambda function creation.

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.

Create a function execution role

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

To create the Lambda execution role

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:

a. Using the policy search box, search for AWSLambdaSQSQueueExecutionRole.


b. In the results list, select the check box next to the role, then choose Clear filters.
c. Using the policy search box, search for AWSLambdaVPCAccessExecutionRole.
d. In the results list, select the check box next to the role, then choose Next.
5. For the Role name, enter lambda-vpc-sqs-role, then choose Create role.

Later in the tutorial, you need the Amazon Resource Name (ARN) of the execution role you just created.

To find the execution role ARN

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.

Create a Lambda deployment package

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)

# create the database connection outside of the handler to allow connections to be


# re-used by subsequent function invocations.
try:
conn = pymysql.connect(host=rds_proxy_host, user=user_name, passwd=password,
db=db_name, connect_timeout=5)
except pymysql.MySQLError as e:
logger.error("ERROR: Unexpected error: Could not connect to MySQL instance.")
logger.error(e)
sys.exit()

logger.info("SUCCESS: Connection to RDS for MySQL instance succeeded")

def lambda_handler(event, context):


"""
This function creates a new RDS database table and writes records to it
"""
message = event['Records'][0]['body']
data = json.loads(message)
CustID = data['CustID']
Name = data['Name']

item_count = 0
sql_string = f"insert into Customer (CustID, Name) values({CustID}, '{Name}')"

with conn.cursor() as cur:


cur.execute("create table if not exists Customer ( CustID int NOT NULL, Name
varchar(255) NOT NULL, PRIMARY KEY (CustID))")
cur.execute(sql_string)
conn.commit()
cur.execute("select * from Customer")
logger.info("The following items have been added to the database:")
for row in cur:
item_count += 1
logger.info(row)
conn.commit()

return "Added %d items to RDS for MySQL table" %(item_count)

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:

To create a .zip deployment package

1. Save the example code as a file named lambda_function.py.


2. In the same directory in which you created your lambda_function.py file, create a new directory
named package and install the PyMySQL library.

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.

Update the Lambda function


Using the .zip package you just created, you now update your Lambda function using the Lambda
console. To enable your function to access your database, you also need to configure environment
variables with your access credentials.

To update the Lambda function

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.

To configure the function's execution role

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.

To configure your function's environment variables

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.

Test your Lambda function in the console

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.

To test the Lambda function

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:

[INFO] 2023-02-14T19:31:35.149Z bdd06682-00c7-4d6f-9abb-89f4bbb4a27f The following items


have been added to the database:
[INFO] 2023-02-14T19:31:35.149Z bdd06682-00c7-4d6f-9abb-89f4bbb4a27f (1021, 'Martha
Rivera')

Create an Amazon SQS queue

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.

To create the Amazon SQS queue (console)

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.

Create an event source mapping to invoke your


Lambda function

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.

To create an event source mapping (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

2. In the Function overview section, choose Add trigger.


3. For the source, select Amazon SQS, then select the name of your queue (LambdaRDSQueue).
4. For Batch size, enter 1.
5. Leave all the other options set to the default values and choose Add.

You are now ready to test your complete setup by adding a message to your Amazon SQS queue.

Test and monitor your setup

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.

To test and monitor your setup

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"
}

3. Choose Send message.

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:

[INFO] 2023-02-14T19:06:43.873Z 45368126-3eee-47f7-88ca-3086ae6d3a77 The following


items have been added to the database:
[INFO] 2023-02-14T19:06:43.873Z 45368126-3eee-47f7-88ca-3086ae6d3a77 (1021, 'Martha
Rivera')
[INFO] 2023-02-14T19:06:43.873Z 45368126-3eee-47f7-88ca-3086ae6d3a77 (1054, 'Richard
Roe')

281
Amazon Relational Database Service User Guide
Clean up your resources

Clean up your resources


You can now delete the resources that you created for this tutorial, unless you want to retain them.
By deleting AWS resources that you're no longer using, you prevent unnecessary charges to your AWS
account.

To delete the Lambda function

1. Open the Functions page of the Lambda console.


2. Select the function that you created.
3. Choose Actions, Delete.
4. Choose Delete.

To delete the execution role

1. Open the Roles page of the IAM console.


2. Select the execution role that you created.
3. Choose Delete role.
4. Choose Yes, delete.

To delete the MySQL DB instance

1. Open the Databases page of the Amazon RDS console.


2. Select the database you created.
3. Choose Actions, Delete.
4. Clear the Create final snapshot check box.
5. Enter delete me in the text box.
6. Choose Delete.

To delete the Amazon SQS queue

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

Amazon RDS tutorials and sample


code
The AWS documentation includes several tutorials that guide you through common Amazon RDS use
cases. Many of these tutorials show you how to use Amazon RDS with other AWS services. In addition,
you can access sample code in GitHub.
Note
You can find more tutorials at the AWS Database Blog. For information about training, see AWS
Training and Certification.

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)

Tutorials in this guide


The following tutorials in this guide show you how to perform common tasks with Amazon RDS:

• 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 restore a DB instance from a DB snapshot.


• Tutorial: Using a Lambda function to access an Amazon RDS database (p. 273)

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)

Learn how to use tags to specify which DB instances to stop.


• Tutorial: Log DB instance state changes using Amazon EventBridge (p. 871)

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.

Tutorials in other AWS guides


The following tutorials in other AWS guides show you how to perform common tasks with Amazon RDS:

• 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.

AWS workshop and lab content portal for Amazon


RDS PostgreSQL
The following collection of workshops and other hands-on content helps you to gain an understanding
of the Amazon RDS PostgreSQL features and capabilities:

• Creating a DB instance

Learn how to create the DB instance.


• Performance Monitoring with RDS Tools

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.

AWS workshop and lab content portal for Amazon


RDS MySQL
The following collection of workshops and other hands-on content helps you to gain an understanding
of the Amazon RDS MySQL features and capabilities:

284
Amazon Relational Database Service User Guide
Tutorials and sample code in GitHub

• Creating a DB instance

Learn how to create the DB instance.


• Using Performance Insights

Learn how to monitor and tune your DB instance using Performance insights.

Tutorials and sample code in GitHub


The following tutorials and sample code in GitHub show you how to perform common tasks with
Amazon RDS:

• Creating the Amazon Relational Database Service item tracker

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.

Using this service with an AWS SDK


AWS software development kits (SDKs) are available for many popular programming languages. Each
SDK provides an API, code examples, and documentation that make it easier for developers to build
applications in their preferred language.

SDK documentation Code examples

AWS SDK for C++ AWS SDK for C++ code examples

AWS SDK for Go AWS SDK for Go 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

Best practices for Amazon RDS


Learn best practices for working with Amazon RDS. As new best practices are identified, we will keep this
section up to date.

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).

Amazon RDS basic operational guidelines


The following are basic operational guidelines that everyone should follow when working with Amazon
RDS. Note that the Amazon RDS Service Level Agreement requires that you follow these guidelines:

• 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.

DB instance RAM recommendations


An Amazon RDS performance best practice is to allocate enough RAM so that your working set resides
almost completely in memory. The working set is the data and indexes that are frequently in use on your
instance. The more you use the DB instance, the more the working set will grow.

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).

Using Enhanced Monitoring to identify operating


system issues
When Enhanced Monitoring is enabled, Amazon RDS provides metrics in real time for the operating
system (OS) that your DB instance runs on. You can view the metrics for your DB instance using the
console. You can also consume the Enhanced Monitoring JSON output from Amazon CloudWatch Logs in
a monitoring system of your choice. For more information about Enhanced Monitoring, see Monitoring
OS metrics with Enhanced Monitoring (p. 797).

Using metrics to identify performance issues


To identify performance issues caused by insufficient resources and other common bottlenecks, you can
monitor the metrics available for your Amazon RDS DB instance.

Viewing performance metrics


You should monitor performance metrics on a regular basis to see the average, maximum, and minimum
values for a variety of time ranges. If you do so, you can identify when performance is degraded. You
can also set Amazon CloudWatch alarms for particular metric thresholds so you are alerted if they are
reached.

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).

To view performance metrics

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).

To set a CloudWatch alarm

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

The alarm appears in the CloudWatch alarms section.

Evaluating performance metrics


A DB instance has a number of different categories of metrics, and how to determine acceptable values
depends on the metric.

CPU

• CPU Utilization – Percentage of computer processing capacity used.

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

Best practices for working with MySQL


Both table sizes and number of tables in a MySQL database can affect performance.

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:

select table_schema, TABLE_NAME, dat, idx from


(SELECT table_schema, TABLE_NAME,
( data_length ) / 1024 / 1024 as dat,
( index_length ) / 1024 / 1024 as idx
FROM information_schema.TABLES
order by 3 desc ) a
order by 3 desc
limit 10;

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.

Best practices for working with MariaDB


Both table sizes and number of tables in a MariaDB database can affect performance.

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:

select table_schema, TABLE_NAME, dat, idx from


(SELECT table_schema, TABLE_NAME,
( data_length ) / 1024 / 1024 as dat,
( index_length ) / 1024 / 1024 as idx
FROM information_schema.TABLES
order by 3 desc ) a
order by 3 desc
limit 10;

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.

Best practices for working with Oracle


For information about best practices for working with Amazon RDS for Oracle, see Best practices for
running Oracle database on Amazon Web Services.

A 2020 AWS virtual workshop included a presentation on running production Oracle databases on
Amazon RDS. A video of the presentation is available here.

Best practices for working with PostgreSQL


Of two important areas where you can improve performance with RDS for PostgreSQL, one is when
loading data into a DB instance. Another is when using the PostgreSQL autovacuum feature. The
following sections cover some of the practices we recommend for these areas.

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

Loading data into a PostgreSQL DB instance


When loading data into an Amazon RDS for PostgreSQL DB instance, modify your DB instance settings
and your DB parameter group values. Set these to allow for the most efficient importing of data into
your DB instance.

Modify your DB instance settings to the following:

• Disable DB instance backups (set backup_retention to 0)


• Disable Multi-AZ

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.

Working with the PostgreSQL autovacuum feature


The autovacuum feature for PostgreSQL databases is a feature that we strongly recommend you use
to maintain the health of your PostgreSQL DB instance. Autovacuum automates the execution of the
VACUUM and ANALYZE command Using autovacuum is required by PostgreSQL, not imposed by Amazon
RDS, and its use is critical to good performance. The feature is enabled by default for all new Amazon
RDS for PostgreSQL DB instances, and the related configuration parameters are appropriately set by
default.

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:

SELECT relname, n_dead_tup, last_vacuum, last_autovacuum FROM


pg_catalog.pg_stat_all_tables
WHERE n_dead_tup > 0 and relname = 'table1';

The results of the query will resemble the following:

relname | n_dead_tup | last_vacuum | last_autovacuum


---------+------------+-------------+-----------------
tasks | 81430522 | |
(1 row)

Amazon RDS for PostgreSQL best practices video


The 2020 AWS re:Invent conference included a presentation on new features and best practices for
working with PostgreSQL on Amazon RDS. A video of the presentation is available here.

Best practices for working with SQL Server


Best practices for a Multi-AZ deployment with a SQL Server DB instance include the following:

• 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.

Amazon RDS for SQL Server best practices video


The 2019 AWS re:Invent conference included a presentation on new features and best practices for
working with SQL Server on Amazon RDS. A video of the presentation is available here.

Working with DB parameter groups


We recommend that you try out DB parameter group changes on a test DB instance before applying
parameter group changes to your production DB instances. Improperly setting DB engine parameters in a
DB parameter group can have unintended adverse effects, including degraded performance and system
instability. Always exercise caution when modifying DB engine parameters and back up your DB instance
before modifying a DB parameter group.

For information about backing up your DB instance, see Backing up and restoring (p. 590).

Best practices for automating DB instance creation


It’s an Amazon RDS best practice to create a DB instance with the preferred minor version of the
database engine. You can use the AWS CLI, Amazon RDS API, or AWS CloudFormation to automate DB
instance creation. When you use these methods, you can specify only the major version and Amazon RDS
automatically creates the instance with the preferred minor version. For example, if PostgreSQL 12.5 is
the preferred minor version, and if you specify version 12 with create-db-instance, the DB instance
will be version 12.5.

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.

aws rds describe-db-engine-versions --default-only --engine postgres

{
"DBEngineVersions": [
{
"Engine": "postgres",
"EngineVersion": "12.5",
"DBParameterGroupFamily": "postgres12",
"DBEngineDescription": "PostgreSQL",
"DBEngineVersionDescription": "PostgreSQL 12.5-R1",
...some output truncated...
}
]
}

For information on creating DB instances programmatically, see the following resources:

297
Amazon Relational Database Service User Guide
Amazon RDS new features and
best practices presentation video

• Using the AWS CLI – create-db-instance


• Using the Amazon RDS API – CreateDBInstance
• Using AWS CloudFormation – AWS::RDS::DBInstance

Amazon RDS new features and best practices


presentation video
The 2019 AWS re:Invent conference included a presentation on new Amazon RDS features and best
practices for monitoring, analyzing, and tuning database performance using RDS. A video of the
presentation is available here.

298
Amazon Relational Database Service User Guide

Configuring an Amazon RDS DB


instance
This section shows how to set up your Amazon RDS DB instance. Before creating a DB instance, decide
on the DB instance class that will run the DB instance. Also, decide where the DB instance will run by
choosing an AWS Region. Next, create the DB instance.

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

Creating an Amazon RDS DB instance


The basic building block of Amazon RDS is the DB instance, where you create your databases. You choose
the engine-specific characteristics of the DB instance when you create it. You also choose the storage
capacity, CPU, memory, and so on, of the AWS instance on which the database server runs.

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).

The following are prerequisites to complete before creating a DB instance.

Topics
• Configure the network for the DB instance (p. 300)
• Additional prerequisites (p. 303)

Configure the network for the DB instance


You can create an Amazon RDS DB instance only in a virtual private cloud (VPC) based on the Amazon
VPC service. Also, it must be in an AWS Region that has at least two Availability Zones. The DB subnet
group that you choose for the DB instance must cover at least two Availability Zones. This configuration
ensures that you can configure a Multi-AZ deployment when you create the DB instance or easily move
to one in the future.

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)

Configure automatic network connectivity with an EC2 instance


When you create an RDS DB instance, you can use the AWS Management Console to set up connectivity
between an EC2 instance and the new DB instance. When you do so, RDS configures your VPC and
network settings automatically. The DB instance is created in the same VPC as the EC2 instance so that
the EC2 instance can access the DB instance.

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.

Console option Automatic setting

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

Console option Automatic setting


When you choose Automatic setup and there is no DB subnet group that
meets this requirement, the following action happens. RDS uses three
available private subnets in three Availability Zones where one of the
Availability Zones is the same as the EC2 instance. If a private subnet
isn’t available in an Availability Zone, RDS creates a private subnet in the
Availability Zone. Then RDS creates the DB subnet group.

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.

When you choose Multi-AZ DB instance in Availability & durability (Multi-


AZ DB instance deployment), RDS chooses the Availability Zone of the EC2
instance for one DB instance in the deployment. RDS randomly chooses
a different Availability Zone for the other DB instance. Either the primary
DB instance or the standby replica is created in the same Availability Zone
as the EC2 instance. When you choose Multi-AZ DB instance, there is
the possibility of cross Availability Zone costs if the DB instance and EC2
instance are in different Availability Zones.

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

Configure the network manually


To connect to your DB instance from resources other than EC2 instances in the same VPC, configure the
network connections manually. If you use the AWS Management Console to create your DB instance, you
can have Amazon RDS automatically create a VPC for you. Or you can use an existing VPC or create a
new VPC for your DB instance. With any approach, your VPC requires at least one subnet in each of at
least two Availability Zones for use with an RDS 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.

Microsoft SQL Server is shown here.

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:

• Multi-AZ failover option

305
Amazon Relational Database Service User Guide
Creating a DB instance

• Provisioned IOPS SSD (io1) storage option


• Enable deletion protection option

We recommend these features for any production environment.


Note
Template choices vary by edition.
10. To enter your master password, do the following:

a. In the Settings section, open Credential Settings.


b. If you want to specify a password, clear the Auto generate a password check box if it is
selected.
c. (Optional) Change the Master username value.
d. Enter the same password in Master password and Confirm password.
11. (Optional) Set up a connection to a compute resource for this 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).

This example uses Microsoft SQL Server.

Example

For Linux, macOS, or Unix:

aws rds create-db-instance \


--engine sqlserver-se \
--db-instance-identifier mymsftsqlserver \
--allocated-storage 250 \
--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

For Windows:

aws rds create-db-instance ^


--engine sqlserver-se ^
--db-instance-identifier mydbinstance ^
--allocated-storage 250 ^

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

This command produces output similar to the following.

DBINSTANCE mydbinstance db.t3.large sqlserver-se 250 sa creating 3 **** n


10.50.2789
SECGROUP default active
PARAMGRP default.sqlserver-se-14 in-sync

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).

Settings for DB instances


In the following table, you can find details about settings that you choose when you create a DB
instance. The table also shows the DB engines for which each setting is supported.

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

Allocated The amount of storage to allocate CLI option: All


storage for your DB instance (in gibibytes).
In some cases, allocating a higher --allocated-storage
amount of storage for your
DB instance than the size of API parameter:
your database can improve I/O
AllocatedStorage
performance.

For more information, see Amazon


RDS DB instance storage (p. 101).

Architecture The architecture of the database: CLI option: Oracle


settings CDB (single-tenant) or non-CDB.
Oracle Database 21c uses CDB --engine oracle-ee-cdb
architecture only. Oracle Database (multitenant)
19c can use either CDB or non-CDB
architecture. Releases lower than --engine oracle-se2-cdb
Oracle Database 19c use non-CDB (multitenant)
only.
--engine oracle-ee (traditional)
If you choose Use multitenant
--engine oracle-se2 (traditional)
architecture, RDS for Oracle
creates a container database (CDB). API parameter:
This CDB contains one pluggable
database (PDB). If you don't choose Engine
this option, RDS for Oracle creates

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.

For more information, see Overview


of RDS for Oracle CDBs (p. 1840).

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 Choose Enable replication in Not available when creating a DB Oracle


replication another AWS Region to create instance. For information on enabling
backups in an additional Region for cross-Region backups using the AWS CLI PostgreSQL
disaster recovery. or RDS API, see Enabling cross-Region
automated backups (p. 604). SQL Server
Then choose the Destination
Region for the additional backups.

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:

For more information, see Working BackupRetentionPeriod


with backups (p. 591).

309
Amazon Relational Database Service User Guide
Available settings

Console setting Setting description CLI option and RDS API parameter Supported
DB engines

Backup target Choose AWS Cloud to store CLI option: MySQL,


automated backups and manual PostgreSQL,
snapshots in the parent AWS Region. --backup-target SQL Server
Choose Outposts (on-premises) to
store them locally on your Outpost. API parameter:

This option setting applies only BackupTarget


to RDS on Outposts. For more
information, see Creating DB
instances for Amazon RDS on AWS
Outposts (p. 1189).

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.

For more information, see Working


with backups (p. 591).

Certificate The certificate authority (CA) for CLI option: All


authority the server certificate used by the DB
instance. --ca-certificate-identifier

For more information, see Using RDS API parameter:


SSL/TLS to encrypt a connection to
a DB instance (p. 2591). CACertificateIdentifier

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).

The DB character set is different


from the national character set,
which is called the NCHAR character
set. Unlike the DB character set,
the NCHAR character set specifies
the encoding for NCHAR data types
(NCHAR, NVARCHAR2, and NCLOB)
columns without affecting database
metadata.

For more information, see RDS for


Oracle character sets (p. 1801).

Collation A server-level collation for your DB CLI option: SQL Server


instance.
--character-set-name
For more information, see Server-
level collation for Microsoft SQL API parameter:
Server (p. 1607).
CharacterSetName

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

For more information, see Tagging --no-copy-tags-to-snapshot


Amazon RDS resources (p. 461).
RDS API parameter:

CopyTagsToSnapshot

311
Amazon Relational Database Service User Guide
Available settings

Console setting Setting description CLI option and RDS API parameter Supported
DB engines

Database The database authentication option IAM: Varies by


authentication that you want to use. authentication
CLI option: type
Choose Password authentication
to authenticate database users with --enable-iam-database-
database passwords only. authentication

Choose Password and IAM DB --no-enable-iam-database-


authentication to authenticate authentication
database users with database
passwords and user credentials RDS API parameter:
through users and roles. For more
EnableIAMDatabaseAuthentication
information, see IAM database
authentication for MariaDB, MySQL, Kerberos:
and PostgreSQL (p. 2642). This
option is only supported for MySQL CLI option:
and PostgreSQL.
--domain
Choose Password and Kerberos
authentication to authenticate --domain-iam-role-name
database users with database
passwords and Kerberos RDS API parameter:
authentication through an AWS
Managed Microsoft AD created with Domain
AWS Directory Service. Next, choose
the directory or choose Create a DomainIAMRoleName
new Directory.

For more information, see one of the


following:

• Using Kerberos authentication for


MySQL (p. 1645)
• Configuring Kerberos
authentication for Amazon RDS
for Oracle (p. 1819)
• Using Kerberos authentication
with Amazon RDS for
PostgreSQL (p. 2181)

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

Choose Amazon RDS Custom if you


want to customize the database,
OS, and infrastructure. For more
information, see Working with
Amazon RDS Custom (p. 978).

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.

DB engine The version of database engine that CLI option: All


version you want to use.
--engine-version

RDS API parameter:

EngineVersion

DB instance The configuration for your DB CLI option: All


class instance. For example, a db.t3.small
DB instance class has 2 GiB memory, --db-instance-class
2 vCPUs, 1 virtual core, a variable
ECU, and a moderate I/O capacity. RDS API parameter:

If possible, choose a DB instance DBInstanceClass


class large enough that a typical
query working set can be held
in memory. When working sets
are held in memory, the system
can avoid writing to disk, which
improves performance. For more
information, see DB instance
classes (p. 11).

In RDS for Oracle, you can


select Include additional
memory configurations.
These configurations are
optimized for a high ratio of
memory to vCPU. For example,
db.r5.6xlarge.tpc2.mem4x is
a db.r5.8x DB instance that has
2 threads per core (tpc2) and
4x the memory of a standard
db.r5.6xlarge DB instance. For more
information, see RDS for Oracle
instance classes (p. 1796).

313
Amazon Relational Database Service User Guide
Available settings

Console setting Setting description CLI option and RDS API parameter Supported
DB engines

DB instance The name for your DB instance. CLI option: All


identifier Name your DB instances in the
same way that you name your on- --db-instance-identifier
premises servers. Your DB instance
identifier can contain up to 63 RDS API parameter:
alphanumeric characters, and must
DBInstanceIdentifier
be unique for your account in the
AWS Region you chose.

DB parameter A parameter group for your DB CLI option: All


group instance. You can choose the default
parameter group, or you can create --db-parameter-group-name
a custom parameter group.
RDS API parameter:
For more information, see Working
with parameter groups (p. 347). DBParameterGroupName

DB subnet The DB subnet group you want to CLI option: All


group use for the DB cluster.
Select Choose existing to use an --db-subnet-group-name
existing DB subnet group. Then
choose the required subnet group RDS API parameter:
from the Existing DB subnet groups
DBSubnetGroupName
dropdown list.

Choose Automatic setup to let


RDS select a compatible DB subnet
group. If none exist, RDS creates a
new subnet group for your cluster.

For more information, see Working


with DB subnet groups (p. 2689).

Deletion Enable deletion protection to CLI option: All


protection prevent your DB instance from
being deleted. If you create a --deletion-protection
production DB instance with the
AWS Management Console, deletion --no-deletion-protection
protection is enabled by default.
RDS API parameter:
For more information, see Deleting a
DeletionProtection
DB instance (p. 489).

Encryption Enable Encryption to enable CLI option: All


encryption at rest for this DB
instance. --storage-encrypted

For more information, see --no-storage-encrypted


Encrypting Amazon RDS
resources (p. 2586). RDS API parameter:

StorageEncrypted

314
Amazon Relational Database Service User Guide
Available settings

Console setting Setting description CLI option and RDS API parameter Supported
DB engines

Enhanced Enable enhanced monitoring to CLI options: All


Monitoring enable gathering metrics in real
time for the operating system that --monitoring-interval
your DB instance runs on.
--monitoring-role-arn
For more information, see
Monitoring OS metrics with RDS API parameters:
Enhanced Monitoring (p. 797).
MonitoringInterval

MonitoringRoleArn

Engine type Choose the database engine to be CLI option: All


used for this DB instance.
--engine

RDS API parameter:

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.

MariaDB and MySQL:

• It must contain 1–64


alphanumeric characters.

Oracle:

• It must contain 1–8 alphanumeric


characters.
• It can't be NULL. The default value
is ORCL.
• It must begin with a letter.

PostgreSQL:

• It must contain 1–63


alphanumeric characters.
• It must begin with a letter or
an underscore. Subsequent
characters can be letters,
underscores, or digits (0-9).
• The initial database name is
postgres.

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

• general-public-license for --license-model


MariaDB.
• license-included for Microsoft RDS API parameter:
SQL Server.
LicenseModel
• general-public-license for
MySQL.
• license-included or bring-your-
own-license for Oracle.
• postgresql-license for
PostgreSQL.

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

Maintenance The 30-minute window in which CLI option: All


window pending modifications to your DB
instance are applied. If the time --preferred-maintenance-window
period doesn't matter, choose No
Preference. RDS API parameter:

For more information, see The PreferredMaintenanceWindow


Amazon RDS maintenance
window (p. 423).

Manage master Select Manage master credentials CLI option: All


credentials in in AWS Secrets Manager to manage
AWS Secrets the master user password in a secret --manage-master-user-password
Manager in Secrets Manager. | --no-manage-master-user-
password
Optionally, choose a KMS key to
use to protect the secret. Choose --master-user-secret-kms-key-
from the KMS keys in your account, id
or enter the key from a different
account. RDS API parameter:

For more information, see Password ManageMasterUserPassword


management with Amazon RDS and
AWS Secrets Manager (p. 2568). MasterUserSecretKmsKeyId

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:

• Oracle: 8–30 MasterUserPassword


• MariaDB and MySQL: 8–41
• SQL Server and PostgreSQL: 8–
128

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.

You can't change the master user


name after the DB instance is
created.

For more information on


privileges granted to the master
user, see Master user account
privileges (p. 2682).

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

Multi-AZ Create a standby instance to CLI option: All


deployment create a passive secondary replica
of your DB instance in another --multi-az
Availability Zone for failover
support. We recommend Multi- --no-multi-az
AZ for production workloads to
RDS API parameter:
maintain high availability.
MultiAZ
For development and testing, you
can choose Do not create a standby
instance.

For more information, see


Configuring and managing a Multi-
AZ deployment (p. 492).

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.

The national character set is


different from the DB character set.
Unlike the DB character set, the
national character set specifies the
encoding only for NCHAR data types
(NCHAR, NVARCHAR2, and NCLOB)
columns without affecting database
metadata.

For more information, see RDS for


Oracle character sets (p. 1801).

318
Amazon Relational Database Service User Guide
Available settings

Console setting Setting description CLI option and RDS API parameter Supported
DB engines

Network type The IP addressing protocols CLI option: All


supported by the DB instance.
--network-type
IPv4 (the default) to specify that
resources can communicate with the RDS API parameter:
DB instance only over the Internet
Protocol version 4 (IPv4) addressing NetworkType
protocol.

Dual-stack mode to specify that


resources can communicate with
the DB instance over IPv4, Internet
Protocol version 6 (IPv6), or both.
Use dual-stack mode if you have any
resources that must communicate
with your DB instance over the IPv6
addressing protocol. Also, make
sure that you associate an IPv6 CIDR
block with all subnets in the DB
subnet group that you specify.

For more information, see Amazon


RDS IP addressing (p. 2690).

Option group An option group for your DB CLI option: All


instance. You can choose the default
option group or you can create a --option-group-name
custom option group.
RDS API parameter:
For more information, see Working
with option groups (p. 331). OptionGroupName

319
Amazon Relational Database Service User Guide
Available settings

Console setting Setting description CLI option and RDS API parameter Supported
DB engines

Performance Enable Performance Insights CLI options: All


Insights to monitor your DB instance
load so that you can analyze --enable-performance-insights
and troubleshoot your database
performance. --no-enable-performance-
insights
Choose a retention period to
determine how much Performance --performance-insights-
Insights data history to keep. The retention-period
retention setting in the free tier
is Default (7 days). To retain your --performance-insights-kms-
performance data for longer, specify key-id
1–24 months. For more information
RDS API parameters:
about retention periods, see Pricing
and data retention for Performance EnablePerformanceInsights
Insights (p. 726).
PerformanceInsightsRetentionPeriod
Choose a KMS key to use to protect
the key used to encrypt this PerformanceInsightsKMSKeyId
database volume. Choose from the
KMS keys in your account, or enter
the key from a different account.

For more information, see


Monitoring DB load with
Performance Insights on Amazon
RDS (p. 720).

Provisioned The Provisioned IOPS (I/O CLI option: All


IOPS operations per second) value for
the DB instance. This setting is --iops
available only if you choose one of
the following for Storage type: RDS API parameter:

• General purpose SSD (gp3) Iops


• Provisioned IOPS SSD (io1)

For more information, see Amazon


RDS DB instance storage (p. 101).

320
Amazon Relational Database Service User Guide
Available settings

Console setting Setting description CLI option and RDS API parameter Supported
DB engines

Public access Yes to give the DB instance a CLI option: All


public IP address, meaning that it's
accessible outside the VPC. To be --publicly-accessible
publicly accessible, the DB instance
also has to be in a public subnet in --no-publicly-accessible
the VPC.
RDS API parameter:
No to make the DB instance
PubliclyAccessible
accessible only from inside the VPC.

For more information, see Hiding


a DB instance in a VPC from the
internet (p. 2695).

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. In addition, other
requirements must be met. For more
information, see Can't connect to
Amazon RDS DB instance (p. 2727).

If your DB instance isn't publicly


accessible, use an AWS Site-to-Site
VPN connection or an AWS Direct
Connect connection to access it
from a private network. For more
information, see Internetwork traffic
privacy (p. 2605).

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

For more information, see Using


Amazon RDS Proxy (p. 1199).

321
Amazon Relational Database Service User Guide
Available settings

Console setting Setting description CLI option and RDS API parameter Supported
DB engines

Storage Enable storage autoscaling CLI option: All


autoscaling to enable Amazon RDS to
automatically increase storage when --max-allocated-storage
needed to avoid having your DB
instance run out of storage space. RDS API parameter:

Use Maximum storage threshold to MaxAllocatedStorage


set the upper limit for Amazon RDS
to automatically increase storage
for your DB instance. The default is
1,000 GiB.

For more information, see Managing


capacity automatically with Amazon
RDS storage autoscaling (p. 480).

Storage The storage throughput value for CLI option: All


throughput the DB instance. This setting is
available only if you choose General --storage-throughput
purpose SSD (gp3) for Storage
type. RDS API parameter:

For more information, see Amazon StorageThroughput


RDS DB instance storage (p. 101).

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.

If you choose Provisioned IOPS SSD


(io1), enter the Provisioned IOPS
value.

For more information, see Amazon


RDS storage types (p. 101).

Subnet group A DB subnet group to associate with CLI option: All


this DB instance.
--db-subnet-group-name
For more information, see Working
with DB subnet groups (p. 2689). RDS API parameter:

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.

For more information, see


Amazon VPC VPCs and Amazon
RDS (p. 2688).

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

Creating Amazon RDS resources with AWS


CloudFormation
Amazon RDS is integrated with AWS CloudFormation, a service that helps you to model and set up your
AWS resources so that you can spend less time creating and managing your resources and infrastructure.
You create a template that describes all the AWS resources that you want (such as DB instances and DB
parameter groups), and AWS CloudFormation provisions and configures those resources for you.

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 and AWS CloudFormation templates


To provision and configure resources for RDS and related services, you must understand AWS
CloudFormation templates. Templates are formatted text files in JSON or YAML. These templates
describe the resources that you want to provision in your AWS CloudFormation stacks. If you're
unfamiliar with JSON or YAML, you can use AWS CloudFormation Designer to help you get started with
AWS CloudFormation templates. For more information, see What is AWS CloudFormation Designer? in
the AWS CloudFormation User Guide.

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.

Learn more about AWS CloudFormation


To learn more about AWS CloudFormation, see the following resources:

• 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

Connecting to an Amazon RDS DB instance


Before you can connect to a DB instance, you must create the DB instance. For information, see Creating
an Amazon RDS DB instance (p. 300). After Amazon RDS provisions your DB instance, use any standard
client application or utility for your DB engine to connect to the DB instance. In the connection string,
specify the DNS address from the DB instance endpoint as the host parameter. Also, specify the port
number from the DB instance endpoint as the port parameter.

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)

Finding the connection information for an Amazon


RDS DB instance
The connection information for a DB instance includes its endpoint, port, and a valid database user,
such as the master user. For example, for a MySQL DB instance, suppose that the endpoint value is
mydb.123456789012.us-east-1.rds.amazonaws.com. In this case, the port value is 3306, and the
database user is admin. Given this information, you specify the following values in a connection string:

• For host or host name or DNS name, specify mydb.123456789012.us-


east-1.rds.amazonaws.com.
• For port, specify 3306.
• For user, specify admin.

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 Linux, macOS, or Unix:

aws rds describe-db-instances \


--query "*[].[DBInstanceIdentifier,Endpoint.Address,Endpoint.Port,MasterUsername]"

For Windows:

aws rds describe-db-instances ^


--query "*[].[DBInstanceIdentifier,Endpoint.Address,Endpoint.Port,MasterUsername]"

Your output should be similar to the following.

[
[
"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.

Database authentication options


Amazon RDS supports the following ways to authenticate database users:

• 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).

Scenarios for accessing a DB instance in a VPC


Using Amazon Virtual Private Cloud (Amazon VPC), you can launch AWS resources, such as Amazon
RDS DB instances, into a virtual private cloud (VPC). When you use Amazon VPC, you have control over
your virtual networking environment. You can choose your own IP address range, create subnets, and
configure routing and access control lists.

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).

Connecting to a DB instance that is running a specific


DB engine
For information about connecting to a DB instance that is running a specific DB engine, follow the
instructions for your DB engine:

• Connecting to a DB instance running the MariaDB database engine (p. 1269)

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)

Managing connections with RDS Proxy


You can also use Amazon RDS Proxy to manage connections to RDS for MariaDB, RDS for Microsoft SQL
Server, RDS for MySQL, and RDS for PostgreSQL DB instances. RDS Proxy allows applications to pool
and share database connections to improve scalability. For more information, see Using Amazon RDS
Proxy (p. 1199).

330
Amazon Relational Database Service User Guide
Working with option groups

Working with option groups


Some DB engines offer additional features that make it easier to manage data and databases, and to
provide additional security for your database. Amazon RDS uses option groups to enable and configure
these features. An option group can specify features, called options, that are available for a particular
Amazon RDS DB instance. Options can have settings that specify how the option works. When you
associate a DB instance with an option group, the specified options and option settings are enabled for
that DB instance.

Amazon RDS supports options for the following database engines:

Database engine Relevant documentation

MariaDB Options for MariaDB database engine (p. 1334)

Microsoft SQL Server Options for the Microsoft SQL Server database engine (p. 1514)

MySQL Options for MySQL DB instances (p. 1732)

Oracle Adding options to Oracle DB instances (p. 1990)

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).

Option groups overview


Amazon RDS provides an empty default option group for each new DB instance. You can't modify or
delete this default option group, but any new option group that you create derives its settings from the
default option group. To apply an option to a DB instance, you must do the following:

1. Create a new option group, or copy or modify an existing option group.


2. Add one or more options to the option group.
3. Associate the option group with the DB instance.

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.

Persistent and permanent options


Two types of options, persistent and permanent, require special consideration when you add them to an
option group.

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:

• Assign the default option group to the DB instance.


• Assign an option group that is linked to that VPC.
• Create a new option group and assign it to the DB instance.

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.

Mutually exclusive options


Some options are mutually exclusive. You can use one or the other, but not both at the same time. The
following options are mutually exclusive:

• 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).

Creating an option group


You can create a new option group that derives its settings from the default option group. You then add
one or more options to the new option group. Or, if you already have an existing option group, you can
copy that option group with all of its options to a new option group. For more information, see Copying
an option group (p. 334).

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.

To create a new option group by using the 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 Linux, macOS, or Unix:

aws rds create-option-group \


--option-group-name testoptiongroup \
--engine-name oracle-ee \
--major-engine-version 12.1 \
--option-group-description "Test option group"

For Windows:

333
Amazon Relational Database Service User Guide
Copying an option group

aws rds create-option-group ^


--option-group-name testoptiongroup ^
--engine-name oracle-ee ^
--major-engine-version 12.1 ^
--option-group-description "Test option group"

RDS API
To create an option group, call the Amazon RDS API CreateOptionGroup operation. Include the
following parameters:

• OptionGroupName
• EngineName
• MajorEngineVersion
• OptionGroupDescription

Copying an option group


You can use the AWS CLI or the Amazon RDS API copy an option group. Copying an option group can
be convenient. An example is when you have an existing option group and want to include most of its
custom parameters and values in a new option group. You can also make a copy of an option group that
you use in production and then modify the copy to test other option settings.
Note
Currently, you can't copy an option group to a different AWS Region.

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 Linux, macOS, or Unix:

aws rds copy-option-group \


--source-option-group-identifier my-option-group \
--target-option-group-identifier new-option-group \
--target-option-group-description "My new option group"

For Windows:

aws rds copy-option-group ^


--source-option-group-identifier my-option-group ^
--target-option-group-identifier new-option-group ^
--target-option-group-description "My new option group"

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

Adding an option to an option group


You can add an option to an existing option group. After you have added the options you want, you
can then associate the option group with a DB instance so that the options become available on the DB
instance. For information about associating an option group with a DB instance, see the documentation
for your specific DB engine listed at Working with option groups (p. 331).

Option group changes must be applied immediately in two cases:

• 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.

To add an option to an option group by using the 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 that you want to modify, and then choose Add option.

335
Amazon Relational Database Service User Guide
Adding an option to an option group

4. In the Add option window, do the following:

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.

For Linux, macOS, or Unix:

aws rds add-option-to-option-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:

aws rds add-option-to-option-group ^


--option-group-name testoptiongroup ^
--options OptionName=OEM,Port=5500,DBSecurityGroupMemberships=default ^
--apply-immediately

Command output is similar to the following:

OPTIONGROUP False oracle-ee 12.1 arn:aws:rds:us-east-1:1234567890:og:testoptiongroup


Test Option Group testoptiongroup default
OPTIONS Oracle 12c EM Express OEM False False 5500
DBSECURITYGROUPMEMBERSHIPS default authorized

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 Linux, macOS, or Unix:

aws rds add-option-to-option-group \


--option-group-name testoptiongroup \
--options OptionName=OEM,Port=5500,VpcSecurityGroupMemberships="sg-test1,sg-test2" \
--apply-immediately

For Windows:

aws rds add-option-to-option-group ^


--option-group-name testoptiongroup ^
--options OptionName=OEM,Port=5500,VpcSecurityGroupMemberships="sg-test1,sg-test2" ^
--apply-immediately

Command output is similar to the following:

OPTIONGROUP False oracle-ee 12.1 arn:aws:rds:us-east-1:1234567890:og:testoptiongroup


Test Option Group testoptiongroup vpc-test
OPTIONS Oracle 12c EM Express OEM False False 5500
VPCSECURITYGROUPMEMBERSHIPS active sg-test1
VPCSECURITYGROUPMEMBERSHIPS active sg-test2

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 Linux, macOS, or Unix:

aws rds add-option-to-option-group \


--option-group-name testoptiongroup \
--options '[{"OptionSettings":[{"Name":"SQLNET.ENCRYPTION_SERVER","Value":"REQUIRED"},
{"Name":"SQLNET.ENCRYPTION_TYPES_SERVER","Value":"AES256,AES192,DES"}],"OptionName":"NATIVE_NETWORK_ENC
\
--apply-immediately

For Windows:

aws rds add-option-to-option-group ^


--option-group-name testoptiongroup ^
--options "OptionSettings"=[{"Name"="SQLNET.ENCRYPTION_SERVER","Value"="REQUIRED"},
{"Name"="SQLNET.ENCRYPTION_TYPES_SERVER","Value"="AES256\,AES192\,DES"}],"OptionName"="NATIVE_NETWORK_E
^
--apply-immediately

Command output is similar to the following:

OPTIONGROUP False oracle-ee 12.1 arn:aws:rds:us-east-1:1234567890:og:testoptiongroup


Test Option Group testoptiongroup
OPTIONS Oracle Advanced Security - Native Network Encryption NATIVE_NETWORK_ENCRYPTION
False False
OPTIONSETTINGS
RC4_256,AES256,AES192,3DES168,RC4_128,AES128,3DES112,RC4_56,DES,RC4_40,DES40
STATIC STRING
RC4_256,AES256,AES192,3DES168,RC4_128,AES128,3DES112,RC4_56,DES,RC4_40,DES40 Specifies
list of encryption algorithms in order of intended use
True True SQLNET.ENCRYPTION_TYPES_SERVER AES256,AES192,DES
OPTIONSETTINGS ACCEPTED,REJECTED,REQUESTED,REQUIRED STATIC STRING REQUESTED
Specifies the desired encryption behavior False True SQLNET.ENCRYPTION_SERVER
REQUIRED
OPTIONSETTINGS SHA1,MD5 STATIC STRING SHA1,MD5 Specifies list of checksumming
algorithms in order of intended use True True SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER
SHA1,MD5

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

Listing the options and option settings for an option


group
You can list all the options and option settings for an option group.

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.

To list 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.

aws rds describe-option-groups

Example

The following example lists the options and option settings for an option group named
testoptiongroup.

aws rds describe-option-groups --option-group-name 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.

Modifying an option setting


After you have added an option that has modifiable option settings, you can modify the settings at any
time. If you change options or option settings in an option group, those changes are applied to all DB
instances that are associated with that option group. For more information on what settings are available
for the various options, see the documentation for your engine in Working with option groups (p. 331).

Option group changes must be applied immediately in two cases:

• 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.

To modify an option setting by using the 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. 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 Linux, macOS, or Unix:

aws rds add-option-to-option-group \


--option-group-name testoptiongroup \
--options OptionName=OEM,Port=5432,DBSecurityGroupMemberships=default \
--apply-immediately

For Windows:

aws rds add-option-to-option-group ^


--option-group-name testoptiongroup ^
--options OptionName=OEM,Port=5432,DBSecurityGroupMemberships=default ^
--apply-immediately

341
Amazon Relational Database Service User Guide
Modifying an option setting

Command output is similar to the following:

OPTIONGROUP False oracle-ee 12.1 arn:aws:rds:us-east-1:1234567890:og:testoptiongroup


Test Option Group testoptiongroup
OPTIONS Oracle 12c EM Express OEM False False 5432
DBSECURITYGROUPMEMBERSHIPS default authorized

Example

The following example modifies the Oracle option NATIVE_NETWORK_ENCRYPTION and changes the
option settings.

For Linux, macOS, or Unix:

aws rds add-option-to-option-group \


--option-group-name testoptiongroup \
--options '[{"OptionSettings":[{"Name":"SQLNET.ENCRYPTION_SERVER","Value":"REQUIRED"},
{"Name":"SQLNET.ENCRYPTION_TYPES_SERVER","Value":"AES256,AES192,DES,RC4_256"}],"OptionName":"NATIVE_NET
\
--apply-immediately

For Windows:

aws rds add-option-to-option-group ^


--option-group-name testoptiongroup ^
--options "OptionSettings"=[{"Name"="SQLNET.ENCRYPTION_SERVER","Value"="REQUIRED"},
{"Name"="SQLNET.ENCRYPTION_TYPES_SERVER","Value"="AES256\,AES192\,DES
\,RC4_256"}],"OptionName"="NATIVE_NETWORK_ENCRYPTION" ^
--apply-immediately

Command output is similar to the following:

OPTIONGROUP False oracle-ee 12.1 arn:aws:rds:us-east-1:1234567890:og:testoptiongroup


Test Option Group testoptiongroup
OPTIONS Oracle Advanced Security - Native Network Encryption NATIVE_NETWORK_ENCRYPTION
False False
OPTIONSETTINGS
RC4_256,AES256,AES192,3DES168,RC4_128,AES128,3DES112,RC4_56,DES,RC4_40,DES40 STATIC
STRING
RC4_256,AES256,AES192,3DES168,RC4_128,AES128,3DES112,RC4_56,DES,RC4_40,DES40
Specifies list of encryption algorithms in order of intended use
True True SQLNET.ENCRYPTION_TYPES_SERVER AES256,AES192,DES,RC4_256
OPTIONSETTINGS ACCEPTED,REJECTED,REQUESTED,REQUIRED STATIC STRING REQUESTED
Specifies the desired encryption behavior False True SQLNET.ENCRYPTION_SERVER
REQUIRED
OPTIONSETTINGS SHA1,MD5 STATIC STRING SHA1,MD5 Specifies list of
checksumming algorithms in order of intended use True True
SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER SHA1,MD5
OPTIONSETTINGS ACCEPTED,REJECTED,REQUESTED,REQUIRED STATIC STRING
REQUESTED Specifies the desired data integrity behavior False True
SQLNET.CRYPTO_CHECKSUM_SERVER REQUESTED

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.

Removing an option from an option group


Some options can be removed from an option group, and some cannot. A persistent option cannot be
removed from an option group until all DB instances associated with that option group are disassociated.
A permanent option can never be removed from an option group. For more information about what
options are removable, see the documentation for your specific engine listed at Working with option
groups (p. 331).

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.

To remove an option from an option group by using the 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. 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 Linux, macOS, or Unix:

aws rds remove-option-from-option-group \


--option-group-name testoptiongroup \
--options OEM \
--apply-immediately

For Windows:

aws rds remove-option-from-option-group ^


--option-group-name testoptiongroup ^
--options OEM ^
--apply-immediately

Command output is similar to the following:

OPTIONGROUP testoptiongroup oracle-ee 12.1 Test option group

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.

Include the following parameters:

• OptionGroupName
• OptionsToRemove.OptionName

Deleting an option group


You can delete an option group that is not associated with any Amazon RDS resource. An option group
can be associated with a DB instance, a manual DB snapshot, or an automated DB snapshot.

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

An error occurred (InvalidOptionGroupStateFault) when calling the DeleteOptionGroup


operation: The option group 'optionGroupName' cannot be deleted because it is in use.

To find the Amazon RDS resources associated with 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.

To delete an option group by using the 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

The following example deletes an option group named testoptiongroup.

For Linux, macOS, or Unix:

aws rds delete-option-group \


--option-group-name testoptiongroup

345
Amazon Relational Database Service User Guide
Deleting an option group

For Windows:

aws rds delete-option-group ^


--option-group-name testoptiongroup

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

Working with parameter groups


Database parameters specify how the database is configured. For example, database parameters can
specify the amount of resources, such as memory, to allocate to a database.

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)

Overview of parameter groups


A DB parameter group acts as a container for engine configuration values that are applied to one or more
DB instances. DB cluster parameter groups apply to Multi-AZ DB clusters only. In a Multi-AZ DB cluster,
the settings in the DB cluster parameter group apply to all of the DB instances in the cluster. The default
DB parameter group for the DB engine and DB engine version is used for each DB instance in the DB
cluster.

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)

Default and custom parameter groups


If you create a DB instance without specifying a DB parameter group, the DB instance uses a default DB
parameter group. Likewise, if you create a Multi-AZ DB cluster without specifying a DB cluster parameter
group, the DB cluster uses a default DB cluster parameter group. Each default parameter group contains
database engine defaults and Amazon RDS system defaults based on the engine, compute class, and
allocated storage of the instance.

You can't modify the parameter settings of a default parameter group. Instead, you can do the following:

1. Create a new parameter group.


2. Change the settings of your desired parameters. Not all DB engine parameters in a parameter group
are eligible to be modified.
3. Modify your DB instance or DB cluster to use the custom parameter group. For information about
modifying a DB instance, see Modifying an Amazon RDS DB instance (p. 401). For information about
modifying a Multi-AZ DB clusters, see Modifying a Multi-AZ DB cluster (p. 539).

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.

Static and dynamic DB instance parameters


DB instance parameters are either static or dynamic. They differ as follows:

• 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.

Static and dynamic DB cluster parameters


DB cluster parameters are either static or dynamic. They differ as follows:

• 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.

Character set parameters


Before you create a DB instance or Multi-AZ DB cluster, set any parameters that relate to the character
set or collation of your database in your parameter group. Also do so before you create a database in it.
In this way, you ensure that the default database and new databases use the character set and collation
values that you specify. If you change character set or collation parameters, the parameter changes
aren't applied to existing databases.

For some DB engines, you can change character set or collation values for an existing database using the
ALTER DATABASE command, for example:

ALTER DATABASE database_name CHARACTER SET character_set_name COLLATE collation;

For more information about changing the character set or collation values for a database, check the
documentation for your DB engine.

Supported parameters and parameter values


To determine the supported parameters for your DB engine, view the parameters in the DB parameter
group and DB cluster parameter group used by the DB instance or DB cluster. For more information, see
Viewing parameter values for a DB parameter group (p. 359) and Viewing parameter values for a DB
cluster parameter group (p. 367).

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.

Working with DB parameter groups


DB instances use DB parameter groups. The following sections describe configuring and managing DB
instance parameter groups.

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

• Listing DB parameter groups (p. 358)


• Viewing parameter values for a DB parameter group (p. 359)

Creating a DB parameter group


You can create a new DB parameter group using the AWS Management Console, the AWS CLI, or the RDS
API.

The following limitations apply to the DB parameter group name:

• The name must be 1 to 255 letters, numbers, or hyphens.

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

To create a DB parameter 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 Parameter groups.
3. Choose Create parameter group.

The Create parameter group window appears.


4. In the Parameter group family list, select a DB parameter group family.
5. In the Type list, select DB Parameter Group.
6. In the Group name box, enter the name of the new DB parameter group.
7. In the Description box, enter a description for the new DB parameter group.
8. Choose Create.

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."

Include the following required parameters:

• --db-parameter-group-name
• --db-parameter-group-family
• --description

To list all of the available parameter group families, use the following command:

aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily"

Note
The output contains duplicates.

350
Amazon Relational Database Service User Guide
Working with DB parameter groups

Example
For Linux, macOS, or Unix:

aws rds create-db-parameter-group \


--db-parameter-group-name mydbparametergroup \
--db-parameter-group-family MySQL8.0 \
--description "My new parameter group"

For Windows:

aws rds create-db-parameter-group ^


--db-parameter-group-name mydbparametergroup ^
--db-parameter-group-family MySQL8.0 ^
--description "My new parameter group"

This command produces output similar to the following:

DBPARAMETERGROUP mydbparametergroup mysql8.0 My new parameter group

RDS API

To create a DB parameter group, use the RDS API CreateDBParameterGroup operation.

Include the following required parameters:

• DBParameterGroupName
• DBParameterGroupFamily
• Description

Associating a DB parameter group with a DB instance


You can create your own DB parameter groups with customized settings. You can associate a DB
parameter group with a DB instance using the AWS Management Console, the AWS CLI, or the RDS API.
You can do so when you create or modify a DB instance.

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

To associate a DB parameter group with 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 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

5. Choose Continue and check the summary of modifications.


6. (Optional) Choose Apply immediately to apply the changes immediately. Choosing this option
can cause an outage in some cases. For more information, see Using the Apply Immediately
setting (p. 402).
7. On the confirmation page, review your changes. If they are correct, choose Modify DB instance to
save your changes.

Or choose Back to edit your changes or Cancel to cancel your changes.

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:

aws rds modify-db-instance \


--db-instance-identifier database-1 \
--db-parameter-group-name mydbpg \
--apply-immediately

For Windows:

aws rds modify-db-instance ^


--db-instance-identifier database-1 ^
--db-parameter-group-name mydbpg ^
--apply-immediately

RDS API
To associate a DB parameter group with a DB instance, use the RDS API ModifyDBInstance operation
with the following parameters:

• DBInstanceName
• DBParameterGroupName

Modifying parameters in a DB parameter group


You can modify parameter values in a customer-created DB parameter group; you can't change the
parameter values in a default DB parameter group. Changes to parameters in a customer-created DB
parameter group are applied to all DB instances that are associated with the DB parameter group.

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

To modify a DB parameter 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 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.

You can't change values in a default parameter group.


6. Choose Save changes.

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

For Linux, macOS, or Unix:

aws rds modify-db-parameter-group \


--db-parameter-group-name mydbparametergroup \
--parameters "ParameterName=max_connections,ParameterValue=250,ApplyMethod=immediate" \

"ParameterName=max_allowed_packet,ParameterValue=1024,ApplyMethod=immediate"

For Windows:

aws rds modify-db-parameter-group ^


--db-parameter-group-name mydbparametergroup ^
--parameters "ParameterName=max_connections,ParameterValue=250,ApplyMethod=immediate" ^

"ParameterName=max_allowed_packet,ParameterValue=1024,ApplyMethod=immediate"

The command produces output like the following:

DBPARAMETERGROUP mydbparametergroup

RDS API

To modify a DB parameter group, use the RDS API ModifyDBParameterGroup operation with the
following required parameters:

• DBParameterGroupName
• Parameters

Resetting parameters in a DB parameter group to their default


values
You can reset parameter values in a customer-created DB parameter group to their default values.
Changes to parameters in a customer-created DB parameter group are applied to all DB instances that
are associated with the DB parameter group.

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

To reset parameters in a DB parameter group to their default values

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.

You can't reset values in a default parameter group.


6. Choose Reset and then confirm by choosing Reset parameters.

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:

aws rds reset-db-parameter-group \


--db-parameter-group-name mydbparametergroup \
--reset-all-parameters

For Windows:

aws rds reset-db-parameter-group ^


--db-parameter-group-name mydbparametergroup ^
--reset-all-parameters

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:

aws rds reset-db-parameter-group \


--db-parameter-group-name mydbparametergroup \
--parameters "ParameterName=max_connections,ApplyMethod=immediate" \
"ParameterName=max_allowed_packet,ApplyMethod=immediate"

For Windows:

aws rds reset-db-parameter-group ^


--db-parameter-group-name mydbparametergroup ^
--parameters "ParameterName=max_connections,ApplyMethod=immediate" ^
"ParameterName=max_allowed_packet,ApplyMethod=immediate"

The command produces output like the following:

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.

Copying a DB parameter group


You can copy custom DB parameter groups that you create. Copying a parameter group can be
convenient solution. An example is when you have created a DB parameter group and want to include
most of its custom parameters and values in a new DB parameter group. You can copy a DB 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

To copy a DB parameter 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 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:

aws rds copy-db-parameter-group \


--source-db-parameter-group-identifier mygroup1 \
--target-db-parameter-group-identifier mygroup2 \
--target-db-parameter-group-description "DB parameter group 2"

For Windows:

aws rds copy-db-parameter-group ^


--source-db-parameter-group-identifier mygroup1 ^
--target-db-parameter-group-identifier mygroup2 ^
--target-db-parameter-group-description "DB parameter group 2"

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

Listing DB parameter groups


You can list the DB parameter groups you've created for your AWS account.
Note
Default parameter groups are automatically created from a default parameter template when
you create a DB instance for a particular DB engine and version. These default parameter
groups contain preferred parameter settings and can't be modified. When you create a custom
parameter group, you can modify parameter settings.

Console

To list all DB parameter groups for an AWS account

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 parameter groups appear in a list.

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.

aws rds describe-db-parameter-groups

The command returns a response like the following:

DBPARAMETERGROUP default.mysql8.0 mysql8.0 Default parameter group for MySQL8.0


DBPARAMETERGROUP mydbparametergroup mysql8.0 My new parameter group

The following example describes the mydbparamgroup1 parameter group.

For Linux, macOS, or Unix:

aws rds describe-db-parameter-groups \


--db-parameter-group-name mydbparamgroup1

For Windows:

aws rds describe-db-parameter-groups ^


--db-parameter-group-name mydbparamgroup1

358
Amazon Relational Database Service User Guide
Working with DB parameter groups

The command returns a response like the following:

DBPARAMETERGROUP mydbparametergroup1 mysql8.0 My new parameter group

RDS API
To list all DB parameter groups for an AWS account, use the RDS API DescribeDBParameterGroups
operation.

Viewing parameter values for a DB parameter group


You can get a list of all parameters in a DB parameter group and their values.

Console

To view the parameter values for a DB parameter 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 Parameter groups.

The DB parameter groups appear in a list.


3. Choose the name of the parameter group to see its list of parameters.

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.

aws rds describe-db-parameters --db-parameter-group-name mydbparametergroup

The command returns a response like the following:

DBPARAMETER Parameter Name Parameter Value Source Data Type Apply


Type Is Modifiable
DBPARAMETER allow-suspicious-udfs engine-default boolean static
false
DBPARAMETER auto_increment_increment engine-default integer dynamic
true
DBPARAMETER auto_increment_offset engine-default integer dynamic
true
DBPARAMETER binlog_cache_size 32768 system integer dynamic
true
DBPARAMETER socket /tmp/mysql.sock system string static
false

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

Working with DB cluster parameter groups for Multi-


AZ DB clusters
Multi-AZ DB clusters use DB cluster parameter groups. The following sections describe configuring and
managing DB cluster parameter groups.

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)

Creating a DB cluster parameter group


You can create a new DB cluster parameter group using the AWS Management Console, the AWS CLI, or
the RDS API.

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.

The following limitations apply to the DB cluster parameter group name:

• The name must be 1 to 255 letters, numbers, or hyphens.

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

To create a DB cluster parameter 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 Parameter groups.
3. Choose Create parameter group.

The Create parameter group window appears.


4. In the Parameter group family list, select a DB parameter group family
5. In the Type list, select DB Cluster Parameter Group.
6. In the Group name box, enter the name of the new DB cluster parameter group.
7. In the Description box, enter a description for the new DB cluster parameter group.

360
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups

8. Choose Create.

AWS CLI

To create a DB cluster parameter group, use the AWS CLI create-db-cluster-parameter-group


command.

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."

Include the following required parameters:

• --db-cluster-parameter-group-name
• --db-parameter-group-family
• --description

To list all of the available parameter group families, use the following command:

aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily"

Note
The output contains duplicates.

Example

For Linux, macOS, or Unix:

aws rds create-db-cluster-parameter-group \


--db-cluster-parameter-group-name mydbclusterparametergroup \
--db-parameter-group-family mysql8.0 \
--description "My new cluster parameter group"

For Windows:

aws rds create-db-cluster-parameter-group ^


--db-cluster-parameter-group-name mydbclusterparametergroup ^
--db-parameter-group-family mysql8.0 ^
--description "My new cluster parameter group"

This command produces output similar to the following:

{
"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.

Include the following required parameters:

361
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups

• DBClusterParameterGroupName
• DBParameterGroupFamily
• Description

Modifying parameters in a DB cluster parameter group


You can modify parameter values in a customer-created DB cluster parameter group. You can't change
the parameter values in a default DB cluster parameter group. Changes to parameters in a customer-
created DB cluster parameter group are applied to all DB clusters that are associated with the DB cluster
parameter group.

Console

To modify a DB cluster parameter 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 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.

You can't change values in a default parameter group.


6. Choose Save changes.
7. Reboot the primary DB instance in the cluster to apply the changes to all of the DB instances in the
cluster.

AWS CLI

To modify a DB cluster parameter group, use the AWS CLI modify-db-cluster-parameter-group


command with the following required parameters:

• --db-cluster-parameter-group-name
• --parameters

The following example modifies the server_audit_logging and server_audit_logs_upload


values in the DB cluster parameter group named mydbclusterparametergroup.

Example

For Linux, macOS, or Unix:

aws rds modify-db-cluster-parameter-group \


--db-cluster-parameter-group-name mydbclusterparametergroup \
--parameters
"ParameterName=server_audit_logging,ParameterValue=1,ApplyMethod=immediate" \

"ParameterName=server_audit_logs_upload,ParameterValue=1,ApplyMethod=immediate"

For Windows:

aws rds modify-db-cluster-parameter-group ^

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"

The command produces output like the following:

DBCLUSTERPARAMETERGROUP mydbclusterparametergroup

RDS API

To modify a DB cluster parameter group, use the RDS API ModifyDBClusterParameterGroup


command with the following required parameters:

• DBClusterParameterGroupName
• Parameters

Resetting parameters in a DB cluster parameter group


You can reset parameters to their default values in a customer-created DB cluster parameter group.
Changes to parameters in a customer-created DB cluster parameter group are applied to all DB clusters
that are associated with the DB cluster parameter group.
Note
In a default DB cluster parameter group, parameters are always set to their default values.

Console

To reset parameters in a DB cluster parameter group to their default values

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.

You can't reset values in a default parameter group.


6. Choose Reset and then confirm by choosing Reset parameters.
7. Reboot the primary DB instance in the DB cluster to apply the changes to all of the DB instances in
the DB cluster.

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:

aws rds reset-db-cluster-parameter-group \


--db-cluster-parameter-group-name mydbparametergroup \
--reset-all-parameters

For Windows:

aws rds reset-db-cluster-parameter-group ^


--db-cluster-parameter-group-name mydbparametergroup ^
--reset-all-parameters

The following example resets the server_audit_logging and server_audit_logs_upload to their


default values in the DB cluster parameter group named mydbclusterparametergroup.

Example
For Linux, macOS, or Unix:

aws rds reset-db-cluster-parameter-group \


--db-cluster-parameter-group-name mydbclusterparametergroup \
--parameters "ParameterName=server_audit_logging,ApplyMethod=immediate" \
"ParameterName=server_audit_logs_upload,ApplyMethod=immediate"

For Windows:

aws rds reset-db-cluster-parameter-group ^


--db-cluster-parameter-group-name mydbclusterparametergroup ^
--parameters
"ParameterName=server_audit_logging,ParameterValue=1,ApplyMethod=immediate" ^

"ParameterName=server_audit_logs_upload,ParameterValue=1,ApplyMethod=immediate"

The command produces output like the following:

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.

Copying a DB cluster parameter group


You can copy custom DB cluster parameter groups that you create. Copying a parameter group is a
convenient solution when you have already created a DB cluster parameter group and you want to
include most of the custom parameters and values from that group in a new DB cluster parameter group.
You can copy a DB cluster parameter group by using the AWS CLI copy-db-cluster-parameter-group
command or the RDS API CopyDBClusterParameterGroup operation.

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

To copy a DB cluster parameter 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 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 cluster parameter group, use the AWS CLI copy-db-cluster-parameter-group


command with the following required parameters:

• --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 Linux, macOS, or Unix:

aws rds copy-db-cluster-parameter-group \


--source-db-cluster-parameter-group-identifier mygroup1 \
--target-db-cluster-parameter-group-identifier mygroup2 \
--target-db-cluster-parameter-group-description "DB parameter group 2"

For Windows:

aws rds copy-db-cluster-parameter-group ^


--source-db-cluster-parameter-group-identifier mygroup1 ^
--target-db-cluster-parameter-group-identifier mygroup2 ^
--target-db-cluster-parameter-group-description "DB parameter group 2"

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

Listing DB cluster parameter groups


You can list the DB cluster parameter groups you've created for your AWS account.
Note
Default parameter groups are automatically created from a default parameter template
when you create a DB cluster for a particular DB engine and version. These default parameter
groups contain preferred parameter settings and can't be modified. When you create a custom
parameter group, you can modify parameter settings.

Console

To list all DB cluster parameter groups for an AWS account

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.

aws rds describe-db-cluster-parameter-groups

The following example describes the mydbclusterparametergroup parameter group.

For Linux, macOS, or Unix:

aws rds describe-db-cluster-parameter-groups \


--db-cluster-parameter-group-name mydbclusterparametergroup

For Windows:

aws rds describe-db-cluster-parameter-groups ^


--db-cluster-parameter-group-name mydbclusterparametergroup

The command returns a response like the following:

{
"DBClusterParameterGroups": [
{
"DBClusterParameterGroupName": "mydbclusterparametergroup2",
"DBParameterGroupFamily": "mysql8.0",

366
Amazon Relational Database Service User Guide
Working with DB cluster parameter groups

"Description": "My new cluster parameter group",


"DBClusterParameterGroupArn": "arn:aws:rds:us-east-1:123456789012:cluster-
pg:mydbclusterparametergroup"
}
]
}

RDS API

To list all DB cluster parameter groups for an AWS account, use the RDS API
DescribeDBClusterParameterGroups action.

Viewing parameter values for a DB cluster parameter group


You can get a list of all parameters in a DB cluster parameter group and their values.

Console

To view the parameter values for a DB cluster parameter 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 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.

The command returns a response like the following:

aws rds describe-db-cluster-parameters --db-cluster-parameter-group-


name mydbclusterparametergroup

{
"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:

-- Show the value of a particular parameter


mysql$ SHOW VARIABLES LIKE '%parameter_name%';

-- Show the values of all parameters


mysql$ SHOW VARIABLES;

• PostgreSQL:

-- Show the value of a particular parameter


postgresql=> SHOW parameter_name;

-- Show the values of all parameters


postgresql=> SHOW ALL;

Comparing parameter groups


You can use the AWS Management Console to view the differences between two parameter groups.

To compare two parameter groups

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

4. For Parameter group actions, choose Compare.


Note
The specified parameter groups must both be DB parameter groups, or they both must
be DB cluster parameter groups. This is true even when the DB engine and version are the
same. For example, you can't compare an Aurora MySQL 8.0 DB parameter group and an
Aurora MySQL 8.0 DB cluster parameter group.
You can compare Aurora MySQL and RDS for MySQL DB parameter groups, even for
different versions, but you can't compare Aurora PostgreSQL and RDS for PostgreSQL DB
parameter groups.

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