Skip to content

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 ​

bash
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-87654321

For a real database, start Gopherstack with --rds-engine=docker (or RDS_ENGINE=docker) and connect to the instance endpoint.

Supported operations ​

AreaOperations
Instancescreate, describe, modify, delete, start, stop, reboot, promote read replica, restore from snapshot or point in time, read replicas, automated backups
Clusterscreate, describe, modify, delete, start, stop, failover, restore from snapshot or point in time, backtracks, cluster endpoints, global clusters, read-replica clusters
SnapshotsDB and cluster snapshots (create, copy, delete, share attributes), automated backups
Parameter, option and subnet groupsDB and cluster parameter groups, option groups, subnet groups, DB security groups
ProxiesDB proxies, endpoints, target groups, targets
Blue/greencreate, describe, switchover, delete
Eventsevent categories, events, event subscriptions
Roles and integrationsassociated IAM roles, zero-ETL integrations, export tasks, activity streams
Reserved instancesofferings, purchase, describe
Reference dataengine versions, orderable options, default parameters, valid modifications, certificates, account attributes, pending maintenance actions, log files
OtherData API (HTTP endpoint), shard groups, tenant databases, recommendations, tags

Configuration ​

EnvDefaultPurpose
RDS_ENGINE (--rds-engine)stubstub for metadata only, docker for real database containers
RDS_SQLSERVER_ENGINEoffWith docker, run sqlserver-* instances as SQL Server containers
RDS_POSTGRES_EXTENSIONSonfalse runs stock postgres:<major> instead of the PostGIS and pgvector image
RDS_AUTO_PAUSE_DISABLEDoffDisable Aurora Serverless v2 auto-pause
RDS_AUTO_PAUSE_IDLE_SCALE1Multiplies SecondsUntilAutoPause (0.01 turns 300 s into 3 s)
RDS_AUTO_PAUSE_RESUME_DELAYnoneExtra 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 DBPortNumber changes run real engines. Snapshots and periodic restore points (every 5 minutes for units with BackupRetentionPeriod > 0) capture a logical dump.
  • SQL Server runs mcr.microsoft.com/mssql/server:<2017|2019|2022>-latest, chosen from the major in EngineVersion (14, 15 or 16; anything else, including 13, uses 2022). amd64 hosts only.
  • PostgreSQL units run postgis/postgis:<major>-3.5 with pgvector 0.8.6, so CREATE EXTENSION postgis and vector work.
  • 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.
  • CreateDBInstance accepts EngineVersion values 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). IncludePublic and IncludeShared have no effect.
  • MaxAllocatedStorage is stored but never autoscales. Every operation applies synchronously, so CertificateRotationRestart, SwitchoverTimeout and storage-operation progress fields describe windows that never exist.
  • GetPerformanceInsightsMetrics is kept as seeded functionality. It is not a real RDS operation (the real one is GetResourceMetrics on the pi client).

Parity & Coverage ​

MetricValue
PARITY entries audited52 (51 ok, 1 partial)
Feature families29 (28 ok, 1 partial)
Known gaps5
Structural gaps (can't be emulated)7
Deferred items0
Resource leaksfixed

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
OperationWireErrorsStatePersist
DeleteDBInstanceokokokok
DeleteDBClusterokokokok
StartActivityStreamokokokok
StopActivityStreamokokokok
ModifyActivityStreamokokokok
DescribeDBInstancesokokokok
CreateDBInstanceokokokok
ModifyDBInstanceokokokok
StartDBInstanceokokokok
StopDBInstanceokokokok
RebootDBInstanceokokokok
CreateDBInstanceReadReplicaokokokok
PromoteReadReplicaokokokok
CreateDBClusterokokokok
ModifyDBClusterokokokok
DescribeDBClustersokokokok
CreateDBSnapshotokokokok
CopyDBSnapshotokokfixedok
RestoreDBInstanceFromDBSnapshotokokfixedok
RestoreDBInstanceToPointInTimeokokokok
RestoreDBInstanceFromS3fixedokfixedn/a
CreateDBClusterSnapshotokokokok
RestoreDBClusterFromS3fixedokfixedn/a
CreateDBParameterGroupokokokok
ModifyDBParameterGroupokokokok
ResetDBParameterGroupokokokok
CreateDBSubnetGroupokokokok
CreateOptionGroupokokokok
CreateDBShardGroupokokokok
DeleteDBShardGroupokokokok
ModifyDBShardGroupokokokok
RebootDBShardGroupokokokok
DescribeDBShardGroupsokokokok
CreateIntegrationokokokok
DeleteIntegrationokokokok
ModifyIntegrationokokokok
DescribeIntegrationsokokokok
CreateCustomDBEngineVersionokokokok
DeleteCustomDBEngineVersionokokokok
ModifyCustomDBEngineVersionokokokok
CreateTenantDatabaseokokokok
DeleteTenantDatabaseokokokok
ModifyTenantDatabaseokokokok
DescribeTenantDatabasesokokokok
CreateDBSecurityGroupokokokok
AuthorizeDBSecurityGroupIngressokokokok
RevokeDBSecurityGroupIngressokokokok
ModifyCertificatesokokokok
ModifyDBRecommendationokokokok
CreateDBProxy/DeleteDBProxy/ModifyDBProxyokokokok
PurchaseReservedDBInstancesOfferingokokokok
DescribeServerlessV2PlatformVersionsokokpartialn/a

Audited Feature Families ​

Feature FamilyStatus
db_instance_lifecycleok
db_cluster_lifecycleok
serverless_v2_auto_pauseok
snapshots_manual_automatedok
parameter_groupsok
ApplyPendingMaintenanceAction—
subnet_groupsok
option_groupsok
read_replicasok
events_and_subscriptionsok
engine_versions_and_orderable_optionsok
tagsok
paginationok
describe_filtersok
global_clustersok
blue_green_deploymentsok
db_proxiesok
reserved_instancesok
performance_insightsok
error_codesok
leaksok
instance_iam_rolesok
cluster_iam_rolespartial
db_shard_groupsok
integrationsok
custom_db_engine_versionsok
tenant_databasesok
db_security_groupsok
activity_streamsok

Released under the MIT License.