Skip to content

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

release v1.5.33 (#2438)

Nahuel Nucera87c67a4c288d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 528a2d0a..22662282 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,44 +7,27 @@ Versioning follows [Semantic Versioning](https://semver.org/).
## [Unreleased]
-### Fixed
-- **S3 — persisted keys that a file path can't hold survive a restart** — with `S3_PERSIST=1` a key ending in `/` (a folder marker such as `project/Incoming/`) came back without its slash, and keys under it, a key under another key's object (`a/b` beside `a`), or one with doubled or dot segments (`x//y`) were lost or rewritten on restart. Such keys are now stored by an encoded name under the bucket's `.ministack-keys` directory, with the key in their sidecar, and every other key keeps its own path, so data saved by earlier versions still loads. Reported by @jasonthagerty.
-- **S3 — HEAD identifiers and Iceberg REST routing** — ordinary HEAD responses retain an existing AWS-format request ID and HostId, normalizing only a missing or legacy request ID and filling a missing HostId. Iceberg REST HEAD requests signed with the `s3` scope retain the catalog's JSON error format instead of being rewritten as S3 XML.
-- **S3 — GET/HEAD/DELETE error precedence and responses** — ordinary header-signed downloads under `AUTH=true` check the endpoint/signing region before the bucket's home region, then credentials and missing buckets, matching real AWS observations from Osaka. Authentication errors include S3 signature diagnostics, missing keys include `Key`, and these errors carry matching XML/header request identifiers. HeadObject, HeadBucket and DeleteObject check the bucket's home region first, like PUT; a DELETE sent to another regional endpoint no longer succeeds merely because it was signed for the bucket's home. HEAD returns empty error responses without a Content-Length header, and HeadBucket reports an existing bucket's region even on a denial and its ARN on success. These response shapes (the `Key` in `NoSuchKey`, empty HEAD errors, the HeadBucket region and ARN) apply with `AUTH` unset too; only the region and credential order needs `AUTH=true`. IAM still gates existing objects and buckets, and deleting an absent key remains idempotent. Presigned and subresource requests keep their existing paths.
-- **Glue — a job's own botocore loads from where the script asks** — the Spark boot shim imported `botocore` before the job script ran, so a `--py-files` deps zip that holds botocore gave the zipped copy, and a script that then swapped the zip for its extracted folder failed with `DataNotFoundError: Unable to load data for: endpoints`; the shim now patches `Session.create_client` when the script first imports `botocore.session`, and still adds `endpoint_url` only when the caller sets none.
-- **Glue — Spark job scripts get `--JOB_NAME` and `--JOB_RUN_ID`** — a Spark job run passed only the job's `DefaultArguments` and the run's `Arguments`, so a script that reads `JOB_NAME` or `JOB_RUN_ID` with `getResolvedOptions` failed; both now reach the script, as on AWS. They replace a value in `DefaultArguments`, and a value in the run's `Arguments` replaces them. `pythonshell` scripts don't get them, as on AWS. `GetJobRun` still shows only the arguments the caller gave.
-- **Step Functions — JSONata fields on an inline `Map`** — `Items`, `ItemSelector`, `MaxConcurrency`, `Output` and `Assign` were ignored or read as JSONPath, so the Map iterated over the whole input, iterations got literal `{% ... %}` text, a `MaxConcurrency` expression failed with `States.Runtime`, and `Assign` variables were never set; all five are now evaluated, as on AWS. `Items` that is not an array fails with `States.QueryEvaluationError`.
-- **Step Functions — JSONata `Catch` on `Map` and `Parallel` states** — a catcher's `Output` and `Assign` were ignored, so the caught error passed on unchanged and the catcher's variables were never set; both now apply, as on a `Task` state.
-- **Step Functions — JSONata variables with the value `null`** — a variable assigned `null` read back as undefined, so `{% $var %}` failed with `States.QueryEvaluationError`; it now reads back as `null`, as on AWS. An unset variable still fails.
-- **Lambda — Kinesis event source mapping filters** — a `FilterCriteria` pattern on a Kinesis record's `data` or on its metadata (`partitionKey`, `sequenceNumber`, ...) never matched, so a mapping with filters dropped every record. Patterns are now matched as AWS documents them: metadata fields next to the event fields, and `data` decoded from base64 as JSON. Data that isn't JSON can't match a `data` pattern but still matches metadata patterns.
-- **Lambda — two MiniStacks on one host no longer remove each other's function code** — the provided-runtime and Docker-executor extraction caches lived at fixed paths in the shared temp directory, so a second instance on the same host deleted a tree the first was still running from ("leftover from a previous process") and its `reset()` removed the first one's caches; an invocation then failed with `No such file or directory: .../bootstrap`. Both caches are now named for the instance's `GATEWAY_PORT`. Contributed by @skialpine.
-### Added
-- **CloudFormation — `AWS::Athena::WorkGroup`** — a template with a workgroup failed with "Unrecognized resource types"; the workgroup is now created with its `Description`, `State`, `Tags` and `WorkGroupConfiguration`, updated in place when they change, replaced when `Name` changes, and deleted with the stack. `Ref` returns the name and `Fn::GetAtt` `CreationTime` and the effective engine version, as the template reference describes. Reported by @mishukdutta-cz.
-- **Kinesis — stream and consumer resource policies** — `PutResourcePolicy`, `GetResourcePolicy` and `DeleteResourcePolicy` answered `InvalidAction`; they now store a policy per stream or consumer, persisted and dropped with it, with AWS's checks in AWS's order: the ARN's region (`InvalidArgumentException` "The region specified in the ARN '<arn>' does not match the endpoint region"), the policy ("Policy validation error: This policy contains invalid Json", "Missing required field Version" or "Statement", and per statement the actions a stream or consumer can share and a `Resource` equal to the ARN, with the statement's line and column), then the resource ("Stream <name> under account <id> not found."). `GetResourcePolicy` without a policy answers `{"Policy": "{}"}` and `DeleteResourcePolicy` "No resource policy found for resource ARN <arn>.". A stream policy may also share `kinesis:DescribeStream`. Reported by @Jolley71717.
-- **OpenSearch — engine containers run with a 512 MB heap** — every container MiniStack starts for a domain or Serverless collection used the image's 1 GB heap, too much for a small machine with several of them; each now runs with `-Xms512m -Xmx512m`, the heap OpenSearch's sample docker-compose uses. Contributed by @skialpine.
-
-### Fixed
-- **Lambda — two MiniStacks on one host no longer remove each other's function code** — the provided-runtime and Docker-executor extraction caches lived at fixed paths in the shared temp directory, so a second instance on the same host deleted a tree the first was still running from ("leftover from a previous process") and its `reset()` removed the first one's caches; an invocation then failed with `No such file or directory: .../bootstrap`. Both caches are now named for the instance's `GATEWAY_PORT`. Contributed by @skialpine.
-- **OpenSearch — the container reaper no longer removes a live domain's exited engine** — the reaper read a container id key that only the deferred create path set, so it took a domain's stopped engine for abandoned and removed it after two minutes; it now reads the key every domain record keeps. Contributed by @skialpine.
-- **Lambda — restoring persisted state shares code between versions** — each function version got its own copy of its zip at boot, although versions share one blob file, so a state with many versions took gigabytes before the first request. Records that share a blob now share its bytes. Contributed by @skialpine.
-- **Lambda — a package that is not a zip is refused** — `CreateFunction`, `UpdateFunctionCode` and `PublishLayerVersion` accepted a package that is not a zip (an empty file included) and answered success, `UpdateFunctionCode` keeping the previous code. They now answer `InvalidParameterValueException` `Could not unzip uploaded file. Please check your file, then try to upload again.` Contributed by @skialpine.
-- **DynamoDB — `TransactWriteItems` follows DynamoDB's check order** — an `Update` whose `ConditionExpression` failed was cancelled with `ValidationError` when its `UpdateExpression` could not be applied to the item (for example `SET #c = #c + :one` on a missing item); it now cancels with `ConditionalCheckFailed`, as `UpdateItem` answers `ConditionalCheckFailedException` for the same request. Such an update-expression error on one member no longer hides a failed condition on another: both reasons are returned, while wrong-typed keys and index keys still cancel before any condition. A missing table answers `ResourceNotFoundException` even when another member has a `ValidationError`, and a `begins_with` condition with a number operand answers `ValidationException` instead of an internal error, as on AWS. Contributed by @jun-ut.
-- **ALB — instance and IP targets receive the path as the client sent it** — the data plane forwarded the decoded path, so `%20` became a space and the request was refused with 502 (`URL can't contain control characters`), and `%2F` became `/`. The path now reaches the target with its percent-encoding, as AWS sends it; rules still match the decoded path. Contributed by @skialpine.
-- **ALB — `authenticate-oidc` on a 443 listener names its callback without the client's port** — the `redirect_uri` kept a port the client sent in `Host`. On a 443 listener it is now `https://<host>/oauth2/idpresponse`, as AWS sends it. Contributed by @skialpine.
-- **ALB — a redirect action's `Location` fills its placeholders as AWS does** — `#{protocol}` was always `http`, `#{port}` was dropped and `#{query}` was not applied, so the request's query string was lost. `#{protocol}` and `#{port}` are now the listener's, the port is always written (`http://host:80/path`), and the default `#{query}` keeps the request's query string; a configured `Query`, which was not stored, now applies and is described. Contributed by @skialpine.
-- **ALB — a Lambda target's event has the load balancer's shape** — it carried `queryStringParameters` with the first value of a repeated key, URL-decoded, plus `multiValueQueryStringParameters` and `multiValueHeaders`, and `body: null` without a body. With multi-value headers off (the default) it now carries `queryStringParameters` as the load balancer sends them, the last value of a repeated key and not decoded, no multi-value keys, and `body: ""`. Contributed by @skialpine.
-- **HTTP/1.1 status lines carry their reason phrase** — final responses were written as `HTTP/1.1 200 `, so a CloudFront Function saw an empty `statusDescription`. They now read `HTTP/1.1 200 OK`, `404 Not Found`. Contributed by @skialpine.
-- **Responses carry one `Date`** — a proxied response carried the target's `Date` and a second one from Hypercorn. The app now adds `Date` to a response that has none, including a WebSocket handshake, and Hypercorn adds none; an ALB writes its own `Date` in place of an instance or IP target's, as AWS does, and CloudFront keeps the origin's. Hypercorn's own error responses, such as a malformed request's 400 and a WebSocket handshake refused with `websocket.close`, carry one `Date` too. Contributed by @skialpine.
-- **CloudFront — `X-Amz-Cf-Id` and `Via` have CloudFront's shape** — the data plane sent 56 characters of standard base64 without padding as `X-Amz-Cf-Id` and a 13-character token in `Via`. It now sends URL-safe base64 of 40 bytes with its `==` padding, and `Via: 1.1 <32 hex>.cloudfront.net (CloudFront)`. Contributed by @skialpine.
-- **ALB — the listener's response-header attributes are applied** — `routing.http.response.access_control_*`, `strict_transport_security`, `content_security_policy`, `x_content_type_options` and `x_frame_options` `.header_value` set with `ModifyListenerAttributes` had no effect. Each non-empty value is now added to the listener's responses, replacing the target's header of that name, and `routing.http.response.server.enabled` `false` drops the load balancer's `Server: awselb/2.0`. Contributed by @skialpine.
-- **ALB and CloudFront responses carry only their own headers** — the gateway added `x-amzn-requestid` and `x-amz-request-id` to both and `Access-Control-Allow-Origin: *` to ALB responses. They now carry what the target or origin sent, plus the load balancer's or CloudFront's own: `Server: awselb/2.0` on a response the load balancer makes itself (a Lambda target's, fixed-response, redirect, authentication, its own errors), and `Server: CloudFront` when the origin sends none and a viewer-response function ran. Lambda Function URL responses carry only their own `x-amzn-RequestId`, no second request id or `x-amz-request-id`. Contributed by @skialpine.
-- **Responses carry no Hypercorn `Server` header** — every response carried `Server: hypercorn-h11`, which no AWS endpoint sends. Hypercorn no longer adds it; services that send their own `Server` are unchanged. Contributed by @skialpine.
-- **ALB — `Accept-Encoding` reaches HTTP targets** — the data plane dropped the client's `Accept-Encoding`, so a target never compressed its response. It is now forwarded, and the target's encoded response is passed through unchanged. Contributed by @skialpine.
-- **API Gateway — an HTTP API's `rawQueryString` is the query string as the client sent it** — a bare key gained an `=` (`?flag` reached the function as `flag=`). Both the Lambda proxy event and the REQUEST authorizer event now carry the request's own query string. Contributed by @skialpine.
-- **ALB — an OPTIONS request reaches the target** — the gateway answered every preflight to a load balancer address with its own wildcard CORS response. The request is now forwarded to the target like any other method. Contributed by @skialpine.
-- **ALB — the query string reaches HTTP targets unchanged** — it was rebuilt from the first value of each key, so `?page=1&page=2` arrived as `?page=1`. The request's own query string is now forwarded, including from a CloudFront distribution whose origin is the load balancer. Contributed by @skialpine.
-- **ALB — instance and IP targets receive the client's `Host`** — they got their own address as `Host`. They now get the client's, as an Application Load Balancer sends it: on a listener on port 80 or 443 without a port, on any other listener with the listener's port in place of any port the client sent; `routing.http.preserve_host_header.enabled` sends it unmodified. Lambda targets keep the `Host` exactly as sent, and authentication uses the client's `Host`. Contributed by @skialpine.
-- **Lambda — Kinesis event source mappings across accounts** — a mapping to another account's stream was refused as invalid; a function can now map a stream in another account in the same region, read from the owner's account. `CreateEventSourceMapping` reads the stream first, as AWS does, and answers "Received Exception while reading from provided stream. " followed by why it can't: "No account found for the given parameters", "Stream <name> under account <id> not found.", or, under `AUTH=true`, the read the stream's resource policy doesn't allow the function's execution role (`DescribeStream`, `DescribeStreamSummary`, `GetRecords`, `GetShardIterator`, `ListShards`). The policy is checked again on every poll, so revoking it stops delivery. Another region's stream answers "Event source region must match Lambda region <region>". Reported by @Jolley71717.
+## [1.5.33] — 2026-10-26
+
+### Added
+- **Kinesis — stream and consumer resource policies** — `PutResourcePolicy`, `GetResourcePolicy` and `DeleteResourcePolicy` answered `InvalidAction`; they now store a policy per stream or consumer, persisted and dropped with it, with AWS's checks in AWS's order: the ARN's region (`InvalidArgumentException` "The region specified in the ARN '<arn>' does not match the endpoint region"), the policy ("Policy validation error: This policy contains invalid Json", "Missing required field Version" or "Statement", and per statement the actions a stream or consumer can share and a `Resource` equal to the ARN, with the statement's line and column), then the resource ("Stream <name> under account <id> not found."). `GetResourcePolicy` without a policy answers `{"Policy": "{}"}` and `DeleteResourcePolicy` "No resource policy found for resource ARN <arn>.". Reported by @Jolley71717.
+- **Lambda — Kinesis event source mappings across accounts** — a function can map a stream in another account in the same region; `CreateEventSourceMapping` reads the stream first and answers "Received Exception while reading from provided stream. " with the reason ("No account found for the given parameters", "Stream <name> under account <id> not found.", or under `AUTH=true` the read the stream's policy doesn't allow the function's execution role), and the policy is checked again on every poll. Another region's stream answers "Event source region must match Lambda region <region>". Reported by @Jolley71717.
+- **CloudFormation — `AWS::Athena::WorkGroup`** — created with its `Description`, `State`, `Tags` and `WorkGroupConfiguration`, updated in place, replaced when `Name` changes and deleted with the stack; `Ref` returns the name and `Fn::GetAtt` `CreationTime` and the effective engine version. Reported by @mishukdutta-cz.
+
+### Fixed
+- **S3 — GET, HEAD and DELETE error order and responses** — under `AUTH=true` ordinary header-signed downloads check the endpoint and signing region before the bucket's home region, then credentials and missing buckets, and HeadObject, HeadBucket and DeleteObject check the home region first; a DELETE sent to another regional endpoint no longer deletes the object. In both auth modes a `NoSuchKey` carries `Key`, HEAD errors have an empty body and no `Content-Length`, and HeadBucket reports the bucket's region (also on a denial) and its ARN. Iceberg REST HEAD requests keep their JSON errors. Contributed by @gakuto-cw21.
+- **S3 — persisted keys that a file path can't hold survive a restart** — with `S3_PERSIST=1` a folder marker such as `project/Incoming/` came back without its slash, and keys under it, a key under another key's object (`a/b` beside `a`) or one with doubled or dot segments (`x//y`) were lost or rewritten; they are now stored by an encoded name under the bucket's `.ministack-keys` directory, and every other key keeps its path, so earlier data still loads. Reported by @jasonthagerty.
+- **ALB — requests reach targets as sent** — instance and IP targets now get the path with its percent-encoding, the query string unchanged, the client's `Host` as the load balancer sends it (no port on 80 or 443, the listener's port otherwise, unmodified with `routing.http.preserve_host_header.enabled`), the client's `Accept-Encoding`, and OPTIONS requests instead of a gateway-made CORS answer. A Lambda target's event carries the last value of a repeated query key, not decoded, no multi-value keys unless enabled, and `body: ""`. Contributed by @skialpine.
+- **ALB — responses and actions** — the load balancer's own responses (a Lambda target's, fixed-response, redirect, authentication, its errors) carry `Server: awselb/2.0` unless `routing.http.response.server.enabled` is `false`, it writes its own `Date` over an instance or IP target's, and the listener's response-header attributes (the CORS ones, `strict_transport_security`, `content_security_policy`, `x_content_type_options`, `x_frame_options`) are applied. A redirect fills `#{protocol}`, `#{port}` and `#{query}` from the listener and request (`http://host:80/path`), and `authenticate-oidc` on a 443 listener names its callback without the client's port. Contributed by @skialpine.
+- **CloudFront — response headers** — responses carry only the origin's headers plus CloudFront's own, with `X-Amz-Cf-Id` as URL-safe base64 of 40 bytes and `Via: 1.1 <32 hex>.cloudfront.net (CloudFront)`; `Server: CloudFront` is added only when a viewer-response function ran and the origin sent none, and a Lambda Function URL origin's response carries a single `x-amzn-RequestId`. Contributed by @skialpine.
+- **All services — status line, `Date` and `Server`** — HTTP/1.1 status lines carry their reason phrase (`HTTP/1.1 200 OK`), every response carries one `Date`, also a WebSocket handshake and Hypercorn's own errors, and no response carries `Server: hypercorn-h11`. Contributed by @skialpine.
+- **API Gateway — an HTTP API's `rawQueryString` is the query string as sent** — `?flag` reached the function as `flag=`; the Lambda proxy and REQUEST authorizer events now carry the request's own query string. Contributed by @skialpine.
+- **Lambda — packages, code caches and restore** — `CreateFunction`, `UpdateFunctionCode` and `PublishLayerVersion` refuse a package that is not a zip, an empty one included, with `InvalidParameterValueException` "Could not unzip uploaded file. Please check your file, then try to upload again.", leaving the function's code as it was. Two MiniStacks on one host no longer remove each other's extracted code, and restoring persisted state keeps one copy of code that versions share. Contributed by @skialpine.
+- **Lambda — Kinesis event source mapping filters** — a `FilterCriteria` pattern never matched a Kinesis record, so a filtered mapping dropped everything; metadata fields such as `partitionKey` now match at the top of the pattern and `data` as base64-decoded JSON, and data that isn't JSON still matches metadata patterns. Contributed by @Jolley71717.
+- **DynamoDB — `TransactWriteItems` follows DynamoDB's check order** — an `Update` whose condition failed is cancelled with `ConditionalCheckFailed` even when its update expression can't be applied to the item, an update-expression error on one member no longer hides a failed condition on another, a missing table answers `ResourceNotFoundException`, and a `begins_with` condition with a number operand answers `ValidationException`. Contributed by @jun-ut.
+- **Step Functions — JSONata on `Map`, `Parallel` and variables** — an inline `Map` evaluates `Items`, `ItemSelector`, `MaxConcurrency`, `Output` and `Assign` (an `Items` that isn't an array fails with `States.QueryEvaluationError`), a `Catch` on `Map` or `Parallel` applies its `Output` and `Assign`, and a variable assigned `null` reads back as `null`. Contributed by @mishukdutta-cz.
+- **Glue — Spark job arguments and botocore** — Spark scripts get `--JOB_NAME` and `--JOB_RUN_ID` (a run's `Arguments` still win, `pythonshell` scripts don't get them), and a job's own botocore loads from where the script asks, so a `--py-files` zip that holds botocore no longer fails with `DataNotFoundError`. Contributed by @mishukdutta-cz.
+- **OpenSearch — engine heap and the container reaper** — engine containers run with a 512 MB heap instead of the image's 1 GB, and the reaper no longer removes a live domain's stopped engine. Contributed by @skialpine.
## [1.5.32] — 2026-10-23
diff --git a/pyproject.toml b/pyproject.toml
index b3a516c5..f0c8ddee 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "ministack"
-version = "1.5.32"
+version = "1.5.33"
description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"
readme = "README.md"
license = { file = "LICENSE" }