Skip to content

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

fix: EC2 DescribeRouteTables filter by association ID, fixes Terraform VPC module timeout (#110)

Nahuel Nucerac602caa3ab94
diff --git a/README.md b/README.md
index 1414a69e..0f15c5ae 100644
--- a/README.md
+++ b/README.md
@@ -639,6 +639,22 @@ config:
# ... etc
```
+### Amplify / CDK
+
+MiniStack supports Amplify Gen 2 and CDK deployments. The underlying services are fully emulated:
+
+- **Auth** — Cognito User Pools with JWKS/OIDC endpoints (`/.well-known/jwks.json`) for real JWT validation
+- **Data** — AppSync GraphQL queries/mutations execute against DynamoDB resolvers (create/get/list/update/delete)
+- **Storage** — S3
+- **Functions** — Lambda (Python + Node.js)
+
+```bash
+export AWS_ENDPOINT_URL=http://localhost:4566
+npx ampx sandbox
+```
+
+> **Note:** AppSync supports Amplify-style CRUD operations. Advanced GraphQL features (fragments, unions, subscriptions) are not supported.
+
### Testcontainers (Java / Go / Python)
See [`Testcontainers/java-testcontainers`](Testcontainers/java-testcontainers), [`Testcontainers/go-testcontainers`](Testcontainers/go-testcontainers), and [`Testcontainers/python-testcontainers`](Testcontainers/python-testcontainers) for ready-to-run integration tests using Testcontainers with the AWS SDK v2.
diff --git a/ministack/services/ec2.py b/ministack/services/ec2.py
index e7d41a2a..4d1cb75f 100644
--- a/ministack/services/ec2.py
+++ b/ministack/services/ec2.py
@@ -794,11 +794,29 @@ def _delete_route_table(p):
def _describe_route_tables(p):
filter_ids = _parse_member_list(p, "RouteTableId")
- items = "".join(
- _rtb_fields_xml(rtb)
- for rtb in _route_tables.values()
- if not filter_ids or rtb["RouteTableId"] in filter_ids
- )
+ filters = _parse_filters(p)
+ results = []
+ for rtb in _route_tables.values():
+ if filter_ids and rtb["RouteTableId"] not in filter_ids:
+ continue
+ # Filter by association.route-table-association-id
+ assoc_filter = filters.get("association.route-table-association-id", [])
+ if assoc_filter:
+ assoc_ids = [a["RouteTableAssociationId"] for a in rtb.get("Associations", [])]
+ if not any(af in assoc_ids for af in assoc_filter):
+ continue
+ # Filter by association.subnet-id
+ subnet_filter = filters.get("association.subnet-id", [])
+ if subnet_filter:
+ subnet_ids = [a.get("SubnetId", "") for a in rtb.get("Associations", [])]
+ if not any(sf in subnet_ids for sf in subnet_filter):
+ continue
+ # Filter by vpc-id
+ vpc_filter = filters.get("vpc-id", [])
+ if vpc_filter and rtb.get("VpcId", "") not in vpc_filter:
+ continue
+ results.append(rtb)
+ items = "".join(_rtb_fields_xml(rtb) for rtb in results)
return _xml(200, "DescribeRouteTablesResponse",
f"<routeTableSet>{items}</routeTableSet>")
diff --git a/pyproject.toml b/pyproject.toml
index ba71ca90..1e1d6919 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "ministack"
-version = "1.1.33"
+version = "1.1.34"
description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"
readme = "README.md"
license = { file = "LICENSE" }