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.14 (#1778)
Nahuel Nucerab11fe4ca5090
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 2421f893..07e7c9de 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,25 +5,63 @@ All notable changes to MiniStack will be documented here.Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).Versioning follows [Semantic Versioning](https://semver.org/).-## [Unreleased]+## [1.5.14] — 2026-09-20-### Fixed-- **EventBridge — dynamic HTTP parameters for API destinations** — `HttpParameters` JSON paths now resolve against the original event before input transformation, including array indexes and wildcards. Literal values, connection precedence and stored target configuration are preserved. Verified against AWS EventBridge using a MongoDB partner event bus and an HTTPS request recorder.+### Added-- **RDS — StopDBCluster/StartDBCluster no longer rewrites the cluster endpoint from its DNS name to a raw container address** — restarting a cluster's shared container reported the container's IP in place of the `*.rds.amazonaws.com` name handed out at creation, even though the name still resolved to the restarted container. Connection strings kept working by accident or broke outright once the address was reused, and hostname-verified TLS could not match the address. The restart now reports the same registered network alias the first launch does, while the internal address and readiness probe keep using the refreshed container IP. The reader endpoint, in turn, only derives its `cluster-ro-` name when that name was actually registered on the backing container.+- **KMS — imported key material** — a key created with `Origin=EXTERNAL` stayed unusable because there was no way to supply its material. `GetParametersForImport`, `ImportKeyMaterial` and `DeleteImportedKeyMaterial` now complete the flow: the key waits in `PendingImport`, all five wrapping algorithms unwrap, and `ExpirationModel` and `ValidTo` are reported on the key. Reported by @guymahieu.+- **API Gateway — REST request validators, API keys, throttling and quotas are enforced** — the five `RequestValidator` operations are implemented, a method's `requestValidatorId` is applied to the body and parameters, and an API key is checked against its usage plan's rate, burst and quota. Reported by @iot-rocket.+- **CloudFormation — update handlers for twelve more types** — a stack update of these types re-ran the create, so the resource came back under a new id or the change was lost. Each now updates in place where its reference allows, replaces otherwise, and refuses to replace a custom-named resource. Contributed by @iot-rocket.+- **RDS — resource-bound IAM database authentication** — a verified token is now authorized against the policy's resource, so a grant scoped to one database user stops matching another. Contributed by @Areson.+- **RDS — PostgreSQL instances serve TLS** — a generated CA signs a server certificate for each container, so a client connecting with `sslmode=verify-full` completes the handshake instead of failing. `GET /_ministack/rds/ca.pem` returns that CA, the local stand-in for AWS's certificate bundle. Reported by @jayjanssen.+- **Bedrock Agent Runtime — `Retrieve` applies `vectorSearchConfiguration.filter`** — the filter was parsed and ignored, so every query returned the whole knowledge base. All eleven comparators plus `andAll` and `orAll` now select against the document's metadata, read from its `.metadata.json` sidecar. Reported by @Vidminas.+- **Bedrock Runtime — `toolConfig` reaches the backing model** — a `Converse` call carrying tools was proxied without them, so the model could never answer with a tool use. Tools are forwarded, and a tool call comes back as a `toolUse` block, streamed as `contentBlockStart` when the caller streams. Reported by @Vidminas.+- **IoT — a job execution times out** — `timeoutConfig.inProgressTimeoutInMinutes` and the device's own `stepTimeoutInMinutes` were stored and ignored, so an execution stayed `IN_PROGRESS` for ever. An execution past its timeout is now `TIMED_OUT`, and the device plane reports `approximateSecondsBeforeTimedOut` while it runs.+- **Health — the IoT mTLS listener is reported** — `/_ministack/health` carries `iot_mtls`, and `/_ministack/ready` waits for that listener, so a consumer polling readiness no longer races the MQTT port.-- **IAM — three calls are authorized against the action and resource AWS uses** — a Lambda Function URL invoke is checked against its function ARN, alias qualifier included, and supplies `lambda:FunctionUrlAuthType`, so the policy `grantInvokeUrl` writes matches. The WebSocket `@connections` API asks for `execute-api:ManageConnections` instead of `execute-api:Invoke`. `iot-jobs-data` operations are authorized under `iotjobsdata:`, except `StartCommandExecution`, which stays on `iot:`. A policy written for the old action names stops matching, as on AWS. Contributed by @iot-rocket.-- **IoT — the registered-certificate event comes from the device connect** — `RegisterCertificate` published `$aws/events/certificates/registered/{caCertificateId}`, and an mTLS connect with an unknown certificate got CONNACK 5 with nothing created. AWS publishes the event only on the connect: a certificate signed by an ACTIVE CA with auto-registration enabled is created `PENDING_ACTIVATION`, the event carries `sourceIp`, and the connection closes without a CONNACK. The listener now does the same, and `RegisterCertificate` with status `PENDING_ACTIVATION` is `CertificateStateException` 406. Contributed by @iot-rocket.+### Changed++- **IAM — wildcard matching is case-sensitive where AWS makes it case-sensitive** — `Resource`, `NotResource`, `StringLike`, `StringNotLike`, `ArnEquals` and `ArnLike` compared case-insensitively, so a policy naming `arn:aws:s3:::MyBucket` also matched `mybucket`. Only `Action` stays case-insensitive, as on AWS.+- **SQS — the default `MaximumMessageSize` is 1 MiB** — queues were created with AWS's old 256 KiB default, so a message between 256 KiB and 1 MiB was rejected where AWS accepts it. The bound accepted by `SetQueueAttributes` moves with it.++### Removed++- **Four timing environment variables** — `TRANSCRIBE_JOB_RUN_SECONDS`, `GLUE_CRAWLER_RUN_SECONDS`, `MINISTACK_DDB_IMPORT_COMPLETE_AFTER_SEC` and `LAMBDA_STATE_TRANSITION_SECONDS` paced emulator-only state transitions and had no AWS counterpart. The transitions keep their previous default pacing.++### Fixed++- **EventBridge — dynamic HTTP parameters for API destinations** — `HttpParameters` JSON paths went to the endpoint as literal `$.` strings. They now resolve against the original event, before input transformation, array indexes and wildcards included. Contributed by @dmgarland.+- **RDS — restarting a cluster keeps its DNS endpoint** — a restart reported the container's IP in place of the `*.rds.amazonaws.com` name handed out at creation, breaking connection strings and hostname-verified TLS. The restart now reports the registered network alias, and the reader endpoint derives its `cluster-ro-` name only when that name was registered. Contributed by @jayjanssen.+- **RDS Data — a PostgreSQL `SELECT` reports the rows it returned** — `numberOfRecordsUpdated` carried the row count for a read, where AWS reports `0` and leaves the rows in `records`. Contributed by @jayjanssen.+- **IoT — the registered-certificate event comes from the device connect** — `RegisterCertificate` published it, and an mTLS connect with an unknown certificate got CONNACK 5 with nothing created. AWS creates the certificate `PENDING_ACTIVATION` on the connect, publishes the event with `sourceIp`, and closes without a CONNACK. Contributed by @iot-rocket.- **IoT — `DescribeEndpoint` refuses the retired `iot:Data` and `iot:Jobs` types** — both returned a hostname, so a client could keep using an endpoint type AWS no longer serves. AWS answers `InvalidRequestException` 400 and points to `iot:Data-ATS`; both types now get the same errors and messages. Contributed by @iot-rocket.-- **IoT Data — HTTPS `Publish` refuses the topics AWS refuses** — any topic starting with `$` was accepted, so a caller could forge `$aws/events/...` lifecycle events and fire the rules on them. AWS answers `InvalidRequestException` 400 "Topic can't start with $" outside the `$aws/rules/`, `$aws/things/`, `$aws/certificates/`, `$aws/provisioning-templates/`, `$aws/device_location/` and `$aws/commands/` families, and "Invalid publish to restricted topic using HTTP" for the jobs, Device Defender and commands topics, which are MQTT-only. MiniStack now returns the same errors; MQTT publishes are unchanged. Contributed by @iot-rocket.-- **CloudFormation — `AWS::ECR::Repository` keeps what the template declares** — scanning and encryption settings were stored in the template's PascalCase and read back empty, lifecycle policy, repository policy and tags were dropped, `PutImage` into the repository failed and a deleted repository left its images and policies behind. The repository is now created, updated in place and deleted through the ECR store. Contributed by @iot-rocket.-- **CloudFormation — a rolled-back replacement keeps the old resource** — an update handler deleted the predecessor as soon as the replacement existed, so when a later resource failed the rollback removed the replacement too and the stack recorded a resource that was gone. The predecessor is now deleted in the cleanup phase after the update succeeds, and a rollback deletes only the replacement, as measured on AWS. Contributed by @iot-rocket.-### Added-- **CloudFormation: the `AWS::LanguageExtensions` transform**: a template declaring it was provisioned unexpanded, so an `Fn::ForEach` left the stack in `CREATE_IN_PROGRESS` for good and an `Fn::ToJsonString` reached SSM as a Python dict. The transform now runs between `AWS::Include` and SAM: `Fn::ForEach` over literal, `CommaDelimitedList` and intrinsic collections, nested and inside `Properties`, plus `Fn::Length` and `Fn::ToJsonString`. Where the identifier is substituted, the error sentences and the unexpanded `GetTemplateSummary` follow measurements on a real account. Contributed by @iot-rocket.-- **CloudFormation — update handlers for twelve more types** — a stack update of these types re-ran the create: the four ELBv2 types, `AWS::Route53::HostedZone`, `AWS::WAFv2::WebACL` and `AWS::Backup::BackupPlan` came back under a new id, `AWS::IoT::ThingType` failed with `ResourceAlreadyExistsException`, and certificate, email identity, backup vault and API Gateway account changes were lost. Each type now updates in place where its reference allows, replaces otherwise and refuses to replace a custom-named resource. Also fixed: a stack's backup plan read back without rules, its email identity was invisible to SES v2, `DescribeTags` raised on its target groups, and ACM timestamps answered the time of the call. Contributed by @iot-rocket.-- **API Gateway — REST API gateway responses reach the data plane** — a customized gateway response was stored but never applied, so a 401 or 403 from the gateway carried none of the CORS headers a CDK stack declares for it. Gateway errors now resolve the response for their type, then `DEFAULT_4XX` or `DEFAULT_5XX`, then the built-in default, from the stage's last deployment, with header mappings, the `application/json` template and `x-amzn-ErrorType`. `GetGatewayResponse` reports an inherited `DEFAULT_4XX` or `DEFAULT_5XX`, and a response put without templates stores the default one. Contributed by @iot-rocket.-- **API Gateway — REST API gateway errors answer with the AWS status and message** — an authorizer that raised, a missing Lambda and an unreachable HTTP backend answered with invented statuses and exception text, and an unknown stage with `404`. They now answer `500` `AUTHORIZER_FAILURE` with a null message, `500` `API_CONFIGURATION_ERROR` with `Internal server error`, and `403` `Forbidden`; an explicit Deny carries the full AWS sentence, and a TOKEN authorizer policy without `principalId` is evaluated instead of refused. Contributed by @iot-rocket.+- **IoT Data — HTTPS `Publish` refuses the topics AWS refuses** — any `$` topic was accepted, so a caller could forge `$aws/events/...` lifecycle events. Reserved topics now answer `InvalidRequestException` 400 "Topic can't start with $", and the MQTT-only jobs, Device Defender and commands topics "Invalid publish to restricted topic using HTTP". Contributed by @iot-rocket.+- **CloudFormation — `AWS::ECR::Repository` keeps what the template declares** — scanning and encryption read back empty, lifecycle and repository policies and tags were dropped, `PutImage` failed, and a delete left images behind. The resource now goes through the ECR store. Contributed by @iot-rocket.+- **CloudFormation — a rolled-back replacement keeps the old resource** — the predecessor was deleted as soon as the replacement existed, so a later failure rolled back to a resource that was gone. It is now deleted after the update succeeds, and a rollback deletes only the replacement. Contributed by @iot-rocket.+- **API Gateway — REST API gateway responses reach the data plane** — a customized response was stored and never applied, so a 401 or 403 carried none of the CORS headers a CDK stack declares. Gateway errors now resolve their type, then `DEFAULT_4XX`/`DEFAULT_5XX`, then the built-in default, with header mappings and `x-amzn-ErrorType`. Contributed by @iot-rocket.+- **API Gateway — REST API gateway errors answer with the AWS status and message** — invented statuses and exception text went out. A failed authorizer is `500` `AUTHORIZER_FAILURE` with a null message, a missing backend `500` `API_CONFIGURATION_ERROR` `Internal server error`, and an unknown stage `403` `Forbidden`. Contributed by @iot-rocket.- **API Gateway — a MOCK integration honours its `statusCode`** — the `200` integration response was used whatever the request template set, so a MOCK method modelling an error returned `200`. The template's `statusCode` now selects the integration response by `selectionPattern`. Contributed by @iot-rocket.+- **AppConfig — `GetLatestConfiguration` serves a feature-flag profile in retrieval-time format** — the stored `{flags, values, version}` document was returned verbatim, so a client reading a flag found nothing at the top level. A `AWS.AppConfig.FeatureFlags` profile is now flattened to its `values`, disabled flags included. Reported by @dk-tanio.+- **Bedrock AgentCore — timestamps are ISO 8601 strings everywhere** — `CreateAgentRuntime` answered with a JSON number while `ListAgentRuntimes` answered with a string for the same field, so a typed SDK failed on one of the two. Both now match the model's `iso8601` format. Reported by @ykalemi.+- **S3 — an omitted notification configuration `Id` is generated** — a configuration sent without one read back without one, where AWS assigns base64 of a UUID. Reported by @jin-gizmo.+- **S3 — a notification configuration is stored in the form the wire uses** — the request XML was echoed back, so a configuration sent with `LambdaFunctionConfigurations` read back empty for a client expecting the wire name `CloudFunctionConfiguration`, which also hid a CloudFormation-declared Lambda notification. Reported by @jin-gizmo.+- **CloudFormation — `AWS::WAFv2::WebACL` returns the `Ref` AWS returns** — the bare id came back where AWS returns `name|id|scope`, so a template passing the `Ref` to another resource passed an unusable value.+- **Cognito — the OIDC discovery document follows the gateway's scheme** — every endpoint in it was `http` even with `USE_SSL=1`, so the document contradicted its own `https` issuer and a discovery client refused it. Reported by @epcap90.+- **IoT — rule SQL accepts the grammar AWS accepts** — `!=` and `==` were evaluated, where AWS refuses both, and a nested `SELECT` in a `WHERE` clause was accepted, where AWS answers `Unexpected token, 'SELECT'`. `clientid()` now resolves to `n/a` for a publish that did not arrive over MQTT rather than dropping the field from the projection.+- **IoT — the rule error action document matches AWS** — a failure was reported as `{action, errorMessage}`, where AWS names `failedAction` (`DynamoDBv2Action`, `SnsAction`) and `failedResource` (the table, topic, queue or function the action targeted). `clientId` is `N/A` for a non-MQTT publish rather than empty, and the document carries `sourceIp`.+- **IoT — `CreateJob` validates what AWS validates** — a `schedulingConfig` time with seconds or a `Z`, an `inProgressTimeoutInMinutes` outside 1 to 10080, a document over 32768 characters, a `documentSource` outside 1 to 1350, and a request naming neither a document nor a source were all accepted. Each now answers `InvalidRequestException` with AWS's own sentence.+- **IoT — `DescribeJob` echoes the members it accepted** — `abortConfig`, `timeoutConfig`, `schedulingConfig`, `jobExecutionsRetryConfig`, `namespaceId`, `jobTemplateArn`, `documentParameters` and `destinationPackageVersions` were stored and never reported, and `isConcurrent` and `forceCanceled` were missing. Job timestamps are whole epoch seconds, not fractions.+- **IoT Jobs data — two device-plane answers match AWS** — `UpdateJobExecution` with a status a device cannot set answered `InvalidRequestException` 400 instead of `InvalidStateTransitionException` 409, and an `executionNumber` naming an execution that does not exist was ignored instead of answering `ResourceNotFoundException` 404.+- **Auto Scaling — a duplicate group or launch configuration returns `AlreadyExists`** — the wire code was `AlreadyExistsFault`, the shape name rather than the code, so an SDK caught nothing.+- **CloudFormation — `ExecuteChangeSet` returns `InvalidChangeSetStatus`** — the shape name `InvalidChangeSetStatusException` went out as the error code.+- **CloudFormation — the Rules section refuses `Fn::If`** — it was evaluated because the reference lists it, while a real account answers `Following functions are not supported in the Rules block of the template: [Fn::If]`.+- **CloudFormation — the 60 dynamic references per template quota is enforced** — a template over the limit was provisioned instead of being refused.+- **Lambda — an AWS-published extension layer resolves** — a template referencing `LambdaInsightsExtension`, the Parameters and Secrets, AppConfig or OpenTelemetry extensions or `AWSSDKPandas` could not deploy, because the publisher account is unknown offline. It now resolves by layer name with `CodeSize` 0, so the extension does not run.+- **EC2 — a bare `-e NAME` docker flag takes the host value** — it was passed through as an empty string, where docker either forwards the host's value or omits the variable.+- **S3 Control — an unknown `/v20180820` path answers `InvalidURI`** — it fell through to a generic answer instead of AWS's 400 inside an `<ErrorResponse>` echoing the bad segment.+- **Signer — the `clientRequestToken` replay cache is bounded** — every distinct token was kept for ever and persisted with the service state.+- **CloudFormation — `DeletionPolicy: Snapshot` takes a snapshot** — the policy was read and never acted on, so a resource declaring it was deleted with nothing kept, and an RDS cluster or standalone instance, which AWS defaults to `Snapshot`, defaulted to `Delete` here. Both now snapshot the resource and then delete it, on a stack delete and on an update that removes it from the template.+## [1.5.13] — 2026-09-17### Addeddiff --git a/README.md b/README.mdindex a5d8337f..67c0c2ab 100644--- a/README.md+++ b/README.md@@ -433,9 +433,9 @@ subnet = ec2.create_subnet(| **WAF v2** | CreateWebACL, GetWebACL, UpdateWebACL, DeleteWebACL, ListWebACLs, AssociateWebACL, DisassociateWebACL, GetWebACLForResource, ListResourcesForWebACL, CreateIPSet, GetIPSet, UpdateIPSet, DeleteIPSet, ListIPSets, CreateRuleGroup, GetRuleGroup, UpdateRuleGroup, DeleteRuleGroup, ListRuleGroups, TagResource, UntagResource, ListTagsForResource, CheckCapacity, DescribeManagedRuleGroup | LockToken enforced on Update/Delete; resource associations tracked || **Step Functions** | CreateStateMachine, DeleteStateMachine, DescribeStateMachine, UpdateStateMachine, ListStateMachines, StartExecution, StartSyncExecution, StopExecution, DescribeExecution, DescribeStateMachineForExecution, ListExecutions, GetExecutionHistory, SendTaskSuccess, SendTaskFailure, SendTaskHeartbeat, CreateActivity, DeleteActivity, DescribeActivity, ListActivities, GetActivityTask, TestState, TagResource, UntagResource, ListTagsForResource | Full ASL interpreter; Retry/Catch; waitForTaskToken; Activities (worker pattern); Pass/Task/Choice/Wait/Succeed/Fail/Map/Parallel; TestState API with mock and inspectionLevel support; SFN_MOCK_CONFIG for AWS SFN Local compatible mock testing; intrinsic functions (States.StringToJson, States.JsonToString, States.JsonMerge, States.Format); nested startExecution.sync || **API Gateway v2** | CreateApi, GetApi, GetApis, UpdateApi, DeleteApi, CreateRoute, GetRoute, GetRoutes, UpdateRoute, DeleteRoute, CreateIntegration, GetIntegration, GetIntegrations, UpdateIntegration, DeleteIntegration, CreateRouteResponse, GetRouteResponse, GetRouteResponses, UpdateRouteResponse, DeleteRouteResponse, CreateIntegrationResponse, GetIntegrationResponse, GetIntegrationResponses, UpdateIntegrationResponse, DeleteIntegrationResponse, CreateStage, GetStage, GetStages, UpdateStage, DeleteStage, CreateDeployment, GetDeployment, GetDeployments, DeleteDeployment, CreateAuthorizer, GetAuthorizer, GetAuthorizers, UpdateAuthorizer, DeleteAuthorizer, TagResource, UntagResource, GetTags, PostToConnection, GetConnection, DeleteConnection | **HTTP API** and **WebSocket API** (`protocolType=WEBSOCKET`); Lambda proxy (`AWS_PROXY`), HTTP proxy (`HTTP_PROXY`), and MOCK integrations; HTTP data plane via `{apiId}.execute-api.localhost` Host header or path-based `/_aws/execute-api/{apiId}/{stage}/{path}` (no DNS/Host override needed — works from browsers on macOS and strict clients); `$default` stage served from the URL root (no stage segment in the path); per-API `corsConfiguration` applied to preflights + dispatched responses; request parameter mapping for HTTP_PROXY (`append/overwrite/remove` for headers/querystring plus `overwrite:path`) with context variables including `$context.authorizer.jwt.claims`; JWT data-plane authorization for HTTP routes (issuer/audience/time/scope checks) and claim propagation to integrations; qualified-alias integration URIs (`arn:...:function:<name>:<alias>`) resolve to the alias's target version; WebSocket data plane on the same two URL forms, with `$connect` / `$disconnect` / `$default` / custom-action routing, `$request.body.*` RouteSelectionExpression, `@connections` management API (PostToConnection / GetConnection / DeleteConnection), per-connection outbox for server-side push; `{param}` / `{proxy+}` matching; JWT/Lambda authorizer CRUD; pin `apiId` across runs with the `ms-custom-id` tag |-| **API Gateway v1** | CreateRestApi, GetRestApi, GetRestApis, UpdateRestApi, DeleteRestApi, CreateResource, GetResource, GetResources, UpdateResource, DeleteResource, PutMethod, GetMethod, DeleteMethod, UpdateMethod, PutMethodResponse, GetMethodResponse, DeleteMethodResponse, PutIntegration, GetIntegration, DeleteIntegration, UpdateIntegration, PutIntegrationResponse, GetIntegrationResponse, DeleteIntegrationResponse, CreateDeployment, GetDeployment, GetDeployments, UpdateDeployment, DeleteDeployment, CreateStage, GetStage, GetStages, UpdateStage, DeleteStage, CreateAuthorizer, GetAuthorizer, GetAuthorizers, UpdateAuthorizer, DeleteAuthorizer, CreateModel, GetModel, GetModels, DeleteModel, CreateDocumentationPart, GetDocumentationPart, GetDocumentationParts, UpdateDocumentationPart, DeleteDocumentationPart, CreateApiKey, GetApiKey, GetApiKeys, UpdateApiKey, DeleteApiKey, CreateUsagePlan, GetUsagePlan, GetUsagePlans, UpdateUsagePlan, DeleteUsagePlan, CreateUsagePlanKey, GetUsagePlanKeys, DeleteUsagePlanKey, CreateDomainName, GetDomainName, GetDomainNames, DeleteDomainName, CreateBasePathMapping, GetBasePathMapping, GetBasePathMappings, DeleteBasePathMapping, TagResource, UntagResource, GetTags | REST API (v1) protocol; Lambda proxy format 1.0 (AWS_PROXY), non-proxy Lambda (AWS — the handler's output is the response body, mapping templates not modeled), HTTP proxy (HTTP_PROXY), MOCK integration; data plane via `{apiId}.execute-api.localhost` Host header, path-based `/_aws/execute-api/{apiId}/{stage}/{path}`, or legacy `/restapis/{apiId}/{stage}/_user_request_/{path}`; qualified-alias integration URIs (`arn:...:function:<name>:<alias>`) resolve to the alias's target version; resource tree with `{param}` and `{proxy+}` path matching; routing is on the resource+method pair, so a request the matched resource does not serve falls through to a `{proxy+}` elsewhere in the tree (a methodless intermediate, a CORS-preflight-only node, or any undeclared verb), as it does on AWS; TOKEN and REQUEST Lambda authorizers on the data plane, with the returned IAM policy evaluated against each request's own method ARN and `authorizerResultTtlInSeconds` caching the policy per stage and identity source; JSON Patch for all PATCH operations; state persistence; pin `id` across runs with the `ms-custom-id` tag |+| **API Gateway v1** | CreateRestApi, GetRestApi, GetRestApis, UpdateRestApi, DeleteRestApi, CreateResource, GetResource, GetResources, UpdateResource, DeleteResource, PutMethod, GetMethod, DeleteMethod, UpdateMethod, PutMethodResponse, GetMethodResponse, DeleteMethodResponse, PutIntegration, GetIntegration, DeleteIntegration, UpdateIntegration, PutIntegrationResponse, GetIntegrationResponse, DeleteIntegrationResponse, CreateDeployment, GetDeployment, GetDeployments, UpdateDeployment, DeleteDeployment, CreateStage, GetStage, GetStages, UpdateStage, DeleteStage, CreateAuthorizer, GetAuthorizer, GetAuthorizers, UpdateAuthorizer, DeleteAuthorizer, CreateModel, GetModel, GetModels, DeleteModel, CreateDocumentationPart, GetDocumentationPart, GetDocumentationParts, UpdateDocumentationPart, DeleteDocumentationPart, CreateApiKey, GetApiKey, GetApiKeys, UpdateApiKey, DeleteApiKey, CreateUsagePlan, GetUsagePlan, GetUsagePlans, UpdateUsagePlan, DeleteUsagePlan, CreateUsagePlanKey, GetUsagePlanKeys, DeleteUsagePlanKey, CreateDomainName, GetDomainName, GetDomainNames, DeleteDomainName, CreateBasePathMapping, GetBasePathMapping, GetBasePathMappings, DeleteBasePathMapping, TagResource, UntagResource, GetTags, CreateRequestValidator, GetRequestValidators, GetRequestValidator, UpdateRequestValidator, DeleteRequestValidator | REST API (v1) protocol; Lambda proxy format 1.0 (AWS_PROXY), non-proxy Lambda (AWS — the handler's output is the response body, mapping templates not modeled), HTTP proxy (HTTP_PROXY), MOCK integration; data plane via `{apiId}.execute-api.localhost` Host header, path-based `/_aws/execute-api/{apiId}/{stage}/{path}`, or legacy `/restapis/{apiId}/{stage}/_user_request_/{path}`; qualified-alias integration URIs (`arn:...:function:<name>:<alias>`) resolve to the alias's target version; resource tree with `{param}` and `{proxy+}` path matching; routing is on the resource+method pair, so a request the matched resource does not serve falls through to a `{proxy+}` elsewhere in the tree (a methodless intermediate, a CORS-preflight-only node, or any undeclared verb), as it does on AWS; TOKEN and REQUEST Lambda authorizers on the data plane, with the returned IAM policy evaluated against each request's own method ARN and `authorizerResultTtlInSeconds` caching the policy per stage and identity source; JSON Patch for all PATCH operations; state persistence; pin `id` across runs with the `ms-custom-id` tag || **ELBv2 / ALB** | CreateLoadBalancer, DescribeLoadBalancers, DeleteLoadBalancer, DescribeLoadBalancerAttributes, ModifyLoadBalancerAttributes, CreateTargetGroup, DescribeTargetGroups, ModifyTargetGroup, DeleteTargetGroup, DescribeTargetGroupAttributes, ModifyTargetGroupAttributes, CreateListener, DescribeListeners, ModifyListener, DeleteListener, CreateRule, DescribeRules, ModifyRule, DeleteRule, SetRulePriorities, SetSubnets, SetIpAddressType, SetSecurityGroups, RegisterTargets, DeregisterTargets, DescribeTargetHealth, AddTags, RemoveTags, DescribeTags | Control plane + data plane; ALB→Lambda live traffic routing; `path-pattern`, `host-header`, `http-method`, `query-string`, `http-header` rule conditions; `forward`, `redirect`, `fixed-response`, `authenticate-oidc` actions; data plane via `{lb-name}.alb.localhost` Host header or `/_alb/{lb-name}/` path prefix |-| **KMS** | CreateKey, ReplicateKey, ListKeys, DescribeKey, GetPublicKey, Sign, Verify, Encrypt, Decrypt, GenerateMac, VerifyMac, GenerateDataKey, GenerateDataKeyWithoutPlaintext, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, GenerateRandom, CreateAlias, DeleteAlias, ListAliases, UpdateAlias, UpdateKeyDescription, EnableKeyRotation, DisableKeyRotation, GetKeyRotationStatus, GetKeyPolicy, PutKeyPolicy, ListKeyPolicies, EnableKey, DisableKey, ScheduleKeyDeletion, CancelKeyDeletion, TagResource, UntagResource, ListResourceTags | 34 actions; multi-Region keys: `CreateKey` with `MultiRegion` mints an `mrk-` key and `ReplicateKey` creates a same-id replica in another region sharing the key material (ciphertext from the primary decrypts against the replica; a primary with live replicas waits in `PendingReplicaDeletion`); CMK specs: RSA (2048/3072/4096), ECC (SECG_P256K1, NIST P-256/384/521), Edwards25519 (`ECC_NIST_EDWARDS25519` — pure Ed25519 via `ED25519_SHA_512` with `MessageType=RAW`; `ED25519_PH_SHA_512` advertised in `SigningAlgorithms` but returns `UnsupportedOperationException` until Ed25519ph lands), HMAC (`HMAC_224`/`HMAC_256`/`HMAC_384`/`HMAC_512` with `KeyUsage=GENERATE_VERIFY_MAC`), and symmetric keys; PKCS1v15, PSS, and ECDSA signing; real RFC 2104 HMAC via `GenerateMac`/`VerifyMac` (4096-byte message cap, `KMSInvalidMacException` on mismatch, `DryRun` supported); envelope encryption, incl. asymmetric data key pairs (`KeyPairSpec` adds RSA_3072); alias resolution; key rotation; key policies; tags; enable/disable/schedule deletion; full Terraform `aws_kms_key` compatible; `cryptography` package included in Docker image |+| **KMS** | CreateKey, ReplicateKey, ListKeys, DescribeKey, GetPublicKey, Sign, Verify, Encrypt, Decrypt, GenerateMac, VerifyMac, GenerateDataKey, GenerateDataKeyWithoutPlaintext, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, GenerateRandom, CreateAlias, DeleteAlias, ListAliases, UpdateAlias, UpdateKeyDescription, EnableKeyRotation, DisableKeyRotation, GetKeyRotationStatus, GetKeyPolicy, PutKeyPolicy, ListKeyPolicies, EnableKey, DisableKey, ScheduleKeyDeletion, CancelKeyDeletion, TagResource, UntagResource, ListResourceTags, GetParametersForImport, ImportKeyMaterial, DeleteImportedKeyMaterial | 34 actions; multi-Region keys: `CreateKey` with `MultiRegion` mints an `mrk-` key and `ReplicateKey` creates a same-id replica in another region sharing the key material (ciphertext from the primary decrypts against the replica; a primary with live replicas waits in `PendingReplicaDeletion`); CMK specs: RSA (2048/3072/4096), ECC (SECG_P256K1, NIST P-256/384/521), Edwards25519 (`ECC_NIST_EDWARDS25519` — pure Ed25519 via `ED25519_SHA_512` with `MessageType=RAW`; `ED25519_PH_SHA_512` advertised in `SigningAlgorithms` but returns `UnsupportedOperationException` until Ed25519ph lands), HMAC (`HMAC_224`/`HMAC_256`/`HMAC_384`/`HMAC_512` with `KeyUsage=GENERATE_VERIFY_MAC`), and symmetric keys; PKCS1v15, PSS, and ECDSA signing; real RFC 2104 HMAC via `GenerateMac`/`VerifyMac` (4096-byte message cap, `KMSInvalidMacException` on mismatch, `DryRun` supported); envelope encryption, incl. asymmetric data key pairs (`KeyPairSpec` adds RSA_3072); alias resolution; key rotation; key policies; tags; enable/disable/schedule deletion; full Terraform `aws_kms_key` compatible; `cryptography` package included in Docker image || **CloudFront** | CreateDistribution, GetDistribution, GetDistributionConfig, ListDistributions, UpdateDistribution, DeleteDistribution, CreateInvalidation, ListInvalidations, GetInvalidation, CreateOriginAccessControl, GetOriginAccessControl, GetOriginAccessControlConfig, ListOriginAccessControls, UpdateOriginAccessControl, DeleteOriginAccessControl, CreateFunction, DeleteFunction, DescribeFunction, GetFunction, ListFunctions, PublishFunction, UpdateFunction, **KeyValueStore (mgmt)**: CreateKeyValueStore, DescribeKeyValueStore, ListKeyValueStores, UpdateKeyValueStore, DeleteKeyValueStore, **Policies**: CreateCachePolicy, GetCachePolicy, GetCachePolicyConfig, UpdateCachePolicy, DeleteCachePolicy, ListDistributionsByCachePolicyId, CreateOriginRequestPolicy, GetOriginRequestPolicy, GetOriginRequestPolicyConfig, UpdateOriginRequestPolicy, DeleteOriginRequestPolicy, ListDistributionsByOriginRequestPolicyId, CreateResponseHeadersPolicy, GetResponseHeadersPolicy, GetResponseHeadersPolicyConfig, UpdateResponseHeadersPolicy, DeleteResponseHeadersPolicy, ListDistributionsByResponseHeadersPolicyId, **SaaS Manager**: CreateConnectionGroup, GetConnectionGroup, GetConnectionGroupByRoutingEndpoint, UpdateConnectionGroup, DeleteConnectionGroup, ListConnectionGroups, CreateDistributionTenant, GetDistributionTenant, GetDistributionTenantByDomain, UpdateDistributionTenant, DeleteDistributionTenant, ListDistributionTenants, ListDistributionTenantsByCustomization, AssociateDistributionTenantWebACL, DisassociateDistributionTenantWebACL, CreateInvalidationForDistributionTenant, GetInvalidationForDistributionTenant, ListInvalidationsForDistributionTenant, VerifyDnsConfiguration, GetManagedCertificateDetails, ListDomainConflicts, UpdateDomainAssociation, ListDistributionsByConnectionMode, TagResource, UntagResource, ListTagsForResource | REST/XML API; ETag-based optimistic concurrency; Origin config round-trip; cache / origin request / response headers policies round-trip their full config with `ETag` / `If-Match` optimistic concurrency; Origin Access Control (OAC) with SigV4 signing for S3, MediaStore, Lambda, MediaPackageV2 origins; **CloudFront Functions** are API stubs (in-memory code + DEVELOPMENT/LIVE ETags for Terraform `aws_cloudfront_function`) with `KeyValueStoreAssociations` round-tripped — no `TestFunction`, no viewer-request JS execution at the edge; `UpdateFunction` clears the emulated LIVE stage until `PublishFunction` runs again; **SaaS Manager** multi-tenant distributions: `DistributionConfig` round-trips `ConnectionMode` / `TenantConfig`, tenants require a `tenant-only` distribution, CNAMEs are unique across tenants and distribution aliases, a tenant without an explicit connection group lazily gets the account default group, and MiniStack collapses async workflows (tenants deploy, domains activate, DNS verifies, managed certificates issue immediately) || **CloudFront KeyValueStore (data plane)** | DescribeKeyValueStore, ListKeys, GetKey, PutKey, DeleteKey, UpdateKeys | Separate `cloudfront-keyvaluestore` SDK service (REST/JSON, signing name `cloudfront-keyvaluestore`); ETag-based optimistic concurrency on every mutating op; `UpdateKeys` is atomic (validates whole batch, rejects on first invalid entry); `ListKeys` paginates with opaque `NextToken` capped at 50 results per AWS spec; bridges to the management plane via the shared KVS ARN || **CloudTrail** | LookupEvents, CreateTrail, DeleteTrail, GetTrail, DescribeTrails, ListTrails, UpdateTrail, GetTrailStatus, StartLogging, StopLogging, PutEventSelectors, GetEventSelectors, AddTags, ListTags, RemoveTags | In-memory audit log; recording opt-in via `CLOUDTRAIL_RECORDING=1` (or runtime config endpoint); per-account ring buffer (`CLOUDTRAIL_MAX_EVENTS=10000`); `LookupEvents` supports all 8 AWS `LookupAttributes`; `IsLogging` flips on Start/StopLogging; `CreateTrail`/`UpdateTrail` persist `KmsKeyId` (normalized to a key ARN; omitted when unset) so `aws_cloudtrail` converges without drift |@@ -597,7 +597,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 Jobs** | Control plane (`iot`): CreateJob, DescribeJob, ListJobs, GetJobDocument, CancelJob, DeleteJob, ListJobExecutionsForThing, DescribeJobExecution, CancelJobExecution; data plane (`iot-jobs-data`): GetPendingJobExecutions, StartNextPendingJobExecution, DescribeJobExecution (incl. the `$next` sentinel), UpdateJobExecution | 9 control-plane + 4 device data-plane operations sharing one store. Executions walk `QUEUED → IN_PROGRESS → {SUCCEEDED, FAILED, REJECTED, CANCELED}`; the remaining AWS terminal statuses (`TIMED_OUT`, `REMOVED`) are modeled and counted in `jobProcessDetails` but nothing sets them — there are no execution timeouts, and deleting a thing DELETES its executions (freeing a job that was only waiting on that thing) rather than marking them `REMOVED`. `versionNumber` gives optimistic concurrency: every transition bumps it and a stale `expectedVersion` is rejected with a 409 whose message carries the current version — coded `VersionConflictException` on the control plane and `InvalidStateTransitionException` on the device plane, each as its own service model declares. `executionNumber` is write-once (always 1: an execution is never re-queued). Devices may only report `IN_PROGRESS` / `SUCCEEDED` / `FAILED` / `REJECTED` via `UpdateJobExecution`; targets are thing or thing-group ARNs — `SNAPSHOT` jobs resolve group membership once at creation, `CONTINUOUS` jobs also pick up things added to a target group later, and a target must name a thing or thing group in the caller's own account and region (anything else is `ResourceNotFoundException`, since it would resolve to no devices at all); a non-continuous job auto-`COMPLETED`s (with `jobProcessDetails` counts) once every execution is terminal. **`documentSource` is not fetched**: a job created with an S3 `documentSource` serves a `{"documentSource": "<url>"}` placeholder as its document rather than the object's content, so the lifecycle still runs — pass `document` when the content matters. **Timestamps are epoch seconds on every plane, as AWS documents**: control-plane responses use `timestamp` shapes (boto3 parses them to datetimes) while `iot-jobs-data` responses carry whole-second integer `long`s. **Jobs over MQTT**: the reserved `$aws/things/<thing>/jobs/#` request topics (`get`, `start-next`, `<jobId>/get` incl. `$next`, `<jobId>/update`) answer on their `accepted`/`rejected` topics from the same store as the HTTP plane (`jobDocument` as a JSON object over MQTT, a string over HTTP, as on AWS; rejections carry the string `ErrorCode` values and the execution's state on version and state-transition conflicts); `notify` fires when the pending set changes and `notify-next` when the queue front changes; `stepTimeoutInMinutes` and `executionNumber` are accepted but ignored. Job state persists with the IoT store when `PERSIST_STATE=1` |+| **IoT Jobs** | Control plane (`iot`): CreateJob, DescribeJob, ListJobs, GetJobDocument, CancelJob, DeleteJob, ListJobExecutionsForThing, DescribeJobExecution, CancelJobExecution; data plane (`iot-jobs-data`): GetPendingJobExecutions, StartNextPendingJobExecution, DescribeJobExecution (incl. the `$next` sentinel), UpdateJobExecution | 9 control-plane + 4 device data-plane operations sharing one store. Executions walk `QUEUED → IN_PROGRESS → {SUCCEEDED, FAILED, REJECTED, CANCELED, TIMED_OUT}`; an execution past its `timeoutConfig.inProgressTimeoutInMinutes`, or past the `stepTimeoutInMinutes` the device reported, becomes `TIMED_OUT`, and the device plane reports `approximateSecondsBeforeTimedOut` while it runs. `REMOVED` is modeled and counted in `jobProcessDetails` but nothing sets it: deleting a thing DELETES its executions (freeing a job that was only waiting on that thing) rather than marking them `REMOVED`. `versionNumber` gives optimistic concurrency: every transition bumps it and a stale `expectedVersion` is rejected with a 409 whose message carries the current version — coded `VersionConflictException` on the control plane and `InvalidStateTransitionException` on the device plane, each as its own service model declares. `executionNumber` is write-once (always 1: an execution is never re-queued). Devices may only report `IN_PROGRESS` / `SUCCEEDED` / `FAILED` / `REJECTED` via `UpdateJobExecution`; targets are thing or thing-group ARNs — `SNAPSHOT` jobs resolve group membership once at creation, `CONTINUOUS` jobs also pick up things added to a target group later, and a target must name a thing or thing group in the caller's own account and region (anything else is `ResourceNotFoundException`, since it would resolve to no devices at all); a non-continuous job auto-`COMPLETED`s (with `jobProcessDetails` counts) once every execution is terminal. **`documentSource` is not fetched**: a job created with an S3 `documentSource` serves a `{"documentSource": "<url>"}` placeholder as its document rather than the object's content, so the lifecycle still runs — pass `document` when the content matters. **Timestamps are epoch seconds on every plane, as AWS documents**: control-plane responses use `timestamp` shapes (boto3 parses them to datetimes) while `iot-jobs-data` responses carry whole-second integer `long`s. **Jobs over MQTT**: the reserved `$aws/things/<thing>/jobs/#` request topics (`get`, `start-next`, `<jobId>/get` incl. `$next`, `<jobId>/update`) answer on their `accepted`/`rejected` topics from the same store as the HTTP plane (`jobDocument` as a JSON object over MQTT, a string over HTTP, as on AWS; rejections carry the string `ErrorCode` values and the execution's state on version and state-transition conflicts); `notify` fires when the pending set changes and `notify-next` when the queue front changes; `stepTimeoutInMinutes` and `executionNumber` are accepted but ignored. Job state persists with the IoT store when `PERSIST_STATE=1` || **IoT Core** | CreateThing, DescribeThing, ListThings, UpdateThing, DeleteThing, CreateThingType, CreateThingGroup, AddThingToThingGroup, ListThingsInThingGroup, ListThingGroupsForThing, CreateKeysAndCertificate, RegisterCertificate, RegisterCertificateWithoutCA, UpdateCertificate, DeleteCertificate, GetRegistrationCode, DeleteRegistrationCode, RegisterCACertificate, DescribeCACertificate, UpdateCACertificate, ListCACertificates, DeleteCACertificate, CreateProvisioningTemplate, DescribeProvisioningTemplate, ListProvisioningTemplates, UpdateProvisioningTemplate, DeleteProvisioningTemplate, 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 | 52 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), but a **native mTLS MQTT listener on 8883** serves device SDK binaries by default — the client certificate is optional (no certificate means the default account, like an unsigned WebSocket upgrade) and, when presented, must be registered `ACTIVE` in exactly one account, which then serves the session; unknown, inactive or doubly-registered certificates get a "not authorized" CONNACK (see `IOT_MTLS_PORT` in the environment table); 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}`; a **provisioning-template registry** (`CreateProvisioningTemplate` and friends) — storage + CRUD only, so `provisioningRoleArn` is presence-checked but not resolved and the fleet-provisioning MQTT workflow (`$aws/provisioning-templates/...`) is not implemented; and `SearchIndex` answers `connectivity.connected` / `connectivity.timestamp` / `connectivity.disconnectReason` when `thingConnectivityIndexingMode` is `STATUS`, deriving `connected` from the live session registry || **IoT Wireless** | GetPositionEstimate | Single operation (`POST /position-estimate`, SigV4 scope `iotwireless`, endpoint prefix `api.iotwireless`). **The response is the raw GeoJSON blob** — the output shape's `payload` trait — so boto3 hands back a `StreamingBody` under `GeoJsonPayload`, not a JSON envelope. Resolves from `Ip` only: `WiFiAccessPoints` / `CellTowers` / `Gnss` are accepted and ignored, `Timestamp` and `AdvancedConfiguration` only reach `properties`, and the estimate is synthetic + deterministic — the canonical IP (an IPv4-mapped IPv6 address counts as its IPv4 form) hashes onto lon [-180, 180) / lat [-60, 60), 4 decimals — so the same address always answers the same estimate and consumer tests can assert on it. `properties` carry `horizontalAccuracy` 1000000 (the value of one live call) and `horizontalConfidenceLevel` 0.68 (the default the AWS IoT Core Device Location guide documents — `AdvancedConfiguration.WiFiCellular.ConfidencePercent` overrides it, divided by 100, within the 50 to 99 the model allows) plus `timestamp`, which is always there: AWS documents the request's `Timestamp` as the resolve time and the receive time as its substitute when the caller sends none, so send a `Timestamp` and the whole blob is byte-identical. The real payload's `country` and city/state/postal properties are omitted for that determinism. An input with no resolver hint and an `IpAddress` that `ipaddress.ip_address()` refuses answer `ValidationException` (those two wordings are recorded from the live service; every other message in this service is MiniStack's own, since none is documented); a `Timestamp` that is not a Unix timestamp, and a `ConfidencePercent` outside the model's range, are `ValidationException` too; a valid address that is **not globally routable or is multicast** (private, loopback, TEST-NET, multicast groups, ...) answers `ResourceNotFoundException` `Cannot find position for the IP address <ip>`, mirroring the real service's refusal when its geo database has no entry. A well-formed request whose only measurements are WLAN/cell/GNSS is `ResourceNotFoundException` too — the developer guide documents 404 for exactly that ("no location information was found or solved ... The MAC address or cellular tower information is not sufficient ... The GNSS payload is not sufficient"), and 400 for measurement data formatted incorrectly. Stateless — nothing persists || **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 |diff --git a/ministack/services/cloudformation/provisioners.py b/ministack/services/cloudformation/provisioners.pyindex 36bc7c40..4b70ff0a 100644--- a/ministack/services/cloudformation/provisioners.py+++ b/ministack/services/cloudformation/provisioners.py@@ -532,6 +532,20 @@ def _provision_resource(resource_type: str, logical_id: str, props: dict,raise ValueError(f"Unsupported resource type: {resource_type}")+def _snapshot_id(physical_id: str) -> str:+ """Name for a `DeletionPolicy: Snapshot` snapshot. AWS generates one too;+ its format is not documented, so this is the emulator's."""+ return f"{physical_id}-final-snapshot"+++def _snapshot_resource(resource_type: str, physical_id: str, props: dict) -> None:+ """Snapshot a resource before its stack deletes it. A type that does not+ support snapshots has no handler, and `Snapshot` is a plain delete there."""+ handler = _RESOURCE_HANDLERS.get(resource_type)+ if handler and "snapshot" in handler:+ handler["snapshot"](physical_id, props)++def _delete_resource(resource_type: str, physical_id: str, props: dict,stack_name: str | None = None, logical_id: str | None = None):"""Delete a provisioned resource."""@@ -9102,6 +9116,12 @@ def _rds_db_cluster_delete(physical_id, props):_rds._clusters.pop(physical_id, None)+def _rds_db_cluster_snapshot(physical_id, props):+ cluster = _rds._clusters.get(physical_id)+ if cluster is not None:+ _rds._create_cluster_snapshot_internal(_snapshot_id(physical_id), cluster)++# ---------------------------------------------------------------------------# RDS DBInstance# ---------------------------------------------------------------------------@@ -9234,6 +9254,12 @@ def _rds_db_instance_create(logical_id, props, stack_name):}+def _rds_db_instance_snapshot(physical_id, props):+ instance = _rds._instances.get(physical_id)+ if instance is not None:+ _rds._create_snapshot_internal(_snapshot_id(physical_id), instance)++def _rds_db_instance_delete(physical_id, props):instance = _rds._instances.pop(physical_id, None)if instance:@@ -10894,8 +10920,10 @@ _RESOURCE_HANDLERS = {"update": _cw_dashboard_update,"delete": _cw_dashboard_delete,},- "AWS::RDS::DBCluster": {"create": _rds_db_cluster_create, "delete": _rds_db_cluster_delete},- "AWS::RDS::DBInstance": {"create": _rds_db_instance_create, "delete": _rds_db_instance_delete},+ "AWS::RDS::DBCluster": {"create": _rds_db_cluster_create, "delete": _rds_db_cluster_delete,+ "snapshot": _rds_db_cluster_snapshot},+ "AWS::RDS::DBInstance": {"create": _rds_db_instance_create, "delete": _rds_db_instance_delete,+ "snapshot": _rds_db_instance_snapshot},"AWS::IoT::TopicRule": {"create": _iot_topic_rule_create,"update": _iot_topic_rule_update,diff --git a/ministack/services/cloudformation/stacks.py b/ministack/services/cloudformation/stacks.pyindex 1f920106..a90b836c 100644--- a/ministack/services/cloudformation/stacks.py+++ b/ministack/services/cloudformation/stacks.py@@ -25,6 +25,7 @@ from .provisioners import (_RETAINING_POLICIES,_delete_resource,_provision_resource,+ _snapshot_resource,_update_resource,_with_stack_tags,)@@ -86,9 +87,9 @@ def _default_resource_policy(res_def, attribute) -> str:rtype = (res_def or {}).get("Type")props = (res_def or {}).get("Properties") or {}if rtype == "AWS::RDS::DBCluster":- return "Retain"+ return "Snapshot"if rtype == "AWS::RDS::DBInstance" and not props.get("DBClusterIdentifier"):- return "Retain"+ return "Snapshot"return "Delete"@@ -99,9 +100,7 @@ def _resource_policy(res_def, attribute, resources, params, conditions, mappingsdefaults ``DeletionPolicy`` to ``Snapshot`` for ``AWS::RDS::DBCluster`` andfor ``AWS::RDS::DBInstance`` without ``DBClusterIdentifier``(aws-attribute-deletionpolicy.html; captured eu-north-1 2026-09-19, the- stack delete left a manual snapshot behind). This emulator takes no- snapshots, so those two default to ``Retain``: the data survives the stack- delete, which is what Snapshot is for, where ``Delete`` would destroy it.+ stack delete left a manual snapshot behind).An intrinsic (``Fn::If``) is resolved like a property; one that does notresolve counts as ``Delete`` and is logged, since that is the destructive@@ -514,6 +513,8 @@ async def _deploy_stack_async(stack_name: str, stack_id: str, template: dict,provisioned_resources.pop(logical_id, None)continuetry:+ if policy == "Snapshot":+ _snapshot_resource(rtype, pid, old_props)if _is_custom_resource(rtype):await run_reentrant(_delete_resource, rtype, pid, old_props,@@ -723,6 +724,8 @@ async def _delete_stack_async(stack_name: str, stack_id: str,_add_event(stack_id, stack_name, logical_id, rtype,"DELETE_IN_PROGRESS", physical_id=pid)try:+ if policy == "Snapshot":+ _snapshot_resource(rtype, pid, res_props)if _is_custom_resource(rtype):await run_reentrant(_delete_resource, rtype, pid, res_props,diff --git a/ministack/services/iot.py b/ministack/services/iot.pyindex 66cd55ab..cf1750aa 100644--- a/ministack/services/iot.py+++ b/ministack/services/iot.py@@ -4168,9 +4168,7 @@ async def _create_job(job_id: str, payload: dict) -> tuple:"presignedUrlConfig": payload.get("presignedUrlConfig") or {},"jobExecutionsRolloutConfig": payload.get("jobExecutionsRolloutConfig")or {},- # Modelled CreateJob members stored so DescribeJob echoes them. Storing- # is all this does: nothing acts on timeoutConfig or abortConfig, so no- # execution reaches TIMED_OUT and nothing aborts.+ # Stored so DescribeJob echoes them. timeoutConfig is acted on; nothing aborts."abortConfig": payload.get("abortConfig"),"timeoutConfig": payload.get("timeoutConfig"),"jobExecutionsRetryConfig": payload.get("jobExecutionsRetryConfig"),diff --git a/ministack/services/rds.py b/ministack/services/rds.pyindex e6bf2383..727a5cfa 100644--- a/ministack/services/rds.py+++ b/ministack/services/rds.py@@ -6628,28 +6628,14 @@ def _reset_db_cluster_param_group(p):# DB Cluster Snapshots# ----------------------------------------------------------------------------def _create_db_cluster_snapshot(p):- snap_id = _p(p, "DBClusterSnapshotIdentifier")- cluster_id = _p(p, "DBClusterIdentifier")- if not snap_id:- return _error("MissingParameter", "DBClusterSnapshotIdentifier is required", 400)- if snap_id in _db_cluster_snapshots:- return _error("DBClusterSnapshotAlreadyExistsFault",- f"DB cluster snapshot {snap_id} already exists.", 400)-- cluster = _resolve_cluster_in_request_region(cluster_id)- if not cluster:- wrong_region = _invalid_region_arn_error(cluster_id, "DBClusterIdentifier")- if wrong_region:- return wrong_region- return _error("DBClusterNotFoundFault", f"DBCluster {cluster_id} not found.", 404)- cluster_id = cluster["DBClusterIdentifier"]-+def _create_cluster_snapshot_internal(snap_id, cluster):+ """The snapshot record for one cluster. Shared with the CloudFormation+ ``DeletionPolicy: Snapshot`` path, which has no request to parse."""arn = f"arn:aws:rds:{get_region()}:{get_account_id()}:cluster-snapshot:{snap_id}"now_ts = time.time()snap = {"DBClusterSnapshotIdentifier": snap_id,- "DBClusterIdentifier": cluster_id,+ "DBClusterIdentifier": cluster["DBClusterIdentifier"],"DBClusterSnapshotArn": arn,"Engine": cluster["Engine"],"EngineVersion": cluster["EngineVersion"],@@ -6672,6 +6658,28 @@ def _create_db_cluster_snapshot(p):}_db_cluster_snapshots[snap_id] = snap+ return snap+++def _create_db_cluster_snapshot(p):+ snap_id = _p(p, "DBClusterSnapshotIdentifier")+ cluster_id = _p(p, "DBClusterIdentifier")+ if not snap_id:+ return _error("MissingParameter", "DBClusterSnapshotIdentifier is required", 400)+ if snap_id in _db_cluster_snapshots:+ return _error("DBClusterSnapshotAlreadyExistsFault",+ f"DB cluster snapshot {snap_id} already exists.", 400)++ cluster = _resolve_cluster_in_request_region(cluster_id)+ if not cluster:+ wrong_region = _invalid_region_arn_error(cluster_id, "DBClusterIdentifier")+ if wrong_region:+ return wrong_region+ return _error("DBClusterNotFoundFault", f"DBCluster {cluster_id} not found.", 404)+ cluster_id = cluster["DBClusterIdentifier"]++ snap = _create_cluster_snapshot_internal(snap_id, cluster)+ arn = snap["DBClusterSnapshotArn"]req_tags = _parse_tags(p)if req_tags:_tags[arn] = req_tagsdiff --git a/pyproject.toml b/pyproject.tomlindex 3bcc69b7..eac2c1b1 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "ministack"-version = "1.5.13"+version = "1.5.14"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 639d3306..57bfa25d 100644--- a/tests/test_cfn.py+++ b/tests/test_cfn.py@@ -24016,3 +24016,108 @@ def test_cfn_s3_bucket_lambda_notification_reads_back(cfn, s3, lam):lam.delete_function(FunctionName=fn_name)except ClientError:pass+++def test_cfn_rds_instance_defaults_to_snapshot_on_delete(cfn, rds):+ """A DBInstance without DBClusterIdentifier defaults to DeletionPolicy+ Snapshot: the stack delete takes a snapshot and then removes the instance."""+ uid = _uuid_mod.uuid4().hex[:8]+ stack_name = f"cfn-rds-snap-{uid}"+ db_id = f"cfn-rds-snap-{uid}"+ template = json.dumps({"Resources": {+ "Db": {"Type": "AWS::RDS::DBInstance", "Properties": {+ "DBInstanceIdentifier": db_id,+ "Engine": "postgres",+ "DBInstanceClass": "db.t3.micro",+ "AllocatedStorage": "20",+ "MasterUsername": "admin",+ "MasterUserPassword": "password123",+ }},+ }})+ cfn.create_stack(StackName=stack_name, TemplateBody=template)+ try:+ stack = _wait_stack(cfn, stack_name)+ assert stack["StackStatus"] == "CREATE_COMPLETE", stack.get("StackStatusReason")+ assert rds.describe_db_instances(DBInstanceIdentifier=db_id)["DBInstances"]++ cfn.delete_stack(StackName=stack_name)+ assert _wait_stack(cfn, stack_name)["StackStatus"] == "DELETE_COMPLETE"++ snap = rds.describe_db_snapshots(+ DBSnapshotIdentifier=f"{db_id}-final-snapshot")["DBSnapshots"][0]+ assert snap["DBInstanceIdentifier"] == db_id+ with pytest.raises(ClientError) as exc:+ rds.describe_db_instances(DBInstanceIdentifier=db_id)+ assert exc.value.response["Error"]["Code"] == "DBInstanceNotFound"+ finally:+ _delete_cfn_test_stack(cfn, stack_name)+ try:+ rds.delete_db_snapshot(DBSnapshotIdentifier=f"{db_id}-final-snapshot")+ except ClientError:+ pass+++def test_cfn_rds_cluster_defaults_to_snapshot_on_delete(cfn, rds):+ """Same default for AWS::RDS::DBCluster, through the cluster snapshot API."""+ uid = _uuid_mod.uuid4().hex[:8]+ stack_name = f"cfn-rdsc-snap-{uid}"+ cluster_id = f"cfn-rdsc-snap-{uid}"+ template = json.dumps({"Resources": {+ "Cluster": {"Type": "AWS::RDS::DBCluster", "Properties": {+ "DBClusterIdentifier": cluster_id,+ "Engine": "aurora-postgresql",+ "MasterUsername": "admin",+ "MasterUserPassword": "password123",+ }},+ }})+ cfn.create_stack(StackName=stack_name, TemplateBody=template)+ try:+ assert _wait_stack(cfn, stack_name)["StackStatus"] == "CREATE_COMPLETE"+ cfn.delete_stack(StackName=stack_name)+ assert _wait_stack(cfn, stack_name)["StackStatus"] == "DELETE_COMPLETE"++ snap = rds.describe_db_cluster_snapshots(+ DBClusterSnapshotIdentifier=f"{cluster_id}-final-snapshot",+ )["DBClusterSnapshots"][0]+ assert snap["DBClusterIdentifier"] == cluster_id+ with pytest.raises(ClientError) as exc:+ rds.describe_db_clusters(DBClusterIdentifier=cluster_id)+ assert exc.value.response["Error"]["Code"] == "DBClusterNotFoundFault"+ finally:+ _delete_cfn_test_stack(cfn, stack_name)+ try:+ rds.delete_db_cluster_snapshot(+ DBClusterSnapshotIdentifier=f"{cluster_id}-final-snapshot")+ except ClientError:+ pass+++def test_cfn_rds_instance_in_a_cluster_defaults_to_delete(cfn, rds):+ """A DBInstance that names DBClusterIdentifier is outside AWS's exception,+ so it defaults to Delete and leaves no snapshot behind."""+ uid = _uuid_mod.uuid4().hex[:8]+ stack_name = f"cfn-rdsm-snap-{uid}"+ cluster_id, db_id = f"cfn-rdsm-c-{uid}", f"cfn-rdsm-i-{uid}"+ template = json.dumps({"Resources": {+ "Cluster": {"Type": "AWS::RDS::DBCluster", "DeletionPolicy": "Delete",+ "Properties": {+ "DBClusterIdentifier": cluster_id,+ "Engine": "aurora-postgresql",+ "MasterUsername": "admin",+ "MasterUserPassword": "password123"}},+ "Member": {"Type": "AWS::RDS::DBInstance", "Properties": {+ "DBInstanceIdentifier": db_id,+ "DBClusterIdentifier": cluster_id,+ "Engine": "aurora-postgresql",+ "DBInstanceClass": "db.t3.medium"}},+ }})+ cfn.create_stack(StackName=stack_name, TemplateBody=template)+ try:+ assert _wait_stack(cfn, stack_name)["StackStatus"] == "CREATE_COMPLETE"+ cfn.delete_stack(StackName=stack_name)+ assert _wait_stack(cfn, stack_name)["StackStatus"] == "DELETE_COMPLETE"+ with pytest.raises(ClientError) as exc:+ rds.describe_db_snapshots(DBSnapshotIdentifier=f"{db_id}-final-snapshot")+ assert exc.value.response["Error"]["Code"] == "DBSnapshotNotFound"+ finally:+ _delete_cfn_test_stack(cfn, stack_name)