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.4.4 (#1142)
Nahuel Nucera4098200a7609
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 43a1dcd6..97877e95 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,18 +7,24 @@ Versioning follows [Semantic Versioning](https://semver.org/).## [Unreleased]+## [1.4.4] — 2026-07-22+### Added-- **RDS — `DisableHttpEndpoint`** — the Data API HTTP endpoint on an Aurora cluster could be enabled via `EnableHttpEndpoint` but never disabled: `DisableHttpEndpoint` returned `InvalidAction: Unknown RDS action: DisableHttpEndpoint`, which broke workflows that turn the endpoint off before resizing a cluster to a Data-API-incompatible instance class. The action now mirrors `EnableHttpEndpoint`: it sets `HttpEndpointEnabled` to `false` on the cluster matching `ResourceArn` and returns `DBClusterNotFoundFault` when no cluster matches. Contributed by @jayjanssen.-- **ALB — data-plane forwarding to `instance`/`ip` targets** — the ALB data plane previously routed live traffic to Lambda targets only; forwarding to an `instance` or `ip` target group returned `502 Target type not supported`. Requests are now proxied over HTTP to the registered target, using the target `Id` as the host (an IP address for `ip` target groups; for `instance` target groups the `Id` is resolved as a hostname, since an emulator has no EC2 metadata to resolve instance ids against). Mirrors real ALB behavior: hop-by-hop headers are stripped, `X-Forwarded-For`/`X-Forwarded-Proto`/`X-Forwarded-Port` and a per-request `X-Amzn-Trace-Id` are injected, the target's HTTP error responses pass through unchanged, and connection failures surface as `502 Bad Gateway`. Multiple registered targets are balanced per-request. Existing listener rule conditions and `forward`/`redirect`/`fixed-response` actions apply unchanged. Contributed by @jasondcamp.-- **ElastiCache — Valkey engine support** — `Engine=valkey` previously fell into the memcached branch of the container spawner: a nonexistent `memcached:<version>-alpine` image was requested, the spawn failed, and the cluster silently fell back to the shared sidecar advertising memcached's port 11211. `CreateCacheCluster` and `CreateReplicationGroup` now spawn a real `valkey/valkey:<major.minor>-alpine` container (AWS-supported versions 7.2, 8.0, 8.1) on port 6379, the no-Docker fallback advertises the Redis sidecar port, the default `EngineVersion` for valkey is `8.0` (previously memcached's `1.6.17`), and `DescribeCacheEngineVersions` lists valkey versions with their `valkey7`/`valkey8` parameter-group families (the `default.valkey*` groups already existed). `ELASTICACHE_CLUSTER_MODE_REAL` replication groups accept valkey too — the official valkey image ships `redis-*` compatibility symlinks, so the cluster bootstrap (`redis-cli --cluster create`) works unchanged.-- **IoT — device shadow operations** — `GetThingShadow`, `UpdateThingShadow`, and `DeleteThingShadow` on the `iot-data` endpoint (classic and named shadows via `?name=`) previously returned `InvalidRequestException: Unsupported iot-data path: .../shadow`. Shadows now store `desired`/`reported` state: updates deep-merge into the stored document (a `null` value removes the field), bump the version, and stamp per-field `metadata` timestamps; the `/accepted` response echoes only the sections sent, while `GetThingShadow` returns the full document including the computed `state.delta` (desired fields that differ from reported). A stale `version` in an update is rejected with a `409`, and reading or deleting a nonexistent shadow returns `ResourceNotFoundException`. Shadows are account-scoped and persisted with the rest of the IoT state.-- **KMS — `GenerateDataKeyPair` and `GenerateDataKeyPairWithoutPlaintext`** — the emulator implemented `GenerateDataKey` and `GenerateDataKeyWithoutPlaintext` but no data key *pair* operation, so both returned `InvalidAction: Unknown action`. These provision an asymmetric data key pair wrapped under a symmetric CMK: `GenerateDataKeyPair` returns `PrivateKeyPlaintext`, `PrivateKeyCiphertextBlob` and `PublicKey`, while the `WithoutPlaintext` variant omits `PrivateKeyPlaintext` so the private key never reaches the caller in the clear — the caller persists the ciphertext plus public key and nothing else. Supported `KeyPairSpec` values follow the real AWS enum — `RSA_2048/3072/4096`, `ECC_NIST_P256/P384/P521`, `ECC_SECG_P256K1`, `ECC_NIST_EDWARDS25519` (`SM2` is excluded, as `CreateKey` does not implement it either). Note this is a superset of what `CreateKey` accepts today: `CreateKey` still lacks `RSA_3072`, a pre-existing gap these operations do not share. The wrapping CMK must be symmetric, `EncryptionContext` binds the wrapped private key as it does for `Encrypt`, and the blob decrypts back to a PKCS#8 DER private key that pairs with the returned public key. The wrapped private key uses the emulator's ciphertext layout, now extended with a per-blob random nonce (`key_id(36) + context_hash(32) + nonce(16) + data`) that is mixed into key derivation; `Decrypt` reads these blobs exactly as it reads `Encrypt`'s and `GenerateDataKey`'s. The nonce is required for correctness of the `WithoutPlaintext` guarantee: without it the XOR keystream repeats across every blob sharing a CMK and `EncryptionContext`, and because a key pair's plaintext embeds its (public) modulus, the wrapped private key could be recovered from the public outputs alone. `Encrypt` and `GenerateDataKey` adopt the same nonced layout so all three wrap through an identical format.-- **API Gateway v1 — `AWS::ApiGateway::GatewayResponse` CloudFormation support** — CDK/CloudFormation stacks that customize REST API errors such as `BAD_REQUEST_BODY`, `DEFAULT_4XX`, or `UNAUTHORIZED` now provision instead of rolling back with `Unsupported resource type`. The v1 control plane adds `PutGatewayResponse`, `GetGatewayResponse`, `GetGatewayResponses`, and `DeleteGatewayResponse`; customizations are account-scoped and persisted, mutable CFN properties update in place, `RestApiId`/`ResponseType` changes replace the resource, and deletion restores API Gateway's generated default response. Reported by @robert-pitt-foodhub (#1124).+- **RDS — `DisableHttpEndpoint`** — the Aurora Data API HTTP endpoint could be enabled via `EnableHttpEndpoint` but never disabled: `DisableHttpEndpoint` returned `InvalidAction`. It now mirrors enable, setting `HttpEndpointEnabled` to `false` on the cluster matching `ResourceArn`. Contributed by @jayjanssen.+- **ALB — data-plane forwarding to `instance`/`ip` targets** — the ALB data plane routed live traffic to Lambda targets only; `instance`/`ip` target groups returned `502 Target type not supported`. Requests are now proxied over HTTP to the registered target with hop-by-hop headers stripped, `X-Forwarded-*` and `X-Amzn-Trace-Id` injected, and connection failures surfaced as `502`. Contributed by @jasondcamp.+- **ElastiCache — Valkey engine** — `Engine=valkey` fell into the memcached branch, requesting a nonexistent image and falling back to memcached's port 11211. `CreateCacheCluster`/`CreateReplicationGroup` now spawn a real `valkey/valkey:<major.minor>-alpine` container on port 6379 (AWS versions 7.2, 8.0, 8.1), and `DescribeCacheEngineVersions` lists them. Contributed by @jasondcamp.+- **KMS — `GenerateDataKeyPair` and `GenerateDataKeyPairWithoutPlaintext`** — the emulator had `GenerateDataKey` but no data-key-*pair* operation, so both returned `InvalidAction`. They now generate an asymmetric data key pair wrapped under a symmetric CMK (the `WithoutPlaintext` variant omits `PrivateKeyPlaintext`) across the AWS `KeyPairSpec` enum, `SM2` excluded. Contributed by @yl.+- **API Gateway v1 — `AWS::ApiGateway::GatewayResponse` (CloudFormation)** — CDK/CloudFormation stacks customizing REST API errors rolled back with `Unsupported resource type`. The v1 control plane now serves `PutGatewayResponse`/`GetGatewayResponse(s)`/`DeleteGatewayResponse`, and the resource provisions with in-place updates and generated-default restore on delete. Contributed by @robert-pitt-foodhub.+- **Cognito — `NEW_PASSWORD_REQUIRED` in the Hosted UI** — a first-login `FORCE_CHANGE_PASSWORD` user was let straight through the managed-login endpoint, issuing an OAuth code without ever changing the temporary password. The Hosted UI now shows a change-password form, enforces the pool policy, and completes to the code once the password is set. Contributed by @kjdev.+- **s3tables — CloudFormation and Iceberg REST** — `AWS::S3Tables::TableBucket`/`Namespace`/`Table` now provision through CloudFormation, and the Iceberg REST catalog surface (config, namespaces, tables, load-table, commit) is served for table buckets, backed by DuckDB. Contributed by @squirmy.+- **RDS — Aurora shared-storage model** — cluster members previously provisioned diverging per-instance databases. They now share one cluster-owned container, so tables, users, and grants created through one member are visible through the writer and reader endpoints and the RDS Data API. Contributed by @Areson.+- **Region scoping — EventBridge Scheduler, CodeBuild, and Resource Groups** — state is now isolated by account and region, so same-named resources in different regions no longer collide. Persisted state carries a versioned regional schema that an older binary refuses rather than misreads. Contributed by @Areson.### Fixed-- **Lambda — Node warm-worker invoke no longer fails on fd 1 writes** — `fs.writeSync` / `fs.write` on stdout bypassed the existing `process.stdout.write` redirect to stderr (#373), so sync loggers (e.g. pino with `{ sync: true }`) could emit on the JSON-line protocol channel and surface false `Runtime.HandlerError` / `Unknown error` responses even when the handler succeeded. The Node worker bootstrap now redirects fd 1 through `fs.writeSync` / `fs.write`, and the warm-worker stdout reader accepts only protocol lines whose `status` is `ok` or `error`. Reported by @kofuk (#1093).-- **Cognito — `ListUsers` `status` filter matched against the wrong field** — `Filter='status = "Enabled"'`/`"Disabled"` was compared against `UserStatus` (the confirmation-state enum: `CONFIRMED`, `FORCE_CHANGE_PASSWORD`, `UNCONFIRMED`, etc.), which never equals the literal string `"Enabled"`/`"Disabled"`. As a result, filtering by `status` always returned an empty list, regardless of how many users existed or their actual enabled/disabled state. `status` now correctly reflects the account's `Enabled` boolean toggled by `AdminEnableUser`/`AdminDisableUser`, matching real AWS Cognito's `ListUsers` Filter semantics. Contributed by @jey-mfv.-- **Batch — `UpdateComputeEnvironment`** — Terraform `aws_batch_compute_environment` with an `update_policy` block calls `UpdateComputeEnvironment`, which previously failed with `InvalidAction: Unsupported batch path: /v1/updatecomputeenvironment`. The endpoint now resolves compute environments by name or ARN, applies present fields (`state`, `serviceRole`, shallow-merged `computeResources`, `updatePolicy`, `unmanagedvCpus`, `context`), and returns them from `DescribeComputeEnvironments`. Reported by @smoores-dev (#1088).+- **Batch — `UpdateComputeEnvironment`** — Terraform `aws_batch_compute_environment` with an `update_policy` block failed with `InvalidAction`. `UpdateComputeEnvironment` now resolves the compute environment by name or ARN and applies `state`, `serviceRole`, `computeResources`, `updatePolicy`, `unmanagedvCpus`, and `context`. Reported by @smoores-dev.+- **S3 — empty object tag value** — a bare `x-amz-tagging` key with no `=value` was dropped instead of stored. Empty tag values are now preserved as a tag with an empty value, matching real S3. Contributed by @murlock.+- **EC2 — `DescribeSecurityGroupRules` by rule id** — the operation ignored `SecurityGroupRuleIds` (a group filter was required) and rule ids shifted when another rule on the group was revoked. Rule ids are now stable and content-derived and `SecurityGroupRuleIds` is honored, fixing Terraform `aws_vpc_security_group_ingress_rule` refresh. Reported by @staranto.+- **Lambda — docker worker respawn on config change** — with `LAMBDA_EXECUTOR=docker`, `UpdateFunctionConfiguration` left the old container running with stale config because the reaper matched the pre-region-scoping key shape. It now reaps the function's containers so the next invocation uses the new configuration. Reported by @ykharko.## [1.4.3] — 2026-07-18diff --git a/README.md b/README.mdindex ef1d88a9..fa8e6416 100644--- a/README.md+++ b/README.md@@ -215,7 +215,7 @@ use1.list_tables()["TableNames"] # → ["users"]euw1.list_tables()["TableNames"] # → [] — eu-west-1 is independent```-**Region-isolated services:** AppConfig, Bedrock (all four services), CloudWatch, CloudWatch Logs, DynamoDB (tables, metadata, Streams), Lambda (functions, event source mappings, durable executions), MSK, RDS, S3 Tables, Secrets Manager, SQS, SSM Parameter Store, and Step Functions (1.4.0); EventBridge Pipes (1.4.1); SNS, Kinesis, KMS, and ElastiCache (1.4.2); EventBridge, ECS, and Firehose (1.4.3).+**Region-isolated services:** AppConfig, Bedrock (all four services), CloudWatch, CloudWatch Logs, DynamoDB (tables, metadata, Streams), Lambda (functions, event source mappings, durable executions), MSK, RDS, S3 Tables, Secrets Manager, SQS, SSM Parameter Store, and Step Functions (1.4.0); EventBridge Pipes (1.4.1); SNS, Kinesis, KMS, and ElastiCache (1.4.2); EventBridge, ECS, and Firehose (1.4.3); EventBridge Scheduler, CodeBuild, and Resource Groups (1.4.4).Cross-resource references resolve in the referenced ARN's own account and region (SNS→SQS fanout, EventBridge targets, event source mappings), and cross-region references that real AWS rejects return the same errors AWS returns — e.g. invoking a `eu-west-1` Lambda from a `us-east-1` Step Functions task fails with `Functions from 'eu-west-1' are not reachable in this region`, exactly as on AWS.diff --git a/ministack/services/cloudformation/provisioners.py b/ministack/services/cloudformation/provisioners.pyindex 855cbb6c..ccb7857e 100644--- a/ministack/services/cloudformation/provisioners.py+++ b/ministack/services/cloudformation/provisioners.py@@ -4409,8 +4409,9 @@ def _s3tables_table_create(logical_id, props, stack_name):if b["arn"] == bucket_arn:b["tableCount"] = b.get("tableCount", 0) + 1break- return table_arn, {"TableArn": table_arn, "TableBucketARN": bucket_arn,- "Namespace": namespace, "TableName": table_name}+ return table_arn, {"TableARN": table_arn, "TableBucketARN": bucket_arn,+ "WarehouseLocation": location, "Namespace": namespace,+ "TableName": table_name}def _s3tables_table_delete(physical_id, props):diff --git a/ministack/services/cognito.py b/ministack/services/cognito.pyindex 82d2f6db..7c3a7c67 100644--- a/ministack/services/cognito.py+++ b/ministack/services/cognito.py@@ -5120,3 +5120,5 @@ def reset():_auth_codes.clear()_authorization_codes.clear()_refresh_tokens.clear()+ _challenge_sessions.clear()+ _pending_new_password.clear()diff --git a/ministack/services/rds.py b/ministack/services/rds.pyindex 6fa09ceb..692be478 100644--- a/ministack/services/rds.py+++ b/ministack/services/rds.py@@ -4113,6 +4113,9 @@ def _enable_http_endpoint(p):def _disable_http_endpoint(p):arn = _p(p, "ResourceArn")+ wrong_region = _resource_not_found_error_for_arn(arn)+ if wrong_region:+ return wrong_regionfor cluster in _clusters.values():if cluster.get("DBClusterArn") == arn:cluster["HttpEndpointEnabled"] = Falsediff --git a/pyproject.toml b/pyproject.tomlindex 25e72585..c7b273b7 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "ministack"-version = "1.4.3"+version = "1.4.4"description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"readme = "README.md"license = { file = "LICENSE" }diff --git a/tests/test_cfn.py b/tests/test_cfn.pyindex 582a08a0..a736fa14 100644--- a/tests/test_cfn.py+++ b/tests/test_cfn.py@@ -4674,7 +4674,7 @@ def test_cfn_s3tables_resources(cfn, s3tables):},"Outputs": {"BucketArn": {"Value": {"Fn::GetAtt": ["Bucket", "TableBucketARN"]}},- "TableArn": {"Value": {"Fn::GetAtt": ["Table", "TableArn"]}},+ "TableArn": {"Value": {"Fn::GetAtt": ["Table", "TableARN"]}},},}