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.5.1 (#1520)
Nahuel Nuceraedc35308c57e
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex a98ab0e9..e474a72d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,25 +7,31 @@ Versioning follows [Semantic Versioning](https://semver.org/).## [Unreleased]-### Added-- **SNS — `GetPlatformApplicationAttributes` / `SetPlatformApplicationAttributes`** — a platform application could be created and deleted but never read back or updated: both actions answered `400 InvalidAction`, so `terraform plan` on an `aws_sns_platform_application` failed at refresh (`reading SNS Platform Application (...): Unknown action: GetPlatformApplicationAttributes`) and the resource could never reach a clean state. Both now answer with the documented shapes — `Get` returns the attribute map as `entry` key/value pairs, `Set` merges the supplied entries (`PlatformCredential`, `PlatformPrincipal`, the `Event*` topic ARNs, `*FeedbackRoleArn`, `Enabled`, ...) and returns only `ResponseMetadata` — with `InvalidParameter` (400) for a missing `PlatformApplicationArn` or `Attributes` and `NotFound` (404) for an unknown application. `CreatePlatformApplication` also seeds `Enabled=true`, as AWS reports for a newly created application.+## [1.5.1] — 2026-08-25-### Fixed-- **IAM — a resource-scoped policy works for JSON-protocol services (`AUTH=true`)** — `extract_resource_arn` read SQS, ACM, SSM and CloudWatch parameters from the query form only. SQS moved to the JSON protocol in 2023 and the others accept it, so for current SDKs nothing reached the query params, the resource fell back to `*`, and no queue-, certificate-, parameter- or alarm-scoped statement could match: every least-privilege policy for those services denied every call, while `Resource: "*"` allowed them. Those branches now read the request body and fall back to the query form, and SQS also resolves a queue addressed by request path. Reported by @rsimples.-- **IAM — `kms:Decrypt` resolves the key from the ciphertext (`AUTH=true`)** — `Decrypt` and `ReEncrypt` carry no `KeyId` for a symmetric key, since AWS recovers it from metadata in the ciphertext blob and evaluates IAM against that key's ARN. MiniStack fell back to `*`, so a policy naming the key allowed `Encrypt` and denied `Decrypt` for the same key. The key id is now recovered from the blob the same way the KMS handler recovers it. Reported by @rsimples.-- **Lambda — `CreateFunction` with an unresolvable role answers 400, not 500 (`AUTH=true`)** — the role check sat inside `_build_config`, which is declared to return a config dict, so its error tuple was assigned to `config` and the next attribute read raised `AttributeError: 'tuple' object has no attribute 'get'`; the client got `500 InternalError` with nothing about the role, and a half-created record was left behind for a background thread to trip over. The role is now validated before anything is built or stored, and the caller answers `400 InvalidParameterValueException`. Reported by @rsimples.-- **Cognito — group membership records the resolved Username** — `AdminAddUserToGroup` stored the caller-supplied name in the group's member list, but the list is read back as `_users` keys. In a pool with `UsernameAttributes = ["email"]` that name is an email alias, not the key, so `ListUsersInGroup` returned an empty list for a group that had just accepted the user, `AdminRemoveUserFromGroup` did not match the entry it had added, and `DeleteGroup` left the group on the user's own group list. Both operations now key on the resolved Username.-- **Cognito — `AdminDeleteUser` deletes the user an email alias resolves to** — in a pool with `UsernameAttributes = ["email"]`, `AdminCreateUser` stores the user under a generated UUID Username and keeps the email as an alias attribute, as real Cognito does. `AdminDeleteUser` resolved the alias correctly but then deleted by the caller-supplied name, which is not the key, so the call raised `KeyError` and answered `500 InternalError` while the user survived. A seed or test fixture that deletes and creates the same user therefore failed with `UsernameExistsException` on every run after the first. The delete now uses the resolved Username.-- **S3 — a presigned upload no longer drops the `x-amz-*` headers it was signed with** — a presigned URL is sent by a caller who has only the URL and a body, so SigV4 lets the `x-amz-*` headers an operation asked for be hoisted into the query string, where the signature covers them exactly as a signed header would. SDKs presign that way and real S3 applies those params as the headers they stand for. MiniStack only ever read headers, so a presigned `PutObject` carrying user metadata in its query string answered `200` and stored the object with no metadata at all. Hoisted `x-amz-*` params are now folded back into the request headers before routing (user metadata, storage class, tagging, ACL, SSE and copy source) while an explicitly sent header still wins over its hoisted twin, and the SigV4 signing params are never mistaken for one. Contributed by @dennmart.-- **CloudFormation — `Fn::Sub` honors the `${!Literal}` escape** — the leading `!` was not recognized, so the name fell through every lookup and rendered as `!Literal` with the braces consumed; `${!Literal}` now renders as the literal `${Literal}` and no longer registers a dependency on a resource of that name. An `AWS::IoT::Policy` pinned to `${!iot:Connection.Thing.ThingName}` deployed with a document matching nothing, so the policy denied every connect, publish and subscribe while the stack still reported `CREATE_COMPLETE`. Reported by @iot-rocket.### Added-- **RDS — RDS Proxy (control plane)** — `CreateDBProxy` and the twelve other proxy operations answered `InvalidAction`, so a Terraform, CloudFormation or Crossplane definition of an `aws_db_proxy` could not be applied at all. Proxies, proxy endpoints, the default target group and registered instance and cluster targets now create, describe, modify and delete with the documented shapes, defaults (`IdleClientTimeout` 1800, `MaxConnectionsPercent` 100 or 10 on SQL Server, `ConnectionBorrowTimeout` 120) and faults (`DBProxyAlreadyExistsFault`, `DBProxyNotFoundFault`, `DBProxyEndpointNotFoundFault`, `DBProxyTargetGroupNotFoundFault`, `DBProxyTargetAlreadyRegisteredFault`, `DBProxyQuotaExceededFault`, `DBProxyEndpointQuotaExceededFault`, `InvalidDBProxyEndpointStateFault`, `InvalidSubnet`). Creating a proxy also creates its default read/write endpoint and its `default` target group, as AWS does; the default endpoint refuses modification and deletion, `Marker` / `MaxRecords` paginate, and the documented constraints are enforced (`IdleClientTimeout` 1-28,800, `MaxConnectionsPercent` 1-100, `ConnectionBorrowTimeout` 0-300, `MaxIdleConnectionsPercent` between 0 and `MaxConnectionsPercent` and defaulting to half of it, `Auth` required unless `DefaultAuthScheme` is `IAM_AUTH`, one target per proxy, and a target whose engine the proxy's `EngineFamily` supports). This is metadata only: no connection pooling happens and nothing listens on the proxy endpoint hostname. Reported by @jmreicha.-- **EC2 — opt-in launch options for instance containers (`EC2_DOCKER_FLAGS`)** — a registered image that boots an operating system (systemd as PID 1) needs container options the fixed launch arguments cannot express: unprivileged, `unshare` fails with `Operation not permitted` and the instance terminates at boot. `EC2_DOCKER_FLAGS` now takes a docker-CLI-style string (`--privileged`, `--cap-add`, `-e`, `-v`, `--tmpfs`, `--add-host`, `-m`, `--shm-size`) applied to every instance container; unset, nothing changes. `--init` is refused — instance containers always run with init. Contributed by @iot-rocket.-### Fixed-- **EventBridge — dotted pattern keys resolve to the nested path** — [Event Ruler](https://github.com/aws/event-ruler) joins keys with `.` when compiling, so `{"detail.name": [...]}` and `{"detail": {"name": [...]}}` are the same sub-rule on AWS (verified with `TestEventPattern` against the real service); the 1.4 matcher rewrite read a dotted key as one literal segment, so such a rule silently matched nothing — consumer rules written in the dotted form delivered on 1.3.x and stopped after upgrading. Pattern keys are now split on `.` when the compiler extends the path, composing with `$or` expansion, value-side operators, and leaf/object collision handling. The residual divergence — an event *field* literally named `a.b` flattens to the same path on AWS but stays one key here — remains pinned by test; Ruler documents that collision as behaviour that "should not be relied upon". Contributed by @prandogabriel.-- **IoT Core — an unresolvable action role fails `CreateTopicRule` instead of silently dropping the rule (`AUTH=true`)** — the role check added with the IAM request authorization answered `200 {}` while storing nothing: the store-layer helper returned the error response as a value and both API handlers discarded it, so a client (or a CloudFormation stack) saw success minus its rule. The check now raises through the same door as invalid rule SQL, `CreateTopicRule` / `ReplaceTopicRule` answer `400 InvalidRequestException` (`Unable to assume role: {arn}`) as real IoT does when it cannot assume the role, and the CloudFormation provisioner fails the resource. With `AUTH=false` nothing changes. Reported by @iot-rocket.-- **RDS — Aurora PostgreSQL major-version selectors return the matching catalog** — `DescribeDBEngineVersions` treated `EngineVersion=16` as an exact version and returned nothing. Major-only selectors now return every advertised minor in that family, and `DefaultOnly=true` narrows the result to AWS's configured default minor for that major.+- **SNS — `GetPlatformApplicationAttributes` / `SetPlatformApplicationAttributes`** — both actions answered `400 InvalidAction`, so `terraform plan` on an `aws_sns_platform_application` failed at refresh. `Get` returns the attribute map, `Set` merges the supplied entries, with `InvalidParameter` (400) for a missing parameter and `NotFound` (404) for an unknown application; `CreatePlatformApplication` also seeds `Enabled=true`, as AWS reports for a new application. Contributed by @jgrumboe.+- **Step Functions — `States.StringSplit` and `States.Hash` intrinsics** — both raised `States.Runtime: Unsupported intrinsic function`, and splitting `$$.Execution.Id` on `:` is how a machine recovers its own region and account id. `StringSplit` treats every character of its second argument as a delimiter and keeps no empty member; `Hash` computes the five published algorithms as lowercase hex, shares the base64 intrinsics' 10,000-character cap, and refuses any other algorithm. Contributed by @bandle.+- **RDS — RDS Proxy (control plane)** — `CreateDBProxy` and the twelve other proxy operations answered `InvalidAction`, so an `aws_db_proxy` definition could not be applied at all. Proxies, endpoints, the default target group and registered targets now create, describe, modify and delete with the documented shapes, defaults, constraints and faults; creating a proxy also creates its default endpoint and `default` target group, as AWS does. Metadata only — nothing listens on the proxy hostname. Reported by @jmreicha.+- **EC2 — opt-in launch options for instance containers (`EC2_DOCKER_FLAGS`)** — an image that boots an operating system (systemd as PID 1) needs container options the fixed launch arguments cannot express. `EC2_DOCKER_FLAGS` takes a docker-CLI-style string (`--privileged`, `--cap-add`, `-e`, `-v`, ...) applied to every instance container; unset, nothing changes, and `--init` is refused. Contributed by @iot-rocket.+### Changed+- **Docker — the slim image ships the MySQL IAM auth plugins** — the plugins were compiled only into the `-full` flavor, so on the slim image Aurora MySQL IAM authentication silently disabled itself. The slim build now copies the plugin tree from the published full image, pinned to the release's digest so both flavors carry the same tree. Contributed by @Areson.++### Fixed+- **IAM — a resource-scoped policy works for JSON-protocol services (`AUTH=true`)** — `extract_resource_arn` read SQS, ACM, SSM and CloudWatch parameters from the query form only, so for current SDKs the resource fell back to `*` and every queue-, certificate-, parameter- or alarm-scoped statement denied. The request body is now read too, and SQS also resolves a queue addressed by path. Reported by @rsimples.+- **IAM — `kms:Decrypt` resolves the key from the ciphertext (`AUTH=true`)** — `Decrypt` and `ReEncrypt` carry no `KeyId` for a symmetric key, so the resource fell back to `*` and a policy naming the key allowed `Encrypt` but denied `Decrypt`. The key id is now recovered from the ciphertext blob the same way the KMS handler recovers it. Reported by @rsimples.+- **Lambda — `CreateFunction` with an unresolvable role answers 400, not 500 (`AUTH=true`)** — the role check's error was swallowed inside config building, so the client got `500 InternalError` and a half-created record was left behind. The role is now validated before anything is stored, answering `400 InvalidParameterValueException`. Reported by @rsimples.+- **Cognito — group membership records the resolved Username** — `AdminAddUserToGroup` stored the caller-supplied name, which in a `UsernameAttributes = ["email"]` pool is an alias rather than the user key, so `ListUsersInGroup` dropped the member and `AdminRemoveUserFromGroup` never matched it. Both now key on the resolved Username. Contributed by @Lukasdoe.+- **Cognito — `AdminDeleteUser` deletes the user an email alias resolves to** — the delete was keyed on the caller-supplied name after resolving the alias, so it raised `KeyError`, answered `500 InternalError`, and the user survived; a delete-then-create seed failed `UsernameExistsException` on every run after the first. Contributed by @Lukasdoe.+- **S3 — a presigned upload no longer drops the `x-amz-*` headers it was signed with** — SigV4 lets a presigned URL hoist the operation's `x-amz-*` headers into the query string, and real S3 applies them as the headers they stand for; MiniStack only read headers, so a presigned `PutObject` stored the object without its metadata. Hoisted params are now folded back into the headers before routing, an explicitly sent header still winning. Contributed by @dennmart.+- **S3 — a supplied checksum is verified, however it arrives** — an `x-amz-checksum-*` value was only checked when the request also named `x-amz-sdk-checksum-algorithm`, so a mismatched value was stored unread and echoed on later reads as though verified, and a checksum sent as an `aws-chunked` trailer never arrived at all. Every supplied value is now recomputed (`BadDigest` on mismatch) and trailing headers are lifted into the request headers. Contributed by @gaul.+- **Step Functions — the `aws-sdk:cloudwatchlogs` integration routes** — Step Functions names CloudWatch Logs by its SDK service id, so the documented `arn:aws:states:::aws-sdk:cloudwatchlogs:createLogGroup` failed `States.Runtime` before dispatch; only the endpoint-prefix spelling `logs`, which AWS does not accept, was registered. The documented name now dispatches, takes PascalCase `Parameters`, and surfaces errors as `CloudWatchLogs.*`. Contributed by @bandle.+- **Glue — a Spark job's own SDK clients reach MiniStack** — only the S3A endpoint was configured, so a bare `boto3.client("s3")` in a job script escaped to real AWS and failed `InvalidAccessKeyId`. The container now carries `AWS_ENDPOINT_URL`, and because the Glue 4.0 image's botocore predates that variable, a bootstrap defaults every client's `endpoint_url` before running the script unchanged.+- **CloudFormation — `Fn::Sub` honors the `${!Literal}` escape** — the leading `!` was not recognized, so `${!Literal}` rendered as `!Literal` with the braces consumed and registered a false dependency; an `AWS::IoT::Policy` pinned to `${!iot:Connection.Thing.ThingName}` deployed with a document matching nothing. It now renders as the literal `${Literal}`. Contributed by @maximoosemine. Reported by @iot-rocket.+- **EventBridge — dotted pattern keys resolve to the nested path** — Event Ruler joins keys with `.`, so `{"detail.name": [...]}` and the nested spelling are the same rule on AWS, but the 1.4 matcher read a dotted key as one literal segment and such a rule silently matched nothing; dotted-form rules that delivered on 1.3.x stopped after upgrading. Pattern keys are now split on `.` when the compiler extends the path. Contributed by @prandogabriel.+- **IoT Core — an unresolvable action role fails `CreateTopicRule` instead of silently dropping the rule (`AUTH=true`)** — the role-check error was discarded and the API answered `200 {}` while storing nothing. `CreateTopicRule` / `ReplaceTopicRule` now answer `400 InvalidRequestException` (`Unable to assume role: {arn}`) as real IoT does, and the CloudFormation provisioner fails the resource. Contributed by @iot-rocket.+- **RDS — Aurora PostgreSQL major-version selectors return the matching catalog** — `DescribeDBEngineVersions` treated `EngineVersion=16` as an exact version and returned nothing; major-only selectors now return every advertised minor in that family, and `DefaultOnly=true` narrows to AWS's configured default minor for that major. Contributed by @jayjanssen.## [1.5.0] — 2026-08-23diff --git a/pyproject.toml b/pyproject.tomlindex 6364f588..b0f37be3 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "ministack"-version = "1.5.0"+version = "1.5.1"description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"readme = "README.md"license = { file = "LICENSE" }