Skip to content

Ministack: Free, open-source local AWS emulator - 60+ services, Terraform compatible, real databases. Free forever. MIT licensed.

feat(rds): add DescribePendingMaintenanceActions no-op surface (#625)

Jay Janssenf7ae620f0453
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9b040888..16c58dce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ Versioning follows [Semantic Versioning](https://semver.org/).
- **IAM AWS-managed policies (`arn:aws:iam::aws:policy/<Name>`)** — real AWS hosts these under a virtual `aws` account every customer can read; MiniStack used to key every policy by the caller's account so `GetPolicy(arn:aws:iam::aws:policy/AdministratorAccess)` returned `NoSuchEntity`. AWS-managed policies now live in a separate non-account-scoped store, pre-seeded with 20 of the most commonly referenced policies (`AdministratorAccess`, `PowerUserAccess`, `ReadOnlyAccess`, `SecurityAudit`, `AWSLambdaBasicExecutionRole`, `AmazonS3FullAccess`/`ReadOnlyAccess`, `AmazonEC2FullAccess`/`ReadOnlyAccess`, `AmazonSSMManagedInstanceCore`, `AmazonDynamoDBFullAccess`, `AWSLambdaVPCAccessExecutionRole`, and friends) carrying their canonical AWS documents verbatim. Unknown AWS-managed ARNs return `NoSuchEntity` by default so typos surface locally; opt in to permissive autovivify with `MINISTACK_AUTOCREATE_AWS_MANAGED=1`. `AttachmentCount` is tracked per-(session-account, arn) via an account-scoped sidecar, matching real AWS where the counter is per-account. `ListPolicies` respects `Scope=All`/`AWS`/`Local`; attach/detach work against any AWS-managed ARN; mutation operations (`CreatePolicy` into the `aws` namespace, `DeletePolicy`, `TagPolicy`, `UntagPolicy`, `CreatePolicyVersion`, `DeletePolicyVersion`) return `AccessDenied` / `InvalidInput` to match real AWS. Contributed by @spicykay.
- **Cost and Usage Reports (CUR)** — full 7-operation surface (`PutReportDefinition`, `DescribeReportDefinitions`, `ModifyReportDefinition`, `DeleteReportDefinition`, `TagResource`, `UntagResource`, `ListTagsForResource`). Report definitions persist; report file generation is not emulated (MiniStack doesn't track usage or compute costs), so this targets IaC validation — Terraform / CDK / Bash automation that manages `aws_cur_report_definition` resources can now plan and apply against MiniStack without hitting real AWS billing. Contributed by @staranto.
- **Lambda Ruby 4.0 runtime** — `ruby4.0` maps to `public.ecr.aws/lambda/ruby:4.0`, tracking the runtime AWS added in May 2026 (botocore 1.42.94).
+- **RDS `DescribePendingMaintenanceActions` no-op surface** — MiniStack now accepts the operation and returns an empty `PendingMaintenanceActions` list, including calls with a `ResourceIdentifier` and ignored `Filters`, `Marker`, or `MaxRecords`. This unblocks brownfield state capture tools that expect the RDS API surface but do not need modeled maintenance events yet. Contributed by @jayjanssen.
### Fixed
- **RDS `DescribeDBClusters` serialization — `DatabaseName`, `NetworkType`, `EngineLifecycleSupport`** — three independent shape bugs on the same code path. `DatabaseName` was stored as `""` and always emitted, so botocore parsed it as the empty string instead of `null`; the field is now stored as `None` when unset and only emitted when truthy, matching real-AWS XML elision. `NetworkType` and `EngineLifecycleSupport` were never stored or serialized; they're now accepted from the request and emit with the AWS-documented defaults (`IPV4` and `open-source-rds-extended-support`). Surfaced by brownfield-import diffing against a real-AWS captured Aurora cluster. Contributed by @jayjanssen.
diff --git a/ministack/services/rds.py b/ministack/services/rds.py
index 463417d2..c7190e00 100644
--- a/ministack/services/rds.py
+++ b/ministack/services/rds.py
@@ -17,6 +17,7 @@ Supports: CreateDBInstance, DeleteDBInstance, DescribeDBInstances, ModifyDBInsta
CreateDBInstanceReadReplica (stub), RestoreDBInstanceFromDBSnapshot (stub),
ListTagsForResource, AddTagsToResource, RemoveTagsFromResource,
DescribeDBEngineVersions, DescribeOrderableDBInstanceOptions,
+ DescribePendingMaintenanceActions,
CreateGlobalCluster, DescribeGlobalClusters, DeleteGlobalCluster,
RemoveFromGlobalCluster, ModifyGlobalCluster.
@@ -1759,6 +1760,15 @@ def _describe_option_group_options(p):
"<DescribeOptionGroupOptionsResult><OptionGroupOptions/></DescribeOptionGroupOptionsResult>")
+# ---------------------------------------------------------------------------
+# Maintenance actions
+# ---------------------------------------------------------------------------
+
+def _describe_pending_maintenance_actions(p):
+ return _xml(200, "DescribePendingMaintenanceActionsResponse",
+ "<DescribePendingMaintenanceActionsResult><PendingMaintenanceActions/></DescribePendingMaintenanceActionsResult>")
+
+
# ---------------------------------------------------------------------------
# Tags
# ---------------------------------------------------------------------------
@@ -2722,6 +2732,7 @@ _ACTION_MAP = {
"RemoveTagsFromResource": _remove_tags,
"DescribeDBEngineVersions": _describe_engine_versions,
"DescribeOrderableDBInstanceOptions": _describe_orderable_options,
+ "DescribePendingMaintenanceActions": _describe_pending_maintenance_actions,
"CreateGlobalCluster": _create_global_cluster,
"DescribeGlobalClusters": _describe_global_clusters,
"DeleteGlobalCluster": _delete_global_cluster,
diff --git a/tests/test_rds.py b/tests/test_rds.py
index dbcb6f5e..ef4f2012 100644
--- a/tests/test_rds.py
+++ b/tests/test_rds.py
@@ -182,6 +182,30 @@ def test_rds_create_instance_default_preferred_maintenance_window(rds):
inst = resp["DBInstances"][0]
assert inst["PreferredMaintenanceWindow"] == "sun:05:00-sun:06:00"
+def test_rds_describe_pending_maintenance_actions_noop(rds):
+ cid = f"pending-maint-{_uuid_mod.uuid4().hex[:10]}"
+ rds.create_db_cluster(
+ DBClusterIdentifier=cid,
+ Engine="aurora-postgresql",
+ MasterUsername="admin",
+ MasterUserPassword="password123",
+ )
+ cluster_arn = rds.describe_db_clusters(DBClusterIdentifier=cid)["DBClusters"][0]["DBClusterArn"]
+
+ resp = rds.describe_pending_maintenance_actions(ResourceIdentifier=cluster_arn)
+ assert resp["PendingMaintenanceActions"] == []
+
+ resp = rds.describe_pending_maintenance_actions()
+ assert resp["PendingMaintenanceActions"] == []
+
+ resp = rds.describe_pending_maintenance_actions(
+ ResourceIdentifier=cluster_arn,
+ Filters=[{"Name": "db-cluster-id", "Values": [cid]}],
+ Marker="ignored-marker",
+ MaxRecords=20,
+ )
+ assert resp["PendingMaintenanceActions"] == []
+
def test_rds_create_cluster_v2(rds):
resp = rds.create_db_cluster(
DBClusterIdentifier="rds-cc-v2",