RDS
Parity grade: A · SDK aws-sdk-go-v2/service/rds@v1.130.2 · last audited 2026-10-11 (68761ba3a)
Category: Database · View PARITY.md on GitHub · All Services
RDS and Aurora control plane. By default only metadata is tracked. With the Docker engine, MySQL, MariaDB and PostgreSQL instances run real database containers.
Quick start
export AWS_ENDPOINT_URL=http://localhost:8000
aws rds create-db-instance --db-instance-identifier my-db \
--db-instance-class db.t3.micro --engine mysql \
--master-username admin --master-user-password password \
--allocated-storage 20
aws rds describe-db-instances
aws rds create-db-snapshot --db-instance-identifier my-db --db-snapshot-identifier my-db-snap-1
aws rds create-db-subnet-group --db-subnet-group-name my-subnet-group \
--db-subnet-group-description "Test" \
--subnet-ids subnet-12345678 subnet-87654321For a real database, start Gopherstack with --rds-engine=docker (or RDS_ENGINE=docker) and connect to the instance endpoint.
Supported operations
| Area | Operations |
|---|---|
| Instances | create, describe, modify, delete, start, stop, reboot, promote read replica, restore from snapshot or point in time, read replicas, automated backups |
| Clusters | create, describe, modify, delete, start, stop, failover, restore from snapshot or point in time, backtracks, cluster endpoints, global clusters, read-replica clusters |
| Snapshots | DB and cluster snapshots (create, copy, delete, share attributes), automated backups |
| Parameter, option and subnet groups | DB and cluster parameter groups, option groups, subnet groups, DB security groups |
| Proxies | DB proxies, endpoints, target groups, targets |
| Blue/green | create, describe, switchover, delete |
| Events | event categories, events, event subscriptions |
| Roles and integrations | associated IAM roles, zero-ETL integrations, export tasks, activity streams |
| Reserved instances | offerings, purchase, describe |
| Reference data | engine versions, orderable options, default parameters, valid modifications, certificates, account attributes, pending maintenance actions, log files |
| Other | Data API (HTTP endpoint), shard groups, tenant databases, recommendations, tags |
Configuration
| Env | Default | Purpose |
|---|---|---|
RDS_ENGINE (--rds-engine) | stub | stub for metadata only, docker for real database containers |
RDS_SQLSERVER_ENGINE | off | With docker, run sqlserver-* instances as SQL Server containers |
RDS_POSTGRES_EXTENSIONS | on | false runs stock postgres:<major> instead of the PostGIS and pgvector image |
RDS_AUTO_PAUSE_DISABLED | off | Disable Aurora Serverless v2 auto-pause |
RDS_AUTO_PAUSE_IDLE_SCALE | 1 | Multiplies SecondsUntilAutoPause (0.01 turns 300 s into 3 s) |
RDS_AUTO_PAUSE_RESUME_DELAY | none | Extra time a resume takes |
With the DNS server enabled (--dns-addr :10053), instance hostnames are registered automatically and resolve to 127.0.0.1, or --dns-resolve-ip. See DNS setup.
Differences from AWS
IMPORTANT
Without --rds-engine=docker, no database runs. Endpoints are synthetic hostnames and nothing accepts connections.
- Docker engine: read replicas, snapshot and point-in-time restores, custom cluster endpoints and
DBPortNumberchanges run real engines. Snapshots and periodic restore points (every 5 minutes for units withBackupRetentionPeriod > 0) capture a logical dump. - SQL Server runs
mcr.microsoft.com/mssql/server:<2017|2019|2022>-latest, chosen from the major inEngineVersion(14, 15 or 16; anything else, including 13, uses 2022). amd64 hosts only. - PostgreSQL units run
postgis/postgis:<major>-3.5with pgvector 0.8.6, soCREATE EXTENSION postgisandvectorwork. - MySQL and MariaDB IAM database authentication proxies the handshake only. The session runs as the engine master login, so per-IAM-user privileges are not applied.
CreateDBInstanceacceptsEngineVersionvalues outside the small built-in catalog.- Snapshot sharing is account-aware only for snapshots created or copied by an explicit-account caller. Other resources are not account-scoped, and snapshot identifiers are global.
- No cross-region copy (
SourceRegion,PreSignedUrl).IncludePublicandIncludeSharedhave no effect. MaxAllocatedStorageis stored but never autoscales. Every operation applies synchronously, soCertificateRotationRestart,SwitchoverTimeoutand storage-operation progress fields describe windows that never exist.GetPerformanceInsightsMetricsis kept as seeded functionality. It is not a real RDS operation (the real one isGetResourceMetricson thepiclient).
Parity & Coverage
| Metric | Value |
|---|---|
| PARITY entries audited | 52 (51 ok, 1 partial) |
| Feature families | 29 (28 ok, 1 partial) |
| Known gaps | 5 |
| Structural gaps (can't be emulated) | 7 |
| Deferred items | 0 |
| Resource leaks | fixed |
Known Gaps
- Snapshot sharing is caller-aware only for snapshots created or copied by an explicit-account caller (DBSnapshot.OwnerAccountID, unset = visible to all as before); instances, clusters and other resources are not account-scoped, and snapshot identifiers stay global across accounts (gopherstack-tnqy.6).
- CreateDBInstance EngineVersion values outside the small built-in catalog are accepted: RDS publishes the per-engine version lists only as long documentation tables and via DescribeDBEngineVersions, with no machine-readable catalog to embed.
- AddRoleToDBCluster collision rule: API_AddRoleToDBCluster says DBClusterRoleAlreadyExists means 'the specified IAM role ARN is already associated with the specified DB cluster' (keyed on the ARN), while the emulator keys on (FeatureName, RoleArn) so one role can serve two features; AWS does not say whether the same role under a second FeatureName is rejected (gopherstack-1jkv).
- SQL Server on the docker engine (opt-in, RDS_SQLSERVER_ENGINE=docker with RDS_ENGINE=docker; off = sqlserver-* stay control-plane only): sqlserver-ee/se/ex/web/dev-ee instances run mcr.microsoft.com/mssql/server:<2017|2019|2022>-latest from EngineVersion major 14/15/16 (anything else, incl. 13/2016 which has no Linux image, falls back to 2022); amd64 hosts only (otherwise the instance goes failed with a FailureReason). ACCEPT_EULA=Y; MSSQL_PID is Express for sqlserver-ex and Developer for ee/se/web/dev-ee (full feature set, non-production licence, so editions are not feature-limited and no licence is bought). The container's sa password is internal (derived, complexity-safe); the master user is created as a login (CHECK_POLICY=OFF) in the sysadmin role, whereas the real RDS master is not sysadmin (it holds a narrower grant set), so master here can do more than on RDS. MasterUserPassword must be 8-128 chars (message modelled on RDS wording, not verified); DBName at create is refused with InvalidParameterCombination (RDS: not applicable for SQL Server; exact error text unverified); MasterUsername sa is refused. Endpoint is a TCP forwarder to 1433 (no IAM auth, no TLS termination: the server's own self-signed TLS passes through). Snapshots, restore, copies and restart persistence use native BACKUP DATABASE (COPY_ONLY) of every user database, the .bak read back via container exec as base64 (not a bind mount) and RESTORE ... WITH REPLACE into the new instance; restore points reuse that dump, deduped by the databases' log-end LSN (dedupe unverified against real idle servers). Open: read replicas are point-in-time copies, not replicating; PITR granularity is the restore-point interval and every point is a full backup; no SQL Server Agent, option groups (native backup to S3, SQLSERVER_AUDIT), Multi-AZ mirroring, TDE, Windows auth, CDC, linked servers or log-file download; ModifyDBInstance does not change edition/version; the docker test is gated by RDS_SQLSERVER_DOCKER_TEST=1 and the ~1.5GB image is not in the CI pre-pull list.
- PostgreSQL extensions on the docker engine (default on, RDS_POSTGRES_EXTENSIONS=false restores stock postgres:<major>): units run postgis/postgis:<major>-3.5 with pgvector 0.8.6 copied in from pgvector/pgvector (no single maintained image ships both; the vector files are extracted once per major by a one-shot container into a temp cache and bind-mounted), so CREATE EXTENSION postgis/vector works (neither is preinstalled, as on RDS; installed versions are the image's, not RDS's). aws_commons/aws_s3/aws_lambda are SQL extensions whose functions shell out (COPY ... PROGRAM, perl) to a token-authenticated listener the emulator binds only to the container bridge gateway (docker0/podman0 address on Linux, 127.0.0.1 on macOS/Windows or when no bridge is found; RDS_CALLOUT_BIND overrides the bind address; containers dial that address, or host.docker.internal on macOS/Windows; RDS_CALLOUT_HOST overrides the dialled address) which forwards to the emulator's S3 and Lambda over HTTP. Real: table_import_from_s3 (both signatures, with/without credentials; options as '(format csv)' or 'format csv'), query_export_to_s3 (both signatures; rows/files/bytes are measured, files_uploaded is always 1, no multi-part splitting, region/kms_key ignored), aws_lambda.invoke (json/jsonb payload, function name or aws_commons._lambda_function_arn_1; status_code, payload, executed_version, log_result as the emulator returns them; region ignored), create_s3_uri/create_aws_credentials/create_lambda_function_arn. A role for FeatureName s3Import/s3Export/Lambda (S3_INTEGRATION also matches s3*) must be associated via AddRoleToDBInstance/cluster roles, checked live on every call; supplied S3 credentials bypass the role check. Open: the role is only checked for presence (its policy is not evaluated and credentials are not validated); the no-role error texts are modelled on RDS wording, not verified against it; the listener serves any caller holding an instance token and the SQL functions run SECURITY DEFINER as the extension creator (a superuser in docker), so non-master database users with EXECUTE can read/write any emulator S3 object; Aurora PostgreSQL clusters share the image but cluster-level roles only gate the unit's own callouts; other extensions RDS offers (pg_cron, pglogical, ...) are not provided.
Structural Gaps
These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.
- MySQL/MariaDB IAM database authentication proxies the handshake only: the session runs as the engine master login (MySQL has no session-user switch, so per-IAM-user privileges are not applied), requires a client that negotiates CLIENT_DEPRECATE_EOF and TLS (clients offering another auth plugin are switched to mysql_clear_password), and MariaDB prepared-statement metadata caching is not negotiated. DbiResourceId equals the instance identifier, not AWS's db-XXXX form.
- With --rds-engine=docker, read replicas, snapshot and point-in-time restores, custom cluster endpoints and DBPortNumber changes run real engines. Snapshots and periodic restore points (every 5 minutes for units with BackupRetentionPeriod > 0, EngineConfig.RestorePointInterval) capture a logical dump through container exec (pg_dump, mysqldump/mariadb-dump of every non-system schema); a point-in-time restore with RestoreTime loads the closest point at or before it, validates the time against the reported [EarliestRestorableTime, LatestRestorableTime] (InvalidRestoreFault; PointInTimeRestoreNotEnabled without backups) and UseLatestRestorableTime dumps the live source. With --persist, snapshot dumps and restore points live under the data dir and relaunched units reload their last restore point. Read replicas replicate natively (pg_basebackup / GTID dump plus CHANGE REPLICATION SOURCE) over a per-source docker network when the runtime supports networks; after a restart the source relaunches from its last restore point and each replica is rebuilt from it, while a promoted replica returns as a primary from its own forced restore point. Runtimes without networks seed replicas from a one-off dump. A cluster is one container, so a custom cluster endpoint's host port relays to that one engine and only gates on whether the endpoint selects an available member; its Endpoint is reported as host:port because the wire shape has no port member. Non-Postgres/MySQL/MariaDB engines stay metadata-only.
- CopyDBClusterSnapshot/CreateDBCluster SourceRegion and PreSignedUrl: no cross-region copy.
- DBInstance.MaxAllocatedStorage is stored and echoed but never autoscales: no storage-usage model.
- DescribeDBClusterSnapshots/DescribeDBSnapshots IncludePublic/IncludeShared: single-account backend has no cross-account snapshots.
- ModifyDBInstance CertificateRotationRestart, SwitchoverBlueGreenDeployment SwitchoverTimeout and DBInstance StorageOperationPercentProgress/StorageOperationStatus describe async windows that never exist: every operation applies synchronously.
- GetPerformanceInsightsMetrics is not a real RDS or pi operation (real op: GetResourceMetrics on the pi client, not in go.mod); kept as seeded functionality, allowlisted by sdkcheck phantomAllowlist (gopherstack-vhw2).
Audited Operations
52 audited operations
| Operation | Wire | Errors | State | Persist |
|---|---|---|---|---|
DeleteDBInstance | ok | ok | ok | ok |
DeleteDBCluster | ok | ok | ok | ok |
StartActivityStream | ok | ok | ok | ok |
StopActivityStream | ok | ok | ok | ok |
ModifyActivityStream | ok | ok | ok | ok |
DescribeDBInstances | ok | ok | ok | ok |
CreateDBInstance | ok | ok | ok | ok |
ModifyDBInstance | ok | ok | ok | ok |
StartDBInstance | ok | ok | ok | ok |
StopDBInstance | ok | ok | ok | ok |
RebootDBInstance | ok | ok | ok | ok |
CreateDBInstanceReadReplica | ok | ok | ok | ok |
PromoteReadReplica | ok | ok | ok | ok |
CreateDBCluster | ok | ok | ok | ok |
ModifyDBCluster | ok | ok | ok | ok |
DescribeDBClusters | ok | ok | ok | ok |
CreateDBSnapshot | ok | ok | ok | ok |
CopyDBSnapshot | ok | ok | fixed | ok |
RestoreDBInstanceFromDBSnapshot | ok | ok | fixed | ok |
RestoreDBInstanceToPointInTime | ok | ok | ok | ok |
RestoreDBInstanceFromS3 | fixed | ok | fixed | n/a |
CreateDBClusterSnapshot | ok | ok | ok | ok |
RestoreDBClusterFromS3 | fixed | ok | fixed | n/a |
CreateDBParameterGroup | ok | ok | ok | ok |
ModifyDBParameterGroup | ok | ok | ok | ok |
ResetDBParameterGroup | ok | ok | ok | ok |
CreateDBSubnetGroup | ok | ok | ok | ok |
CreateOptionGroup | ok | ok | ok | ok |
CreateDBShardGroup | ok | ok | ok | ok |
DeleteDBShardGroup | ok | ok | ok | ok |
ModifyDBShardGroup | ok | ok | ok | ok |
RebootDBShardGroup | ok | ok | ok | ok |
DescribeDBShardGroups | ok | ok | ok | ok |
CreateIntegration | ok | ok | ok | ok |
DeleteIntegration | ok | ok | ok | ok |
ModifyIntegration | ok | ok | ok | ok |
DescribeIntegrations | ok | ok | ok | ok |
CreateCustomDBEngineVersion | ok | ok | ok | ok |
DeleteCustomDBEngineVersion | ok | ok | ok | ok |
ModifyCustomDBEngineVersion | ok | ok | ok | ok |
CreateTenantDatabase | ok | ok | ok | ok |
DeleteTenantDatabase | ok | ok | ok | ok |
ModifyTenantDatabase | ok | ok | ok | ok |
DescribeTenantDatabases | ok | ok | ok | ok |
CreateDBSecurityGroup | ok | ok | ok | ok |
AuthorizeDBSecurityGroupIngress | ok | ok | ok | ok |
RevokeDBSecurityGroupIngress | ok | ok | ok | ok |
ModifyCertificates | ok | ok | ok | ok |
ModifyDBRecommendation | ok | ok | ok | ok |
CreateDBProxy/DeleteDBProxy/ModifyDBProxy | ok | ok | ok | ok |
PurchaseReservedDBInstancesOffering | ok | ok | ok | ok |
DescribeServerlessV2PlatformVersions | ok | ok | partial | n/a |
Audited Feature Families
| Feature Family | Status |
|---|---|
db_instance_lifecycle | ok |
db_cluster_lifecycle | ok |
serverless_v2_auto_pause | ok |
snapshots_manual_automated | ok |
parameter_groups | ok |
ApplyPendingMaintenanceAction | — |
subnet_groups | ok |
option_groups | ok |
read_replicas | ok |
events_and_subscriptions | ok |
engine_versions_and_orderable_options | ok |
tags | ok |
pagination | ok |
describe_filters | ok |
global_clusters | ok |
blue_green_deployments | ok |
db_proxies | ok |
reserved_instances | ok |
performance_insights | ok |
error_codes | ok |
leaks | ok |
instance_iam_roles | ok |
cluster_iam_roles | partial |
db_shard_groups | ok |
integrations | ok |
custom_db_engine_versions | ok |
tenant_databases | ok |
db_security_groups | ok |
activity_streams | ok |
