Skip to content

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

release v1.3.15 (#483)

Nahuel Nucera1f06ed6eafe7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f9d9f734..e2066936 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,20 +6,22 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Versioning follows [Semantic Versioning](https://semver.org/).
---
-
-## [Unreleased]
+## [1.3.15] — 2026-04-26
### Added
-- **CloudFormation ApiGatewayV2 Integration + Route provisioners** — `AWS::ApiGatewayV2::Integration` and `AWS::ApiGatewayV2::Route` are now supported as CloudFormation resource types. This completes the API Gateway V2 CloudFormation surface alongside the existing `Api` and `Stage` provisioners, enabling full CDK HTTP API deployments (`HttpApi.addRoutes()`) to ministack. Both provisioners support `Fn::GetAtt` (`IntegrationId`, `RouteId`) and idempotent delete.
-- **Step Functions alias API** — `CreateStateMachineAlias`, `UpdateStateMachineAlias`, `DeleteStateMachineAlias`, `DescribeStateMachineAlias`, `ListStateMachineAliases`, plus `DescribeStateMachine` support for alias ARNs (`arn:…:stateMachine:<name>:<aliasName>`). Aliases let callers address a state machine by a stable pointer whose `routingConfiguration` distributes invocations across one or two versions by weight. Validation matches AWS: alias name regex `^[0-9A-Za-z_-]+$` length 1-80, routing 1-2 entries with int `weight` in `[0, 100]` summing to 100, no duplicate version ARNs, every referenced version must exist on the same state machine. `DeleteStateMachineVersion` now scans for alias references and raises `ConflictException` when an alias still routes to the version — the alias-awareness cross-check deferred from the versioning PR. Same terraform-provider-aws v6 motivation — the provider unconditionally calls `ListStateMachineAliases` on every `aws_sfn_state_machine` refresh, so without this any `terraform plan` returned `InvalidAction`.
-- **Step Functions versioning API** — `PublishStateMachineVersion`, `DeleteStateMachineVersion`, `ListStateMachineVersions`, plus `DescribeStateMachine` support for qualified version ARNs (`arn:…:stateMachine:<name>:<N>`) returning the snapshot captured at publish time. `CreateStateMachine` now accepts the `publish=True` parameter, returning `stateMachineVersionArn` for the auto-published v1 in the same call. AWS-style optimistic concurrency via `revisionId`: every Create/Update rotates the state machine's `revisionId`, and `PublishStateMachineVersion`'s optional `revisionId` is treated as a precondition — supplying a stale value raises `ConflictException`. Version numbers are monotonic per state machine and never reused after delete (a `lastVersionNumber` high-water mark on the base state machine enforces this, matching AWS's documented behaviour). Without these actions, terraform-provider-aws v6 fails on every `aws_sfn_state_machine` refresh because it unconditionally calls `ListStateMachineVersions` regardless of whether versioning was opted into.
-- **CloudWatch Logs Delivery API** — `PutDeliverySource` / `GetDeliverySource` / `DeleteDeliverySource` / `DescribeDeliverySources`, `PutDeliveryDestination` / `GetDeliveryDestination` / `DeleteDeliveryDestination` / `DescribeDeliveryDestinations`, and `CreateDelivery` / `GetDelivery` / `DeleteDelivery` / `DescribeDeliveries` (12 actions total). This is the 2023-era replacement for subscription filters that vended-logs producers (Bedrock, AppSync, CodeWhisperer, …) use to ship logs into S3, CloudWatch Logs, or Firehose. Server-derived fields match AWS's contract: `service` is computed from a delivery source's `resourceArn` (e.g. `arn:aws:bedrock:…` → `bedrock`) and `deliveryDestinationType` from a destination's `destinationResourceArn` (`s3` → `S3`, `logs` → `CWL`, `firehose` → `FH`); callers cannot override either. `outputFormat` is validated against the AWS enum (`json` / `plain` / `w3c` / `raw` / `parquet`). `CreateDelivery` requires the `deliveryDestinationArn` to resolve to an already-registered destination (instead of silently defaulting to `CWL`) and rejects duplicate `(deliverySourceName, deliveryDestinationArn)` pairs with `ConflictException`, matching AWS's one-Delivery-per-pair contract.
+- **AWS Backup service** — 21 operations across vaults, plans, selections, jobs, and tagging. Multi-tenant via `AccountScopedDict`, persisted, and integrated with the Resource Groups Tagging API. Jobs return `COMPLETED` immediately — sufficient for Terraform `aws_backup_*` IaC validation, no real backup is performed. Contributed by @AdigaAkhil.
+- **EventBridge archive event storage and replay dispatch** — `PutEvents` writes matching events to active archives (incrementing `EventCount`), and `StartReplay` re-dispatches the snapshot to the destination bus in a background thread so the destination's current rules and targets fire. Archives persist; replays surviving a restart are flipped to `FAILED`. Closes the long-standing "stored but not dispatched" gap. Contributed by @AdigaAkhil.
+- **Transfer Family — real SFTP server** — `asyncssh`-backed listener on `:2222` (override with `SFTP_PORT`), backed by ministack's S3 state. Public-key auth resolves the user, server, and account in one shot — no `username$serverid` decoration. `SFTP_PORT_PER_SERVER=1` allocates one port per server from `SFTP_BASE_PORT` (default 2300). `HomeDirectoryType=PATH` and `LOGICAL` both honored. Host key persists when `PERSIST_STATE=1`. Adds `StartServer` / `StopServer` (`OFFLINE` servers refuse auth). `asyncssh` lives under the `[full]` extra; the base install serves the control plane and skips the listener.
+- **CloudFormation `AWS::ApiGatewayV2::Integration` and `AWS::ApiGatewayV2::Route` provisioners** — completes the API Gateway v2 CFN surface, enabling full CDK HTTP API deployments (`HttpApi.addRoutes()`) against ministack. Both support `Fn::GetAtt` (`IntegrationId`, `RouteId`) and idempotent delete. Contributed by @hiddengearz.
+- **Step Functions alias API** — `Create/Update/Delete/Describe/ListStateMachineAliases` plus alias ARN resolution on `DescribeStateMachine`. Validation matches AWS (name regex, weights summing to 100, referenced versions must exist). `DeleteStateMachineVersion` now refuses to drop a version an alias still routes to. Unblocks `terraform plan` on `aws_sfn_state_machine` under provider v6, which unconditionally calls `ListStateMachineAliases` on every refresh. Contributed by @mattwang44.
+- **Step Functions versioning API** — `Publish/Delete/ListStateMachineVersions` plus qualified-ARN resolution on `DescribeStateMachine`. `CreateStateMachine` accepts `publish=True`. Optimistic concurrency via `revisionId`; version numbers are monotonic and never reused after delete. Same terraform-provider-aws v6 motivation as the alias API. Contributed by @mattwang44.
+- **CloudWatch Logs Delivery API** — 12 actions across `DeliverySource` / `DeliveryDestination` / `Delivery` (the 2023-era replacement for subscription filters that vended-logs producers like Bedrock and AppSync use to ship to S3 / CWL / Firehose). Server-derived `service` and `deliveryDestinationType`, `outputFormat` validated against the AWS enum, one-Delivery-per-pair enforced with `ConflictException`. Contributed by @mattwang44.
### Fixed
-- **RDS Postgres 18+ container refused to start** — MiniStack mounted the RDS data volume (or tmpfs) at `/var/lib/postgresql/data` for every Postgres major, but the official `postgres:18+` image moved to a major-version-specific on-disk layout and refuses to start with the pre-18 path ([docker-library/postgres#1259](https://github.com/docker-library/postgres/pull/1259)). `CreateDBInstance Engine=postgres EngineVersion=18.x` returned "available" from the RDS API while the spawned `postgres:18-alpine` container exited immediately with a layout-mismatch error. The mount path is now chosen per major: `/var/lib/postgresql/data` for < 18 (unchanged), `/var/lib/postgresql` for ≥ 18. MySQL / MariaDB / Aurora MySQL unaffected. Also adds `postgres 18.3`, `17.5`, `16.4` to the `DescribeDBEngineVersions` matrix (and aurora-postgresql equivalents). Reported by @whittin3.
+- **RDS Postgres 18+ container refused to start** — `postgres:18+` images moved to a major-version-specific data layout ([docker-library/postgres#1259](https://github.com/docker-library/postgres/pull/1259)) and refused to start with the pre-18 mount path. Mount path is now chosen per major: `/var/lib/postgresql/data` for < 18 (unchanged), `/var/lib/postgresql` for ≥ 18. MySQL / MariaDB / Aurora MySQL unaffected. Also adds `postgres 18.3`, `17.5`, `16.4` to `DescribeDBEngineVersions`. Reported and contributed by @whittin3.
### Changed
-- **RDS containers now mount only the engine-appropriate data path.** Previously both `/var/lib/postgresql/data` and `/var/lib/mysql` were mounted on every RDS container regardless of engine — harmless but wasteful, and opaque when debugging. Docker `volumes` / `tmpfs` kwargs now reflect only the active engine.
+- **RDS containers mount only the engine-appropriate data path** — previously both `/var/lib/postgresql/data` and `/var/lib/mysql` were mounted on every container regardless of engine. Harmless but wasteful and opaque when debugging.
---
diff --git a/README.md b/README.md
index 06fb47ac..b6d98e94 100644
--- a/README.md
+++ b/README.md
@@ -354,7 +354,7 @@ subnet = ec2.create_subnet(
| Service | Operations | Notes |
|---------|-----------|-------|
| **SSM Parameter Store** | PutParameter, GetParameter, GetParameters, GetParametersByPath, DeleteParameter, DeleteParameters, DescribeParameters, GetParameterHistory, LabelParameterVersion, AddTagsToResource, RemoveTagsFromResource, ListTagsForResource | Supports String, SecureString, StringList |
-| **EventBridge** | CreateEventBus, UpdateEventBus, DeleteEventBus, ListEventBuses, DescribeEventBus, PutRule, DeleteRule, ListRules, DescribeRule, EnableRule, DisableRule, PutTargets, RemoveTargets, ListTargetsByRule, ListRuleNamesByTarget, PutEvents, TestEventPattern, TagResource, UntagResource, ListTagsForResource, CreateArchive, DeleteArchive, DescribeArchive, UpdateArchive, ListArchives, PutPermission, RemovePermission, CreateConnection, DescribeConnection, DeleteConnection, UpdateConnection, DeauthorizeConnection, ListConnections, CreateApiDestination, DescribeApiDestination, DeleteApiDestination, UpdateApiDestination, ListApiDestinations, StartReplay, DescribeReplay, ListReplays, CancelReplay, CreateEndpoint, DeleteEndpoint, DescribeEndpoint, ListEndpoints, UpdateEndpoint, ActivateEventSource, DeactivateEventSource, DescribeEventSource, CreatePartnerEventSource, DeletePartnerEventSource, DescribePartnerEventSource, ListPartnerEventSources, ListPartnerEventSourceAccounts, ListEventSources, PutPartnerEvents | Lambda target dispatch on PutEvents; S3 EventBridge notifications; replays and SaaS/partner APIs are control-plane stubs |
+| **EventBridge** | CreateEventBus, UpdateEventBus, DeleteEventBus, ListEventBuses, DescribeEventBus, PutRule, DeleteRule, ListRules, DescribeRule, EnableRule, DisableRule, PutTargets, RemoveTargets, ListTargetsByRule, ListRuleNamesByTarget, PutEvents, TestEventPattern, TagResource, UntagResource, ListTagsForResource, CreateArchive, DeleteArchive, DescribeArchive, UpdateArchive, ListArchives, PutPermission, RemovePermission, CreateConnection, DescribeConnection, DeleteConnection, UpdateConnection, DeauthorizeConnection, ListConnections, CreateApiDestination, DescribeApiDestination, DeleteApiDestination, UpdateApiDestination, ListApiDestinations, StartReplay, DescribeReplay, ListReplays, CancelReplay, CreateEndpoint, DeleteEndpoint, DescribeEndpoint, ListEndpoints, UpdateEndpoint, ActivateEventSource, DeactivateEventSource, DescribeEventSource, CreatePartnerEventSource, DeletePartnerEventSource, DescribePartnerEventSource, ListPartnerEventSources, ListPartnerEventSourceAccounts, ListEventSources, PutPartnerEvents | Lambda target dispatch on PutEvents; S3 EventBridge notifications; archives capture matching events and `StartReplay` re-dispatches them to the destination bus in a background thread; SaaS/partner APIs are control-plane stubs |
| **Kinesis** | CreateStream, DeleteStream, DescribeStream, DescribeStreamSummary, ListStreams, ListShards, PutRecord, PutRecords, GetShardIterator, GetRecords, IncreaseStreamRetentionPeriod, DecreaseStreamRetentionPeriod, MergeShards, SplitShard, UpdateShardCount, StartStreamEncryption, StopStreamEncryption, EnableEnhancedMonitoring, DisableEnhancedMonitoring, RegisterStreamConsumer, DeregisterStreamConsumer, ListStreamConsumers, DescribeStreamConsumer, AddTagsToStream, RemoveTagsFromStream, ListTagsForStream | Partition key → shard routing; AWS limits enforced (1 MB/record, 500 records/batch, 5 MB payload, 256-char partition key) |
| **CloudWatch Metrics** | PutMetricData, GetMetricStatistics, GetMetricData, ListMetrics, PutMetricAlarm, PutCompositeAlarm, DescribeAlarms, DescribeAlarmsForMetric, DescribeAlarmHistory, DeleteAlarms, SetAlarmState, EnableAlarmActions, DisableAlarmActions, TagResource, UntagResource, ListTagsForResource, PutDashboard, GetDashboard, DeleteDashboards, ListDashboards | CBOR and JSON protocol |
| **SES** | SendEmail, SendRawEmail, SendTemplatedEmail, SendBulkTemplatedEmail, VerifyEmailIdentity, VerifyEmailAddress, VerifyDomainIdentity, VerifyDomainDkim, ListIdentities, ListVerifiedEmailAddresses, GetIdentityVerificationAttributes, GetIdentityDkimAttributes, DeleteIdentity, GetSendQuota, GetSendStatistics, SetIdentityNotificationTopic, SetIdentityFeedbackForwardingEnabled, CreateConfigurationSet, DeleteConfigurationSet, DescribeConfigurationSet, ListConfigurationSets, CreateTemplate, GetTemplate, UpdateTemplate, DeleteTemplate, ListTemplates | Emails stored in-memory, not sent |
@@ -448,6 +448,8 @@ subnet = ec2.create_subnet(
| `AWS::Route53::RecordSet` | Record FQDN (trailing dot) | Name |
| `AWS::ApiGatewayV2::Api` | API ID | ApiId, ApiEndpoint |
| `AWS::ApiGatewayV2::Stage` | Stage ID | StageName |
+| `AWS::ApiGatewayV2::Integration` | Integration ID | IntegrationId |
+| `AWS::ApiGatewayV2::Route` | Route ID | RouteId |
| `AWS::SES::EmailIdentity` | Identity | EmailIdentity |
| `AWS::WAFv2::WebACL` | WebACL ID | Arn, Id |
| `AWS::CloudFront::Distribution` | Distribution ID | Arn, DomainName, Id |
@@ -489,7 +491,7 @@ Unsupported resource types fail with `CREATE_FAILED` (or `ROLLBACK_COMPLETE` if
| **AutoScaling** | CreateAutoScalingGroup, DescribeAutoScalingGroups, UpdateAutoScalingGroup, DeleteAutoScalingGroup, DescribeAutoScalingInstances, CreateLaunchConfiguration, DescribeLaunchConfigurations, DeleteLaunchConfiguration, PutScalingPolicy, DescribePolicies, DeletePolicy, PutLifecycleHook, DescribeLifecycleHooks, DeleteLifecycleHook, CompleteLifecycleAction, RecordLifecycleActionHeartbeat, PutScheduledUpdateGroupAction, DescribeScheduledActions, DeleteScheduledAction, CreateOrUpdateTags, DescribeTags, DeleteTags | 23 actions; in-memory state — no real instance scaling; full ASG lifecycle (launch configs, scaling policies, lifecycle hooks, scheduled actions, tags); CDK/Terraform compatible |
| **CodeBuild** | CreateProject, BatchGetProjects, ListProjects, UpdateProject, DeleteProject, StartBuild, BatchGetBuilds, StopBuild, ListBuilds, ListBuildsForProject, BatchDeleteBuilds | 11 actions; builds complete immediately with SUCCEEDED status; project and build metadata stored in-memory |
| **AppConfig** | CreateApplication, GetApplication, ListApplications, UpdateApplication, DeleteApplication, CreateEnvironment, GetEnvironment, ListEnvironments, UpdateEnvironment, DeleteEnvironment, CreateConfigurationProfile, GetConfigurationProfile, ListConfigurationProfiles, UpdateConfigurationProfile, DeleteConfigurationProfile, CreateHostedConfigurationVersion, GetHostedConfigurationVersion, ListHostedConfigurationVersions, DeleteHostedConfigurationVersion, CreateDeploymentStrategy, GetDeploymentStrategy, ListDeploymentStrategies, UpdateDeploymentStrategy, DeleteDeploymentStrategy, StartDeployment, GetDeployment, ListDeployments, StopDeployment, TagResource, UntagResource, ListTagsForResource, StartConfigurationSession, GetLatestConfiguration | 33 operations; control plane + data plane; hosted configuration versions; deployments complete immediately; session-based configuration retrieval with token rotation |
-| **Transfer Family** | CreateServer, DescribeServer, DeleteServer, ListServers, CreateUser, DescribeUser, DeleteUser, ListUsers, ImportSshPublicKey, DeleteSshPublicKey | 10 operations; SFTP server and user management; SSH key rotation; LOGICAL home directory mappings to S3; in-memory state |
+| **Transfer Family** | CreateServer, DescribeServer, DeleteServer, ListServers, StartServer, StopServer, CreateUser, DescribeUser, DeleteUser, ListUsers, ImportSshPublicKey, DeleteSshPublicKey | 12 operations; **real SFTP listener** on `:2222` (override with `SFTP_PORT`) backed by S3 — `ls`, `put`, `get`, `mkdir`, `rename` work end-to-end against the local S3 emulator; `SFTP_PORT_PER_SERVER=1` allocates one port per `CreateServer` from `SFTP_BASE_PORT` (default 2300); SSH key auth scans every user across every server and account; `LOGICAL` and `PATH` home-directory mappings; host key persists across restarts when `PERSIST_STATE=1` |
| **EventBridge Scheduler** | CreateSchedule, GetSchedule, UpdateSchedule, DeleteSchedule, ListSchedules, CreateScheduleGroup, GetScheduleGroup, DeleteScheduleGroup, ListScheduleGroups, TagResource, UntagResource, ListTagsForResource | 12 actions; schedule groups with cascading deletes; `rate()`, `cron()`, `at()` expressions; group/prefix/state filters on list; default group auto-created; CFN `AWS::Scheduler::Schedule` and `AWS::Scheduler::ScheduleGroup` supported |
| **EKS** | CreateCluster, DescribeCluster, ListClusters, DeleteCluster, CreateNodegroup, DescribeNodegroup, ListNodegroups, DeleteNodegroup, TagResource, UntagResource, ListTagsForResource | 11 operations; `CreateCluster` spawns a real **k3s** container (75 MB) with a full Kubernetes API server; `kubectl`, Helm, and any K8s tooling work out of the box; cascading delete removes nodegroups and k3s container; CFN `AWS::EKS::Cluster` and `AWS::EKS::Nodegroup` supported |
@@ -715,68 +717,45 @@ docker run -p 4566:4566 \
ministackorg/ministack
```
-### Lambdas in docker
-
-To run lambda in docker, the LAMBDA_EXECUTOR needs to be set to "docker". All lambdas will be run in an
-AWS supplied docker image, following docker images are supported:
- * "python3.8": "public.ecr.aws/lambda/python:3.8"
- * "python3.9": "public.ecr.aws/lambda/python:3.9"
- * "python3.10": "public.ecr.aws/lambda/python:3.10"
- * "python3.11": "public.ecr.aws/lambda/python:3.11"
- * "python3.12": "public.ecr.aws/lambda/python:3.12"
- * "python3.13": "public.ecr.aws/lambda/python:3.13"
- * "python3.14": "public.ecr.aws/lambda/python:3.14"
- * "nodejs14.x": "public.ecr.aws/lambda/nodejs:14"
- * "nodejs16.x": "public.ecr.aws/lambda/nodejs:16"
- * "nodejs18.x": "public.ecr.aws/lambda/nodejs:18"
- * "nodejs20.x": "public.ecr.aws/lambda/nodejs:20"
- * "nodejs22.x": "public.ecr.aws/lambda/nodejs:22"
- * "nodejs24.x": "public.ecr.aws/lambda/nodejs:24"
- * "provided.al2023": "public.ecr.aws/lambda/provided:al2023"
- * "provided.al2": "public.ecr.aws/lambda/provided:al2"
- * "provided": "public.ecr.aws/lambda/provided:latest"
-
-Docker containers for lambda are name lambda-<random-hex-16>.
-
-Docker containers are always kept "warm", and reused when possible. This means that containers
-created for lambdas need to be killed manually.
-
-Additionally a volume is needed to mount the code (and extra layers). This must be set with
-the LAMBDA_REMOTE_DOCKER_VOLUME_MOUNT environment variable. This must be a named volume (managed by docker).
-
-If a ministack is not running on the default network, DOCKER_NETWORK needs to be set, which will attach
-all container-backed services (Lambda, RDS, EKS, ElastiCache) to this network, making it possible to access
-ministack (AWS) resources from the lambda. The legacy `LAMBDA_DOCKER_NETWORK` is still accepted as a fallback.
-
-Example docker compose file:
-```
+### Lambda in Docker
+
+Set `LAMBDA_EXECUTOR=docker` to run every Lambda invocation inside an AWS-supplied runtime container instead of a local subprocess. `provided.*` runtimes and `PackageType: Image` always use Docker regardless of this setting.
+
+Supported runtimes and the AWS public ECR images MiniStack pulls for them:
+
+| Runtime | Image |
+|---------|-------|
+| `python3.8` – `python3.14` | `public.ecr.aws/lambda/python:<version>` |
+| `nodejs14.x` – `nodejs24.x` | `public.ecr.aws/lambda/nodejs:<version>` |
+| `provided.al2023` | `public.ecr.aws/lambda/provided:al2023` |
+| `provided.al2` | `public.ecr.aws/lambda/provided:al2` |
+| `provided` | `public.ecr.aws/lambda/provided:latest` |
+
+Containers are named `lambda-<random-hex-16>` and pooled across invocations. Idle containers are reaped after `LAMBDA_WARM_TTL_SECONDS` (default 300s) — no manual cleanup needed. The pool is also drained on `/_ministack/reset`.
+
+**Docker-in-Docker:** when MiniStack itself runs inside a container, set `LAMBDA_REMOTE_DOCKER_VOLUME_MOUNT` to a Docker named volume that is also mounted at `/var/task` inside the MiniStack container. MiniStack writes the Lambda code into the volume so the sibling Lambda container (started via the host Docker socket) can read it. Not needed when MiniStack runs directly on the host.
+
+**Networking:** when MiniStack runs in Docker Compose, set `DOCKER_NETWORK` to the Compose network name. All container-backed services (Lambda, RDS, EKS, ElastiCache) then attach to that network so Lambda code can reach MiniStack at `http://<ministack-service-name>:4566`. The legacy `LAMBDA_DOCKER_NETWORK` is still accepted (Lambda only) as a fallback.
+
+Example `docker-compose.yml`:
+
+```yaml
services:
ministack:
image: ministackorg/ministack:latest
container_name: infra_ministack
- entrypoint: ["python", "-m", "hypercorn", "ministack.app:app", "--bind", "0.0.0.0:4566", "--keep-alive", "75"]
- networks:
- infra-network:
- healthcheck:
- test: "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:4566/_ministack/health')\" || exit 1"
- interval: 10s
- timeout: 2s
- start_period: 5s
- retries: 3
ports:
- "4566:4566"
environment:
- DOCKER_SOCK: ${DOCKER_SOCK:-/var/run/docker.sock}
LAMBDA_EXECUTOR: docker
DOCKER_NETWORK: ${COMPOSE_PROJECT_NAME}_infra-network
- LAMBDA_REMOTE_DOCKER_VOLUME_MOUNT: "{COMPOSE_PROJECT_NAME}_lambda-docker-volume"
+ LAMBDA_REMOTE_DOCKER_VOLUME_MOUNT: ${COMPOSE_PROJECT_NAME}_lambda-docker-volume
AWS_DEFAULT_REGION: ${AWS_REGION:-eu-central-1}
- AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY:-my_secret}
- AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID:-my_key}
- AWS_ENDPOINT_URL: http://localstack:4566
volumes:
- - "/var/run/docker.sock:/var/run/docker.sock"
- - "lambda-docker-volume:/var/task"
+ - /var/run/docker.sock:/var/run/docker.sock
+ - lambda-docker-volume:/var/task
+ networks:
+ - infra-network
volumes:
lambda-docker-volume:
@@ -785,7 +764,13 @@ networks:
infra-network:
```
-Option privileged set to "true" is needed if /var/run/docker.sock is root owned.
+Lambda code in this setup should point at the MiniStack service name, not `localhost`:
+
+```python
+boto3.client("s3", endpoint_url="http://infra_ministack:4566", ...)
+```
+
+If `/var/run/docker.sock` is root-owned on the host, add `privileged: true` to the `ministack` service so it can talk to the daemon.
### EKS with Real Kubernetes (k3s)
@@ -909,20 +894,18 @@ pip install boto3 pytest duckdb docker cbor2
# Start MiniStack
docker compose up -d
-# Run the full test suite (1,300+ tests across all services)
+# Run the full test suite (1,800+ tests across all services)
pytest tests/ -v
```
Expected output:
```
-collected 955 items
-
-tests/test_services.py::test_s3_create_bucket PASSED
+tests/test_s3.py::test_s3_create_bucket PASSED
...
-tests/test_services.py::test_app_asgi_callable PASSED
+tests/test_lambda.py::test_lambda_invoke PASSED
-955 passed in ~100s
+1800+ passed in ~120s
```
---
diff --git a/ministack/services/eventbridge.py b/ministack/services/eventbridge.py
index 1b81afff..ec88ac5d 100644
--- a/ministack/services/eventbridge.py
+++ b/ministack/services/eventbridge.py
@@ -141,6 +141,13 @@ def restore_state(data):
for tk in ("ReplayStartTime", "ReplayEndTime", "EventStartTime", "EventEndTime"):
if tk in rep and rep[tk] is not None:
rep[tk] = _coerce_timestamp(rep[tk])
+ # Replays whose dispatch thread was running at shutdown can't
+ # resume — the thread is gone. Flip them to FAILED so persisted
+ # state never carries zombie RUNNING replays across restarts.
+ # Same precedent as Step Functions executions (stepfunctions.py).
+ if rep.get("State") in ("STARTING", "RUNNING"):
+ rep["State"] = "FAILED"
+ rep["ReplayEndTime"] = _now_ts()
try:
diff --git a/pyproject.toml b/pyproject.toml
index 56541cbd..a976ef9e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "ministack"
-version = "1.3.14"
+version = "1.3.15"
description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"
readme = "README.md"
license = { file = "LICENSE" }