Ministack: Free, open-source local AWS emulator - 60+ services, Terraform compatible, real databases. Free forever. MIT licensed.
Python awsaws-emulatoraws-localaws-sdkdevtoolsdockerdynamodbec2emulatorlambdalocalstacklocalstack-alternativeministackmock-awsopen-sourcepythons3sqsterraform
Release/v1.2.12 — S3 lifecycle Terraform fix, SFN wait scaling, reset init scripts, AutoScaling (#318)
Nahuel Nuceraa228b46f86bb
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2629902b..4f9a697b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,13 +7,18 @@ Versioning follows [Semantic Versioning](https://semver.org/).----## [Unreleased]+## [1.2.12] — 2026-04-14-### Fixed-- **Lambda Runtime API noise** — suppressed `BrokenPipeError` tracebacks from Lambda binaries disconnecting after reading the event. This is benign and expected behavior during native `provided` runtime execution.-- **RDS Data API warning spam** — the `pymysql` import warning is now logged once per process instead of on every `ExecuteStatement` call.### Added-- **SFN Wait state scaling** — new `SFN_WAIT_SCALE` environment variable (default `1.0`) scales Wait state durations and retry interval sleeps. Set to `0` to skip all waits for fast-forward execution in test scenarios where emulated resources are immediately available. Contributed by @jayjanssen+- **SFN Wait state scaling** — new `SFN_WAIT_SCALE` environment variable (default `1.0`) scales Wait state durations and retry interval sleeps. Set to `0` to skip all waits for fast-forward execution in test scenarios where emulated resources are immediately available. Contributed by @jayjanssen (#310)+- **AutoScaling `DescribeScalingActivities`** — returns empty activities list. Terraform polls this after ASG creation; without it Terraform fails. Contributed by @alexanderkrum-next (#317)+- **Reset with init scripts** — `POST /_ministack/reset?init=1` re-runs boot.d and ready.d init scripts after clearing state. Without this, resources created by init scripts were lost after reset with no way to restore them. Reported by @staranto++### Fixed+- **S3 lifecycle configuration hangs Terraform** — `PutBucketLifecycleConfiguration` and `GetBucketLifecycleConfiguration` now return the `x-amz-transition-default-minimum-object-size` header. The Terraform AWS provider waits for this header and hangs indefinitely without it. Reported by @mspiller (#306)+- **Lambda Runtime API noise** — suppressed `BrokenPipeError` tracebacks from Lambda binaries disconnecting after reading the event. This is benign and expected behavior during native `provided` runtime execution. Contributed by @jayjanssen (#311)+- **RDS Data API warning spam** — the `pymysql` import warning is now logged once per process instead of on every `ExecuteStatement` call. Contributed by @jayjanssen (#311)+- **SFN Wait scaling coverage** — `SFN_WAIT_SCALE` now also applies to Activity task timeouts, waitForTaskToken timeouts, and ECS task polling intervals. Runtime config endpoint validates the value (rejects non-numeric, negative, NaN, Inf).---@@ -24,6 +29,7 @@ Versioning follows [Semantic Versioning](https://semver.org/).- **RDS DbiResourceId lookup** — `DescribeDBInstances` and other instance actions now accept `DbiResourceId` (e.g. `db-1AD581BD3647411AACBF`) in addition to the friendly `DBInstanceIdentifier`. Fixes Terraform/OpenTofu state refresh failures. Contributed by @alexanderkrum-next (#305)---+## [1.2.10] — 2026-04-13### Added@@ -32,7 +38,6 @@ Versioning follows [Semantic Versioning](https://semver.org/).### Fixed- **SFN aws-sdk error code prefixing** — SDK errors from `aws-sdk:*` task integrations are now prefixed with the service name (e.g. `SecretsManager.ResourceExistsException` instead of bare `ResourceExistsException`), matching real AWS Step Functions behavior. Fixes `Catch` blocks that match on service-specific error codes. Contributed by @jayjanssen (#296)-- **RDS parameter group reset actions** — `ResetDBParameterGroup` and `ResetDBClusterParameterGroup` now clear either selected overrides or the full user-parameter state, matching AWS semantics. Parameter list parsing now accepts both `Parameters.member.N` and `Parameters.Parameter.N` serialization styles used by different clients.---diff --git a/ministack/app.py b/ministack/app.pyindex f012cff2..e502b8f8 100644--- a/ministack/app.py+++ b/ministack/app.py@@ -298,8 +298,13 @@ async def app(scope, receive, send):# Admin endpoints — no wildcard CORS headers (return early, before CORS block)if path == "/_ministack/reset" and method == "POST":_reset_all_state()+ run_init = query_params.get("init", [""])[0] == "1"+ if run_init:+ _run_init_scripts()await _send_response(send, 200, {"Content-Type": "application/json"},json.dumps({"reset": "ok"}).encode())+ if run_init:+ asyncio.create_task(_run_ready_scripts())returnif path == "/_ministack/config" and method == "POST":@@ -322,6 +327,17 @@ async def app(scope, receive, send):mod_name, var_name = key.rsplit(".", 1)try:mod = __import__(f"ministack.services.{mod_name}", fromlist=[var_name])+ # Validate SFN_WAIT_SCALE before applying+ if key == "stepfunctions._SFN_WAIT_SCALE":+ try:+ fv = float(value)+ except (ValueError, TypeError):+ logger.warning("/_ministack/config: invalid SFN_WAIT_SCALE=%r", value)+ continue+ if not __import__("math").isfinite(fv) or fv < 0:+ logger.warning("/_ministack/config: invalid SFN_WAIT_SCALE=%r", value)+ continue+ value = fvsetattr(mod, var_name, value)applied[key] = valueexcept (ImportError, AttributeError) as e:diff --git a/ministack/services/s3.py b/ministack/services/s3.pyindex a070720e..9f54401a 100644--- a/ministack/services/s3.py+++ b/ministack/services/s3.py@@ -754,7 +754,10 @@ def _get_bucket_lifecycle(name: str):return _no_such_bucket(name)config = _bucket_lifecycle.get(name)if config:- return 200, {"Content-Type": "application/xml"}, config+ return 200, {+ "Content-Type": "application/xml",+ "x-amz-transition-default-minimum-object-size": "all_storage_classes_128K",+ }, configreturn _error("NoSuchLifecycleConfiguration","The lifecycle configuration does not exist",@@ -767,7 +770,7 @@ def _put_bucket_lifecycle(name: str, body: bytes):if name not in _buckets:return _no_such_bucket(name)_bucket_lifecycle[name] = body- return 200, {}, b""+ return 200, {"x-amz-transition-default-minimum-object-size": "all_storage_classes_128K"}, b""def _delete_bucket_lifecycle(name: str):diff --git a/ministack/services/stepfunctions.py b/ministack/services/stepfunctions.pyindex 33382d94..9710f2dc 100644--- a/ministack/services/stepfunctions.py+++ b/ministack/services/stepfunctions.py@@ -1284,7 +1284,7 @@ def _invoke_activity(resource, input_data):"input": json.dumps(input_data),})- timeout = 99999+ timeout = _scaled_timeout(99999)if not evt.wait(timeout=timeout):_task_tokens.pop(token, None)raise _ExecutionError("States.Timeout", "Activity task timed out waiting for worker")@@ -1319,7 +1319,7 @@ def _invoke_with_callback(resource, input_data, token, state_def):except _ExecutionError:pass- timeout = state_def.get("TimeoutSeconds", 99999)+ timeout = _scaled_timeout(state_def.get("TimeoutSeconds", 99999))if not evt.wait(timeout=timeout):_task_tokens.pop(token, None)raise _ExecutionError("States.Timeout",@@ -1498,6 +1498,14 @@ def _scaled_sleep(seconds):time.sleep(scaled)+def _scaled_timeout(seconds):+ """Scale a blocking-wait timeout. Returns at least 0.01 so Event.wait()+ never blocks forever when scale is 0."""+ if _SFN_WAIT_SCALE == 0:+ return 0.01+ return max(seconds * _SFN_WAIT_SCALE, 0.01)++def _sleep_until(iso_ts):try:target = datetime.fromisoformat(iso_ts.replace("Z", "+00:00"))@@ -2157,7 +2165,7 @@ def _poll_ecs_tasks(cluster, task_arns):from ministack.services import ecsfor _ in range(600):- time.sleep(1)+ _scaled_sleep(1)status, _, body = ecs._describe_tasks({"cluster": cluster, "tasks": task_arns})result = json.loads(body) if body else {}tasks = result.get("tasks", [])diff --git a/pyproject.toml b/pyproject.tomlindex a375fcd4..793a774b 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "ministack"-version = "1.2.11"+version = "1.2.12"description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"readme = "README.md"license = { file = "LICENSE" }