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.3.31 (#587)
Nahuel Nucera0a3d33986db6
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 76e275e9..40593fd4 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,18 @@ Versioning follows [Semantic Versioning](https://semver.org/).---+## [1.3.31] — 2026-05-07++### Added+- **EC2 AWS-managed prefix lists** — `DescribePrefixLists`, `DescribeManagedPrefixLists`, and `GetManagedPrefixListEntries` now return deterministic CIDRs (instead of `0.0.0.0/0`) for the standard AWS-managed prefix list names: `s3`, `dynamodb`, `s3express`, `vpc-lattice`, `route53-healthchecks`, `ec2-instance-connect`, `cloudfront`, `groundstation`. IPv4 entries use the CGNAT range (`100.64.0.0/10`), IPv6 uses `64:ff9b:1::/48`. IDs and entries are stable across calls so VPC endpoint provisioning of type `Gateway` resolves consistently. Contributed by @jgrumboe.++### Fixed+- **Lambda multi-account isolation** — function workers spawned under non-default accounts now receive `AWS_ACCESS_KEY_ID` derived from the function ARN instead of the host process env var, so `STS GetCallerIdentity` and internal SDK calls inside the handler resolve to the correct account. The warm-worker pool key is now `{account}:{function}:{qualifier}`, preventing two accounts that deploy the same function name from sharing a worker. Fixes all four execution paths (warm worker, provided runtime, local subprocess, Docker container). Contributed by @jgrumboe.+- **S3 `GetObject` by `VersionId` `Last-Modified` header** — the versioned `GetObject` path emitted the internal ISO-8601 timestamp directly into the HTTP `Last-Modified` header, where AWS returns RFC 7231 HTTP-date. AWS SDK for JavaScript v3 strictly parses the header and threw after the 200 response. Now wrapped through `iso_to_rfc7231`, matching the non-versioned path. Contributed by @mgius-ae.+- **EC2 `RunInstances` and `DescribeInstances` emit `BlockDeviceMappings`** — every launched instance now auto-attaches a root EBS volume (`/dev/xvda`, gp3, 8 GiB, `DeleteOnTermination: true`) registered with `_volumes` and surfaced through both `DescribeInstances` (with `<volumeId>`, `<status>`, `<attachTime>`, `<deleteOnTermination>`) and `DescribeVolumes` (with the matching `Attachments` link), matching real AWS where every EBS-backed AMI auto-attaches a root volume regardless of whether the launch request specified `BlockDeviceMappings`. Cloud Custodian, AWS Config rules, and any policy tool that classifies instances by BDM presence now work. Reported by @Aeres-u99.++---+## [1.3.30] — 2026-05-06### Fixeddiff --git a/ministack/core/lambda_runtime.py b/ministack/core/lambda_runtime.pyindex 1d8ab03b..0b434791 100644--- a/ministack/core/lambda_runtime.py+++ b/ministack/core/lambda_runtime.py@@ -693,33 +693,27 @@ def invalidate_worker(func_name: str, qualifier: str = None, account: str = NoneOtherwise kill all workers for the function (used on delete).If account is provided, scope the invalidation to that account."""+ # Worker keys are "{account}:{func_name}:{qualifier}". Lambda function names+ # cannot contain ':' (AWS naming rule), so splitting on ':' is unambiguous.+ def _matches(k: str) -> bool:+ parts = k.split(":")+ if len(parts) != 3:+ return False+ k_account, k_func, k_qualifier = parts+ if k_func != func_name:+ return False+ if account is not None and k_account != account:+ return False+ if qualifier is not None and k_qualifier != qualifier:+ return False+ return True+with _lock:- if qualifier is not None:- if account:- key = f"{account}:{func_name}:{qualifier}"- else:- key = f"{func_name}:{qualifier}"- # Try exact match first (new key format with account)- worker = _workers.pop(key, None)+ to_remove = [k for k in _workers if _matches(k)]+ for k in to_remove:+ worker = _workers.pop(k, None)if worker:worker.kill()- else:- # Fallback: search for any key ending with func_name:qualifier- to_remove = [k for k in _workers if k.endswith(f":{func_name}:{qualifier}") or k == f"{func_name}:{qualifier}"]- for k in to_remove:- w = _workers.pop(k, None)- if w:- w.kill()- else:- # Kill all workers for this function (any account, any qualifier)- prefix = f"{account}:{func_name}:" if account else f"{func_name}:"- to_remove = [k for k in _workers if k.startswith(prefix) or k.endswith(f":{func_name}:") or (f":{func_name}:" in k)]- # Simpler: match any key containing the function name- to_remove = [k for k in _workers if f"{func_name}:" in k]- for k in to_remove:- worker = _workers.pop(k, None)- if worker:- worker.kill()def reset():diff --git a/pyproject.toml b/pyproject.tomlindex 3aec8d5c..bca8d0b7 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "ministack"-version = "1.3.30"+version = "1.3.31"description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"readme = "README.md"license = { file = "LICENSE" }