Sub topic 2
Choosing a database engine
This chapter assumes you know basic relational concepts (tables, SQL, connections), have used the AWS CLI, and understand VPCs at a basic level. Here you will learn which engines RDS supports, how they differ in ways that affect operations, and how to pick one for a workload.
What an RDS engine is
An RDS engine is the database software that RDS installs and runs on your instance. RDS patches it, backs it up, and fails it over. Your application still talks to it with the engine's normal wire protocol and SQL dialect. You choose the engine once, when you create the instance with --engine. You cannot switch engines in place later. Moving to a different engine means a migration, such as exporting data or using AWS Database Migration Service (DMS).
Because the choice is hard to undo, make it deliberately and early.
Engines RDS supports
RDS offers these engine families:
| Engine | `--engine` value | License model | Typical reason to choose it |
|---|---|---|---|
| PostgreSQL | `postgres` | Open source | Rich SQL, extensions, JSON support, new projects |
| MySQL | `mysql` | Open source (GPL) | Wide ecosystem, common in web stacks |
| MariaDB | `mariadb` | Open source (GPL) | MySQL-compatible fork with its own features |
| Oracle Database | `oracle-ee`, `oracle-se2` | Commercial | Existing Oracle applications |
| Microsoft SQL Server | `sqlserver-ee`, `sqlserver-se`, `sqlserver-ex`, `sqlserver-web` | Commercial | Existing .NET and T-SQL applications |
| Db2 | `db2-se`, `db2-ae` | Commercial | Existing IBM Db2 applications |
Amazon Aurora is a separate AWS-built engine family with MySQL and PostgreSQL compatibility. It uses a different storage architecture, so it gets its own chapter later in this tutorial. Supported versions and regional availability change over time, so check the current list before you plan.
You can list the versions available in your Region from the CLI:
aws rds describe-db-engine-versions \
--engine postgres \
--query "DBEngineVersions[].EngineVersion" \
--output textHow to decide
Start from constraints you cannot change, then move to preferences.
- Existing application requirements. If a vendor product requires Oracle or SQL Server, that settles it. Applications written against T-SQL or PL/SQL are expensive to port.
- Licensing cost. Open source engines carry no license fee. Oracle and SQL Server do. RDS offers license-included pricing for most editions, and Oracle also supports bring your own license (BYOL). License cost often exceeds instance cost, so compare total price rather than hourly instance rates.
- Feature needs. PostgreSQL has a large extension ecosystem (for example PostGIS for geospatial data and pgvector for vector search). MySQL and MariaDB are simpler to operate and have strong read-scaling habits. Check that the extensions or plugins you need are on the RDS allow list for your version.
- Team skill. An engine your team already knows well is easier to tune, debug, and back up correctly.
- Greenfield default. With no constraints, PostgreSQL is a common choice. MySQL is equally reasonable when your team or tooling already centers on it.
The flow below summarizes the decision.
Differences that affect operations
Engines are not interchangeable once they run on RDS. Several behaviors vary and shape your design.
Features by engine
Not every RDS feature exists for every engine. Read replicas, for example, are available for MySQL, MariaDB, PostgreSQL, and Oracle (with the right edition), but SQL Server support depends on edition and uses different mechanisms. Multi-AZ implementation also differs by engine. Verify each feature you depend on in the RDS documentation for your engine and version before committing.
Parameter groups are engine and version specific
Configuration lives in parameter groups. Each group belongs to a family such as postgres16 or mysql8.0, and you cannot apply a group from one family to an instance in another. The parameter names also differ, so tuning knowledge does not transfer between engines. A later chapter covers parameter groups in detail.
Default ports and tools
Each engine listens on its own default port. Your security group rules must allow the right one.
| Engine | Default port |
|---|---|
| PostgreSQL | 5432 |
| MySQL, MariaDB | 3306 |
| Oracle | 1521 |
| SQL Server | 1433 |
| Db2 | 50000 |
Access limits
RDS does not give you operating system access, and the superuser you receive is restricted. In PostgreSQL the master user gets the rds_superuser role, not a true superuser. In MySQL it gets broad privileges but not SUPER in all cases. Features that need file system access, custom binaries, or untrusted languages may be unavailable. If your workload needs these, consider running the database yourself on EC2, or look at RDS Custom for Oracle and SQL Server, which gives limited host access at the cost of more responsibility.
Versions and the support lifecycle
Every engine version has an end-of-support date. When a major version reaches it, RDS upgrades your instance automatically, even if you have not planned for it. For some engines, running past the community end of life is available through paid Extended Support, which adds a recurring per-vCPU charge. Choose a current, supported major version when you create an instance, and read the lifecycle schedule for your engine.
A minor version, such as 16.4 to 16.6, brings bug and security fixes and is usually safe to adopt. A major version, such as 15 to 16, can change behavior and needs testing. Maintenance and upgrade handling gets its own chapter, but the point matters now: a newer version at creation means a longer runway before a forced upgrade.
Checking your choice
Before you provision, answer these questions and write the answers down:
- Which engine and major version will you use, and why?
- Does it have every extension, plugin, or feature the application needs?
- What license cost applies?
- Which features (read replicas, Multi-AZ, encryption) does this engine support in your Region?
- What is the exit plan if you must change engines?
Common errors
- Choosing by habit without checking extensions. An extension you rely on may be missing on RDS. Test
CREATE EXTENSIONon a trial instance. - Ignoring license cost. A small Oracle or SQL Server instance can cost far more than the same size PostgreSQL instance once licensing is included.
- Picking an old version. An older major version nears end of support sooner and may trigger Extended Support charges.
- Using the wrong parameter group family. The create call fails or the group cannot be attached if the family does not match the engine version.
- Opening the wrong port. The security group allows 5432 but the engine is MySQL on 3306, so connections time out.
Exercise
A team runs a vendor application that requires Microsoft SQL Server. They also want the lowest ongoing license cost. Which engine do you pick, and what can you do to reduce cost within that constraint?
Show answer
Pick a SQL Server engine, because the application requires it and engines cannot be swapped later. To reduce cost, choose the smallest edition that meets the feature needs (for example Standard rather than Enterprise, or Web or Express where the license terms and size limits allow), and right-size the instance class. Switching to PostgreSQL would remove the license fee but is not possible without porting the application.
Exercise
You created a MySQL 8.0 instance and now realize your application needs PostgreSQL-specific features. Can you modify the instance to change the engine? What are your options?
Show answer
No. The engine cannot be changed on an existing instance. You must create a new PostgreSQL instance and migrate the data, for example by exporting and importing it or by using AWS Database Migration Service, which can also convert schemas with the AWS Schema Conversion Tool. Then you switch the application over and delete the old instance.