RDS Data API (rds-data)
The Amazon RDS Data API is the HTTP SQL endpoint for Aurora: clients POST a SQL statement and receive rows back, without holding a persistent database connection. AWSim implements it as a separate service from RDS, backed by a real PostgreSQL so statements run with genuine PostgreSQL semantics rather than a simulated dialect.
Opt-in feature
Unlike the rest of AWSim, the Data API depends on Docker at runtime: it starts a real PostgreSQL container per cluster on demand. It is therefore compiled out of the default build and enabled with a Cargo feature:
cargo run -p awsim --features rds-dataWith the feature disabled (the default), AWSim stays fully offline and in-memory and the rds-data service is simply not registered.
Configuration
AWSIM_RDS_DATA_CONTAINER_RUNTIME: the container runtime executable. Defaults todocker. Podman is drop-in compatible for the commands used here (run,rm), so set this topodmanto use it instead.AWSIM_RDS_DATA_PG_IMAGE: the PostgreSQL image to run. Anypostgres:NNtag works (14 through 18), since the Data API only uses wire-protocol features that are stable across those releases. Defaults topostgres:16-alpine.AWSIM_RDS_DATA_PG_HOST: the host AWSim connects to in order to reach a container's published port. Defaults to127.0.0.1for the common case where AWSim runs directly on the host.
Using Podman
Set AWSIM_RDS_DATA_CONTAINER_RUNTIME=podman. The run -d --rm -e -p and rm -f commands AWSim issues are all Podman-compatible, and because AWSim shells out to the CLI rather than the Docker socket, Podman's different socket path does not matter. When AWSim itself runs in a rootless Podman container reaching the host, use host.containers.internal (Podman's equivalent of host.docker.internal) for AWSIM_RDS_DATA_PG_HOST.
Running AWSim itself inside Docker
When AWSim runs in a container and talks to the host's Docker socket (the Docker-out-of-Docker pattern, mounting /var/run/docker.sock), the PostgreSQL containers it starts are siblings on the host daemon, not nested. Their published ports live on the host, not on AWSim's own loopback. Set AWSIM_RDS_DATA_PG_HOST to a host the sibling is reachable through (for example host.docker.internal); AWSim then publishes the container port on all interfaces so the connection succeeds.
Operations
ExecuteStatementruns a single SQL statement- Input:
resourceArn,sql, optionalparameters,transactionId,includeResultMetadata - Returns:
numberOfRecordsUpdatedfor data-modifying statements, orrecords(andcolumnMetadatawhen requested) for row-returning statements
- Input:
BatchExecuteStatementruns one statement once per parameter set- Input:
resourceArn,sql, optionalparameterSets,transactionId - Returns:
updateResults
- Input:
BeginTransactionopens a transaction- Input:
resourceArn - Returns:
transactionId
- Input:
CommitTransaction/RollbackTransactionclose a transaction- Input:
transactionId - Returns:
transactionStatus
- Input:
Parameters
Named parameters use the :name syntax in the SQL and a parameters list of {name, value} entries, where value is a Data API field such as { "longValue": 1 } or { "stringValue": "abc" }. AWSim substitutes them as escaped SQL literals before execution; the ::type cast operator and string literals are left untouched.
Scope and limitations
- The Data API operates independently of the RDS control plane. It does not read the cluster's
HttpEndpointEnabledflag (that lives in the separaterdsservice), and it manages its own PostgreSQL containers keyed byresourceArn. - Each cluster maps to a single database inside its container; the request
databaseandschemafields are not used to switch databases. - Result values are mapped to typed fields where the column type is known (integers, floats, booleans, byte arrays) and to string values otherwise.