Skip to content

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

release v1.4.19 (#1421)

Nahuel Nucera2cc9c6ec1982
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 159332fc..4d2cd24b 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -48,6 +48,7 @@ body:
- Glue
- IAM
- IMDS
+ - IoT Core
- Kinesis
- KMS
- Lambda
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a7809d23..3ff98761 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,8 +7,20 @@ Versioning follows [Semantic Versioning](https://semver.org/).
## [Unreleased]
+## [1.4.19] — 2026-08-16
+
+### Added
+- **IoT Core — device shadows over MQTT** — the classic and named device-shadow operations are now served over the broker at the AWS reserved topics. Publishing to `$aws/things/<thing>/shadow[/name/<name>]/{get,update,delete}` drives the same shadow store the HTTP data plane uses and replies on the matching `accepted` / `rejected` topics; an `update` also publishes `delta` (when `desired` and `reported` differ) and `documents` (with `previous`/`current`, delta stripped). Malformed JSON is rejected on the verb's `rejected` topic, and every response echoes the request's `clientToken`, as on AWS. Contributed by @iot-rocket.
+- **IoT Core — `sqs` topic-rule action** — a rule carrying `{"sqs": {"queueUrl", "roleArn", "useBase64"}}` was stored and then dispatched nothing. The payload now goes through SQS's own `SendMessage`, so the queue's `DelaySeconds` and size limit apply; `useBase64` Base64-encodes the body as on AWS; an unresolvable queue fails that action alone and reaches the rule's `errorAction`; FIFO destinations are refused, which AWS does not support for this action. Contributed by @iot-rocket.
+- **IoT Core — CA-certificate registry and just-in-time-registration events** — `GetRegistrationCode`, `DeleteRegistrationCode`, `RegisterCACertificate` (`setAsActive` / `allowAutoRegistration` as query parameters), `DescribeCACertificate`, `UpdateCACertificate`, `ListCACertificates` and `DeleteCACertificate` are served. Deleting an ACTIVE CA is refused with `CertificateStateException` (406), a duplicate CA is `ResourceAlreadyExistsException` (409), and `RegisterCertificate` validates `caCertificatePem` against the registered, actually-signing CA before storing anything, answering `CertificateValidationException` (400) otherwise. Registering a device certificate under an ACTIVE auto-registration CA publishes the JITR lifecycle event to `$aws/events/certificates/registered/{caCertificateId}`. Deleting an ACTIVE device certificate now answers the modeled `CertificateStateException` (406) instead of a generic 409. Contributed by @iot-rocket.
+- **IoT Core — MQTT 5.0 negotiated per connection** — the broker negotiates its wire format from the CONNECT packet's protocol level: a 5.0 client receives property blocks, subscription options and reason codes on CONNACK/SUBACK/PUBACK/UNSUBACK/DISCONNECT, a 3.1.1 client keeps getting the exact bytes it did before, and a message crosses between the two versions. The CONNACK advertises AWS's server capabilities — `Maximum QoS` 1 (no QoS 2), `Maximum Packet Size` 128 KB, `Retain Available`, wildcard subscriptions — and features the broker does not implement (topic aliases, shared subscriptions, subscription identifiers) are advertised as unavailable rather than left silent. Contributed by @iot-rocket.
+- **IoT Core — `connectivity.*` terms in the fleet index** — with `thingConnectivityIndexingMode: STATUS` in the indexing configuration, `SearchIndex` answers `connectivity.connected`, `connectivity.timestamp` and `connectivity.disconnectReason`, every hit carries the `connectivity` group, and `DescribeIndex`'s schema reports `..._AND_CONNECTIVITY_STATUS`. `connected` is derived from the live session registry — a thing is connected while a session whose client id equals the thing name is live — so it cannot drift or survive a restart, and the disconnect reason is one of `CLIENT_INITIATED_DISCONNECT`, `DUPLICATE_CLIENTID` or `CONNECTION_LOST` (the reasons the broker can distinguish). Contributed by @iot-rocket.
+
### Fixed
-- **Cognito — federation endpoints are built from the user pool's domain, and `CustomDomainConfig` is honored** — `CreateUserPoolDomain` accepted `CustomDomainConfig` and discarded it, always expanding `Domain` to `{Domain}.auth.{region}.amazoncognito.com`, while the SAML ACS URL and the OIDC federation callback ignored the domain entirely and were built from `MINISTACK_HOST`/`GATEWAY_PORT`. Federated sign-in therefore handed external identity providers `redirect_uri=http://localhost:4566/oauth2/idpresponse` — an address the browser cannot reach and that Google and other public IdPs reject outright for the scheme alone — so the flow died at the hop to the IdP with no way to correct it. `CustomDomainConfig` now distinguishes a custom domain (a full FQDN, served as-is and reported as `CustomDomain` on `DescribeUserPool`, fronted by a CloudFront distribution) from a prefix domain (a bare label, still expanded to the regional host), and `/saml2/idpresponse` and `/oauth2/idpresponse` — including the `AssertionConsumerServiceURL` in the generated SAML `AuthnRequest` and the `redirect_uri` replayed on the back-channel token exchange — are derived from whichever the pool has, exactly as AWS derives them. Configuring a custom domain is the same `create-user-pool-domain --custom-domain-config CertificateArn=...` call you would make against AWS; the certificate is recorded, not served, since TLS for a custom domain is terminated by whatever fronts it (nginx, an ALB, CloudFront) and proxied to the gateway. A pool holds one domain of each kind independently, a `CustomDomainConfig` without a `CertificateArn` is a `InvalidParameterException`, and a pool with no domain still falls back to the local gateway, so existing setups are unchanged.
+- **EventBridge — event-pattern matching follows AWS** — the matcher was rewritten to AWS's real semantics. A pattern whose only key is `$or`, or whose keys are all unrecognized envelope fields, no longer matches every event; `$or` is expanded with AWS's last-write-wins on a repeated field and its 1000-rule-combination cap; `wildcard` treats only `*` as special, with `\` escaping and consecutive `*` refused; `exists` works on leaf nodes; `resources` is an OR; and `cidr`, `equals-ignore-case`, and case-insensitive `prefix`/`suffix` are evaluated. An unparseable pattern is rejected with `InvalidEventPatternException` at `PutRule`, `TestEventPattern`, `CreateArchive` and `UpdateArchive`. Contributed by @t-rech.
+- **Cognito — federation endpoints are built from the user pool's domain, and `CustomDomainConfig` is honored** — `CreateUserPoolDomain` accepted `CustomDomainConfig` and discarded it, always expanding `Domain` to `{Domain}.auth.{region}.amazoncognito.com`, while the SAML ACS URL and the OIDC federation callback ignored the domain entirely and were built from `MINISTACK_HOST`/`GATEWAY_PORT`. Federated sign-in therefore handed external identity providers `redirect_uri=http://localhost:4566/oauth2/idpresponse` — an address the browser cannot reach and that Google and other public IdPs reject outright for the scheme alone — so the flow died at the hop to the IdP with no way to correct it. `CustomDomainConfig` now distinguishes a custom domain (a full FQDN, served as-is and reported as `CustomDomain` on `DescribeUserPool`, fronted by a CloudFront distribution) from a prefix domain (a bare label, still expanded to the regional host), and `/saml2/idpresponse` and `/oauth2/idpresponse` — including the `AssertionConsumerServiceURL` in the generated SAML `AuthnRequest` and the `redirect_uri` replayed on the back-channel token exchange — are derived from whichever the pool has, exactly as AWS derives them. Configuring a custom domain is the same `create-user-pool-domain --custom-domain-config CertificateArn=...` call you would make against AWS; the certificate is recorded, not served, since TLS for a custom domain is terminated by whatever fronts it (nginx, an ALB, CloudFront) and proxied to the gateway. A pool holds one domain of each kind independently, a `CustomDomainConfig` without a `CertificateArn` is a `InvalidParameterException`, and a pool with no domain still falls back to the local gateway, so existing setups are unchanged. Contributed by @tema-mazy.
+- **DynamoDB — enabling a stream through `UpdateTable` sets the stream ARN** — `UpdateTable` with `StreamSpecification.StreamEnabled=true` stored the specification but left `LatestStreamArn` and `LatestStreamLabel` unset, so `aws_dynamodb_table.stream_arn` came back empty in Terraform. Enabling a stream on the disabled→enabled transition now mints the label and `arn:aws:dynamodb:<region>:<account>:table/<name>/stream/<label>`, exactly as `CreateTable` already does, and `DescribeStream` resolves the new ARN. Contributed by @nightcityblade. Reported by @wparad.
+- **Lambda — the 250 MB unzipped limit counts function code plus layers** — the unzipped-size check was applied to the deployment package on its own, so a function whose code and attached layers exceeded 250 MB together (each under the limit individually) was accepted, unlike AWS. `CreateFunction` and `UpdateFunctionCode` now sum the function code and every attached layer, unzipped, and reject a total over 262144000 bytes with `InvalidParameterValueException`, matching AWS's quota — "the maximum size of the contents of a deployment package, including layers and custom runtimes". Publishing a single oversized layer is still refused on its own. Reported by @iot-rocket.
## [1.4.18] — 2026-08-16
diff --git a/README.md b/README.md
index cc298882..ee88dbba 100644
--- a/README.md
+++ b/README.md
@@ -583,7 +583,7 @@ MiniStack expands AWS SAM transforms (`Transform: AWS::Serverless-2016-10-31`) i
| **CodeBuild** | CreateProject, BatchGetProjects, ListProjects, UpdateProject, DeleteProject, StartBuild, BatchGetBuilds, StopBuild, ListBuilds, ListBuildsForProject, BatchDeleteBuilds | 11 actions; project and build metadata stored in-memory; builds complete immediately with SUCCEEDED status by default. Set `MINISTACK_CODEBUILD_EXECUTE=1` and mount the Docker socket to **really run them**: the project's inline buildspec goes to the official AWS CodeBuild local agent, which runs the phases in `environment.image`, and `BatchGetBuilds` reports live `phases` with a real `SUCCEEDED`/`FAILED` outcome. Execution needs the workspace shared with the host at the **same path** (`-v /tmp/ministack-codebuild:/tmp/ministack-codebuild`), because the agent bind-mounts it into the build container; a build gets `AWS_ENDPOINT_URL` pointing back at MiniStack, honours `timeoutInMinutes`, and is stopped by `StopBuild`. An executed build streams the agent output into its `logs.groupName` / `logs.streamName`, so `aws logs tail` reads the build log back |
| **AppConfig** | CreateApplication, GetApplication, ListApplications, UpdateApplication, DeleteApplication, CreateEnvironment, GetEnvironment, ListEnvironments, UpdateEnvironment, DeleteEnvironment, CreateConfigurationProfile, GetConfigurationProfile, ListConfigurationProfiles, UpdateConfigurationProfile, DeleteConfigurationProfile, CreateHostedConfigurationVersion, GetHostedConfigurationVersion, ListHostedConfigurationVersions, DeleteHostedConfigurationVersion, CreateDeploymentStrategy, GetDeploymentStrategy, ListDeploymentStrategies, UpdateDeploymentStrategy, DeleteDeploymentStrategy, StartDeployment, GetDeployment, ListDeployments, StopDeployment, TagResource, UntagResource, ListTagsForResource, StartConfigurationSession, GetLatestConfiguration | 33 operations; control plane + data plane; hosted configuration versions; deployments complete immediately; session-based configuration retrieval with token rotation |
| **Transfer Family** | CreateServer, DescribeServer, DeleteServer, ListServers, StartServer, StopServer, CreateUser, DescribeUser, DeleteUser, ListUsers, ImportSshPublicKey, DeleteSshPublicKey | 12 operations; **real SFTP listener** on `:2222` (override with `SFTP_PORT`) backed by S3 — `ls`, `put`, `get`, `mkdir`, `rename` work end-to-end against the local S3 emulator; `SFTP_PORT_PER_SERVER=1` allocates one port per `CreateServer` from `SFTP_BASE_PORT` (default 2300); SSH key auth scans every user across every server and account; `LOGICAL` and `PATH` home-directory mappings; host key persists across restarts when `PERSIST_STATE=1` |
-| **IoT Core** | CreateThing, DescribeThing, ListThings, UpdateThing, DeleteThing, CreateThingType, CreateThingGroup, AddThingToThingGroup, ListThingsInThingGroup, CreateKeysAndCertificate, RegisterCertificate, RegisterCertificateWithoutCA, UpdateCertificate, DeleteCertificate, AttachThingPrincipal, DetachThingPrincipal, ListThingPrincipals, ListPrincipalThings, CreatePolicy, CreatePolicyVersion, AttachPolicy, DetachPolicy, ListAttachedPolicies, ListTargetsForPolicy, AttachPrincipalPolicy, DetachPrincipalPolicy, ListPrincipalPolicies, ListPolicyPrincipals, CreateTopicRule, GetTopicRule, ReplaceTopicRule, DeleteTopicRule, ListTopicRules, UpdateIndexingConfiguration, GetIndexingConfiguration, DescribeIndex, ListIndices, SearchIndex, DescribeEndpoint, Publish (HTTP), MQTT-over-WebSocket pub/sub | 39 operations + **real MQTT 3.1.1 over WebSocket** on the gateway port — clients use the address returned by `DescribeEndpoint`; local CA signs `CreateKeysAndCertificate` certificates (CA persists across restarts when `PERSIST_STATE=1`); multi-tenancy via transparent topic prefixing (same pattern as Transfer Family's shared SFTP listener); no plain TCP 1883 (real AWS IoT requires TLS or SigV4 on every connection); local CA cert available at `GET /_ministack/iot/ca.pem` for SDK trust configuration; IoT policies are stored but **not enforced** on the data plane; **fleet indexing** works the way it does on AWS — `UpdateIndexingConfiguration` turns the `AWS_Things` index on (Terraform `aws_iot_indexing_configuration`), and searching while `thingIndexingMode` is `OFF` answers `ResourceNotFoundException`; `SearchIndex` then queries the live registry + classic shadows with `AND`-separated `thingName` / `thingTypeName` / `thingGroupNames` / `attributes.*` / `shadow.reported.*` / `shadow.desired.*` terms (`*` / `?` wildcards, `maxResults` / `nextToken` paging) — there is no projection to build, so hits are always current; the deprecated principal-policy family (`AttachPrincipalPolicy` / `DetachPrincipalPolicy` / `ListPrincipalPolicies` / `ListPolicyPrincipals`) maps 1:1 onto the modern policy-target store; **topic rules fire on matching publishes** (incl. Basic Ingest `$aws/rules/<name>`) with SQL SELECT projection (`topic()`, `timestamp()`, `encode()`, `newuuid()`, `replace()`, `clientid()`, `isUndefined()`), **WHERE-clause evaluation** (comparisons, `IN`, `LIKE`, `BETWEEN`, `IS NULL`, `regexp_matches`, bare boolean attributes, composed with `AND` / `OR` and parenthesised grouping; missing attributes fail closed as on AWS; unparseable SQL → `SqlParseException`), and `lambda` / `republish` / `dynamoDBv2` / `sns` actions dispatched in-process with the rule's `errorAction` on failure |
+| **IoT Core** | CreateThing, DescribeThing, ListThings, UpdateThing, DeleteThing, CreateThingType, CreateThingGroup, AddThingToThingGroup, ListThingsInThingGroup, CreateKeysAndCertificate, RegisterCertificate, RegisterCertificateWithoutCA, UpdateCertificate, DeleteCertificate, GetRegistrationCode, DeleteRegistrationCode, RegisterCACertificate, DescribeCACertificate, UpdateCACertificate, ListCACertificates, DeleteCACertificate, AttachThingPrincipal, DetachThingPrincipal, ListThingPrincipals, ListPrincipalThings, CreatePolicy, CreatePolicyVersion, AttachPolicy, DetachPolicy, ListAttachedPolicies, ListTargetsForPolicy, AttachPrincipalPolicy, DetachPrincipalPolicy, ListPrincipalPolicies, ListPolicyPrincipals, CreateTopicRule, GetTopicRule, ReplaceTopicRule, DeleteTopicRule, ListTopicRules, UpdateIndexingConfiguration, GetIndexingConfiguration, DescribeIndex, ListIndices, SearchIndex, DescribeEndpoint, Publish (HTTP), MQTT-over-WebSocket pub/sub | 46 operations + **MQTT 3.1.1 and 5.0 over WebSocket** (negotiated per connection) on the gateway port — clients use the address returned by `DescribeEndpoint`; local CA signs `CreateKeysAndCertificate` certificates (CA persists across restarts when `PERSIST_STATE=1`); multi-tenancy via transparent topic prefixing (same pattern as Transfer Family's shared SFTP listener); no plain TCP 1883 (real AWS IoT requires TLS or SigV4 on every connection); local CA cert available at `GET /_ministack/iot/ca.pem` for SDK trust configuration; IoT policies are stored but **not enforced** on the data plane; **fleet indexing** works the way it does on AWS — `UpdateIndexingConfiguration` turns the `AWS_Things` index on (Terraform `aws_iot_indexing_configuration`), and searching while `thingIndexingMode` is `OFF` answers `ResourceNotFoundException`; `SearchIndex` then queries the live registry + classic shadows with `AND`-separated `thingName` / `thingTypeName` / `thingGroupNames` / `attributes.*` / `shadow.reported.*` / `shadow.desired.*` terms (`*` / `?` wildcards, `maxResults` / `nextToken` paging) — there is no projection to build, so hits are always current; the deprecated principal-policy family (`AttachPrincipalPolicy` / `DetachPrincipalPolicy` / `ListPrincipalPolicies` / `ListPolicyPrincipals`) maps 1:1 onto the modern policy-target store; **topic rules fire on matching publishes** (incl. Basic Ingest `$aws/rules/<name>`) with SQL SELECT projection (`topic()`, `timestamp()`, `encode()`, `newuuid()`, `replace()`, `clientid()`, `isUndefined()`), **WHERE-clause evaluation** (comparisons, `IN`, `LIKE`, `BETWEEN`, `IS NULL`, `regexp_matches`, bare boolean attributes, composed with `AND` / `OR` and parenthesised grouping; missing attributes fail closed as on AWS; unparseable SQL → `SqlParseException`), and `lambda` / `republish` / `dynamoDBv2` / `sns` / `sqs` actions dispatched in-process with the rule's `errorAction` on failure; **device shadows over MQTT** — the `$aws/things/<thing>/shadow[/name/<name>]/{get,update,delete}` reserved topics drive the shadow store and reply on `accepted` / `rejected` (with `delta` and `documents` on update); a **CA-certificate registry** (`RegisterCACertificate` and friends) with the just-in-time-registration `registered` event on `$aws/events/certificates/registered/{caCertificateId}`; and `SearchIndex` answers `connectivity.connected` / `connectivity.timestamp` / `connectivity.disconnectReason` when `thingConnectivityIndexingMode` is `STATUS`, deriving `connected` from the live session registry |
| **EventBridge Scheduler** | CreateSchedule, GetSchedule, UpdateSchedule, DeleteSchedule, ListSchedules, CreateScheduleGroup, GetScheduleGroup, DeleteScheduleGroup, ListScheduleGroups, TagResource, UntagResource, ListTagsForResource | 12 actions; schedules **fire their targets** — a background sweep invokes each enabled schedule's target (Lambda, SQS, SNS, Step Functions) when due, honoring `State`, `StartDate`/`EndDate`, and `ActionAfterCompletion: DELETE`; schedule groups with cascading deletes; `rate()`, `cron()`, `at()` expressions; group/prefix/state filters on list; default group auto-created; CFN `AWS::Scheduler::Schedule` and `AWS::Scheduler::ScheduleGroup` supported |
| **EKS** | CreateCluster, DescribeCluster, ListClusters, DeleteCluster, CreateNodegroup, DescribeNodegroup, ListNodegroups, DeleteNodegroup, CreateAddon, DescribeAddon, ListAddons, UpdateAddon, DeleteAddon, AssociateEncryptionConfig, CreateAccessEntry, DescribeAccessEntry, ListAccessEntries, UpdateAccessEntry, DeleteAccessEntry, AssociateAccessPolicy, DisassociateAccessPolicy, ListAssociatedAccessPolicies, AssociateIdentityProviderConfig, DescribeIdentityProviderConfig, DisassociateIdentityProviderConfig, ListIdentityProviderConfigs, TagResource, UntagResource, ListTagsForResource | `CreateCluster` spawns a real **k3s** container (75 MB) with a full Kubernetes API server; `kubectl`, Helm, and any K8s tooling work out of the box; cascading delete removes nodegroups and k3s container; addon CRUD (e.g. `vpc-cni`, `coredns`, `kube-proxy`, `aws-ebs-csi-driver`) at `/clusters/{name}/addons` flips status to `ACTIVE` on create / update; `AssociateEncryptionConfig` at `/clusters/{name}/encryption-config/associate` records KMS encryption config (rejects re-association, AWS-shape `update` envelope); **Access Entries** (modern post-1.29 IAM bindings — replaces aws-auth ConfigMap) at `/clusters/{name}/access-entries[/{principalArn}[/access-policies[/{policyArn}]]]` for Crossplane / Terraform `aws_eks_access_entry` + `aws_eks_access_policy_association`; OIDC discovery + JWKS served at the cluster's `identity.oidc.issuer` URL so Terraform's `aws_iam_openid_connect_provider` (IRSA) works against ministack; **OIDC Identity Provider Config** (`AssociateIdentityProviderConfig` / `DescribeIdentityProviderConfig` / `DisassociateIdentityProviderConfig` / `ListIdentityProviderConfigs`) at `/clusters/{name}/identity-provider-configs[/{verb}]` — one OIDC IdP per cluster, issuer + clientId + claims forwarded to the k3s API server via `--kube-apiserver-arg=oidc-*` flags, tags reachable via `ListTagsForResource`; CFN `AWS::EKS::Cluster` and `AWS::EKS::Nodegroup` supported |
| **OpenSearch Service** | CreateDomain, DescribeDomain, DescribeDomains, DeleteDomain, ListDomainNames, UpdateDomainConfig, DescribeDomainConfig, DescribeDomainChangeProgress, ListVersions, GetCompatibleVersions, AddTags, ListTags, RemoveTags | Management plane on `/2021-01-01/*` (`boto3.client("opensearch")`, SigV4 scope `es`). Default data plane is a stub endpoint (`<domain>.ministack.local:9200`) — set `OPENSEARCH_DATAPLANE=1` to spawn one real `opensearchproject/opensearch` container per `CreateDomain` (same pattern as ElastiCache/RDS); `DescribeDomain.Endpoint` then points at that container and `_cluster/health`/`/_search` work end-to-end. Add `OPENSEARCH_DASHBOARDS=1` (with dataplane on) to also spawn a per-domain `opensearch-dashboards` sidecar; `DescribeDomain.DashboardEndpoint` is populated. ARNs follow `arn:aws:es:<region>:<account>:domain/<name>`; Terraform `aws_opensearch_domain` resource compatible. |
diff --git a/pyproject.toml b/pyproject.toml
index cc959459..94c66341 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "ministack"
-version = "1.4.18"
+version = "1.4.19"
description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"
readme = "README.md"
license = { file = "LICENSE" }