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.14 (#1316)
Nahuel Nucera1590804c3234
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 70172308..03b32f42 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,26 +5,27 @@ 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]--### Fixed-- **SNS — `$or` operator in subscription filter policies** — a filter policy with a top-level `$or` key was matched with plain AND semantics, so `$or` never matched and every message was silently dropped as non-matching. `$or` is now evaluated the way AWS does: a recognized `$or` (an array of at least two objects whose field names are not reserved rule keywords) matches when any of its member policies matches, sibling keys are AND-ed with it, member keys are AND-ed internally, and nested `$or` is supported; an unrecognized `$or` is treated as a literal attribute name, as on AWS. Applies to the `MessageAttributes` filter scope. Reported by @StiliyanDr.-- **RDS — `StopDBCluster` / `StartDBCluster` now stop and start Aurora compute** — both operations only flipped metadata: a "stopped" cluster's backing container kept running and accepting SQL connections, and its members never left `available`. `StopDBCluster` now stops the cluster's shared container — preserving the container, volume, and data, exactly like Aurora keeps the cluster volume — and marks the cluster and every member `stopped`. `StartDBCluster` restarts the preserved container (recreating compute from the persistent named volume when the container is gone or unrestartable) and, like `CreateDBInstance`, returns immediately with a transitional status while a readiness worker flips the cluster and members to `available` once the database accepts authenticated connections. Invalid transitions return the AWS-exact `InvalidDBClusterStateFault` messages — including `CreateDBInstance`/`DeleteDBInstance` against a stopped cluster — and a warm boot keeps an intentionally stopped cluster stopped instead of reviving its compute. A start whose compute genuinely fails to come back lands the cluster back on `stopped` (retryable) instead of reporting a dead endpoint as `available`, and a stop that cannot stop the container surfaces an error instead of publishing a false `stopped`. Contributed by @kiran01bm.-- **RDS — Aurora PostgreSQL engine versions are validated at create time** — `CreateDBCluster` / `CreateDBInstance` accepted any `EngineVersion` string for `aurora-postgresql`: because the Docker image is derived from the major alone, a bogus minor like `16.99` silently ran PostgreSQL 16 while claiming to be `16.99`, and only an unknown major produced a visible image-pull failure. An unknown version — anything `DescribeDBEngineVersions` doesn't advertise and that isn't a dot-boundary prefix of an advertised version (bare majors like `16` stay accepted, since real AWS resolves them server-side) — now fails immediately with `InvalidParameterCombination` / `Cannot find version {version} for aurora-postgresql`, matching real AWS and the existing aurora-mysql behavior; `DescribeOrderableDBInstanceOptions` rejects unknown versions the same way instead of echoing a fabricated option. The advertised catalog is refreshed to the full creatable set real AWS returns (41 versions, 11.9 through 18.4, including `-limitless` variants, as of 2026-08-06) and is a single shared constant used by both the catalog and the validator; the default `aurora-postgresql` version is now `17.7` (AWS's current default) and the CloudFormation `AWS::RDS::DBCluster` provisioner uses that shared default instead of a hard-coded `15.4`. Contributed by @kiran01bm.-- **RDS — duplicate DB instance wire code matches AWS** — a duplicate `CreateDBInstance`, `CreateDBInstanceReadReplica`, or `RestoreDBInstanceFromDBSnapshot` target returned wire code `DBInstanceAlreadyExistsFault`, but real AWS omits the `Fault` suffix for instance-level error codes (cluster-level codes such as `DBClusterAlreadyExistsFault` keep it). SDKs match the exact string to produce their typed error — aws-sdk-go-v2, for example, deserialized the response as a generic API error instead of the typed `DBInstanceAlreadyExistsFault`. The wire code is now `DBInstanceAlreadyExists`. This deliberately reverts the v1.1.18 change, which mistook the SDK exception *shape name* for the *wire code* — the model's `error.code` field (`DBInstanceAlreadyExists`) is what SDKs match, and exact-string tests now pin the correct direction. Contributed by @kiran01bm.-### Added-- **CodeBuild - builds can really run (`MINISTACK_CODEBUILD_EXECUTE=1`)** - `StartBuild` returned a build that was already `SUCCEEDED`, so a pipeline rehearsed against MiniStack reported a pass without a single phase having run, and a buildspec that fails on AWS still looked green locally. With the flag set, `StartBuild` returns `IN_PROGRESS` and the project's inline buildspec is handed to the official AWS CodeBuild local agent (`public.ecr.aws/codebuild/local-builds`), which runs the phases in the project's `environment.image` the way CodeBuild does - the phase semantics come from AWS's own agent instead of a reimplemented executor. `BatchGetBuilds` reflects progress while the build runs: the agent's `Phase complete: <PHASE> State: <STATUS>` lines become `phases` entries, and the container's exit status maps to `SUCCEEDED` / `FAILED`, with `FAULT` when Docker is unreachable. `environment.environmentVariables`, `privilegedMode`, and the `CODEBUILD_BUILD_ID` / `_ARN` / `_NUMBER` / `_INITIATOR` variables reach the build. The build reaches back into MiniStack: `AWS_ENDPOINT_URL` (plus placeholder credentials) is injected unless the project declares its own, so `aws s3 cp` inside a build hits this emulator rather than real AWS. `timeoutInMinutes` is enforced (the build is stopped and its phase reported `TIMED_OUT`), and a restored build that was in flight when MiniStack stopped is reported `FAULT` rather than polling as running forever. `StopBuild` is honoured deterministically: it records the intent before removing the container, so the worker reports the requested `STOPPED` instead of racing it to `FAULT`. Build output also reaches CloudWatch Logs: the record already advertised `logs.groupName` / `logs.streamName`, and an executed build now writes the agent output there, so `aws logs get-log-events` and `aws logs tail` read back a real build log instead of an empty stream. Default behaviour is unchanged - without the flag builds stay metadata-only. Requires the Docker socket; the agent image and workspace path are fixed internals, not configurable.--## [1.4.14] — 2026-08-06+## [1.4.14] — 2026-08-07### Added+- **CodeBuild - builds can really run (`MINISTACK_CODEBUILD_EXECUTE=1`)** - `StartBuild` returned a build that was already `SUCCEEDED`, so a pipeline rehearsed against MiniStack reported a pass without a single phase having run, and a buildspec that fails on AWS still looked green locally. With the flag set, `StartBuild` returns `IN_PROGRESS` and the project's inline buildspec is handed to the official AWS CodeBuild local agent (`public.ecr.aws/codebuild/local-builds`), which runs the phases in the project's `environment.image` the way CodeBuild does - the phase semantics come from AWS's own agent instead of a reimplemented executor. `BatchGetBuilds` reflects progress while the build runs: the agent's `Phase complete: <PHASE> State: <STATUS>` lines become `phases` entries, and the container's exit status maps to `SUCCEEDED` / `FAILED`, with `FAULT` when Docker is unreachable. `environment.environmentVariables`, `privilegedMode`, and the `CODEBUILD_BUILD_ID` / `_ARN` / `_NUMBER` / `_INITIATOR` variables reach the build. The build reaches back into MiniStack: `AWS_ENDPOINT_URL` (plus placeholder credentials) is injected unless the project declares its own, so `aws s3 cp` inside a build hits this emulator rather than real AWS. `timeoutInMinutes` is enforced (the build is stopped and its phase reported `TIMED_OUT`), and a restored build that was in flight when MiniStack stopped is reported `FAULT` rather than polling as running forever. `StopBuild` is honoured deterministically: it records the intent before removing the container, so the worker reports the requested `STOPPED` instead of racing it to `FAULT`. Build output also reaches CloudWatch Logs: the record already advertised `logs.groupName` / `logs.streamName`, and an executed build now writes the agent output there, so `aws logs get-log-events` and `aws logs tail` read back a real build log instead of an empty stream. Default behaviour is unchanged - without the flag builds stay metadata-only. Requires the Docker socket; the agent image and workspace path are fixed internals, not configurable. Contributed by @igorgawrys1.- **EventBridge Pipes — the SDK data plane is now reachable** — Pipes was fully built (pipe store, background poller, region scoping, persistence, CloudFormation provisioner) but had no REST route, so `aws pipes list-pipes` fell through to S3 virtual-host addressing and returned `NoSuchBucket`. `ListPipes`, `CreatePipe`, `DescribePipe`, `UpdatePipe`, `DeletePipe`, `StartPipe`, `StopPipe`, and the tag operations are now served over boto3 / Terraform / CDK at `pipes.<region>` and `/v1/pipes`, reusing the existing store.- **AWS Config** — control plane for config rules, configuration recorders, and delivery channels: `PutConfigRule` / `DescribeConfigRules` / `DeleteConfigRule`, recorder and delivery-channel CRUD plus their status reads, `StartConfigurationRecorder` / `StopConfigurationRecorder`, and the compliance and evaluation-status reads.- **Cloud Control API (`cloudcontrol`)** — the generic resource control plane behind Terraform's `awscc` provider and CDK L1 constructs: `CreateResource` / `GetResource` / `UpdateResource` / `DeleteResource` / `ListResources` plus the resource-request status and cancel operations, with the AWS `ProgressEvent` and `ResourceDescription` shapes (`Properties` as a JSON string).+- **Cognito — choice-based sign-in in the Hosted UI (`ALLOW_USER_AUTH`)** — the Hosted UI served a single password form regardless of the user pool's sign-in policy. A client whose `ExplicitAuthFlows` includes `ALLOW_USER_AUTH` now drives a multi-step choice-based flow driven by `Policies.SignInPolicy.AllowedFirstAuthFactors`: username, then a challenge-selection screen (skipped when only one factor is allowed), then `PASSWORD` or `EMAIL_OTP` entry, ending in the standard authorization-code redirect. `EMAIL_OTP` codes are fixed at `123456` (consistent with the existing confirmation/reset codes) but verified against the session; `WEB_AUTHN` and `SMS_OTP` are out of scope. Clients without `ALLOW_USER_AUTH` keep the single-page form unchanged. Contributed by @kjdev.+- **KMS — `UpdateKeyDescription`** — the action was not registered, so every call returned `InvalidAction: Unknown action` (HTTP 400) and terraform-provider-aws failed the whole update whenever an `aws_kms_key` description drifted. It now resolves the key by id or ARN, updates the description (an explicit empty string clears it, as on AWS), returns an empty body on success, and `NotFoundException` for an unknown key. Contributed by @sac-outsystems.### Fixed+- **SNS — `$or` operator in subscription filter policies** — a filter policy with a top-level `$or` key was matched with plain AND semantics, so `$or` never matched and every message was silently dropped as non-matching. `$or` is now evaluated the way AWS does: a recognized `$or` (an array of at least two objects whose field names are not reserved rule keywords) matches when any of its member policies matches, sibling keys are AND-ed with it, member keys are AND-ed internally, and nested `$or` is supported; an unrecognized `$or` is treated as a literal attribute name, as on AWS. Applies to the `MessageAttributes` filter scope. Reported by @StiliyanDr.+- **CloudWatch — `GetMetricData` honours `MetricStat` dimensions** — `GetMetricData` resolved a query by namespace and metric name alone, ignoring `MetricStat.Metric.Dimensions`, so it aggregated across every dimension set and even returned data for a dimension value that was never published. Each `(namespace, name, dimension-set)` is a distinct metric; `GetMetricData` now filters by the query's exact dimensions, matching what `GetMetricStatistics` and `ListMetrics` already do. Reported by @boesing.+- **RDS — `StopDBCluster` / `StartDBCluster` now stop and start Aurora compute** — both operations only flipped metadata: a "stopped" cluster's backing container kept running and accepting SQL connections, and its members never left `available`. `StopDBCluster` now stops the cluster's shared container — preserving the container, volume, and data, exactly like Aurora keeps the cluster volume — and marks the cluster and every member `stopped`. `StartDBCluster` restarts the preserved container (recreating compute from the persistent named volume when the container is gone or unrestartable) and, like `CreateDBInstance`, returns immediately with a transitional status while a readiness worker flips the cluster and members to `available` once the database accepts authenticated connections. Invalid transitions return the AWS-exact `InvalidDBClusterStateFault` messages — including `CreateDBInstance`/`DeleteDBInstance` against a stopped cluster — and a warm boot keeps an intentionally stopped cluster stopped instead of reviving its compute. A start whose compute genuinely fails to come back lands the cluster back on `stopped` (retryable) instead of reporting a dead endpoint as `available`, and a stop that cannot stop the container surfaces an error instead of publishing a false `stopped`. Contributed by @kiran01bm.+- **RDS — Aurora PostgreSQL engine versions are validated at create time** — `CreateDBCluster` / `CreateDBInstance` accepted any `EngineVersion` string for `aurora-postgresql`: because the Docker image is derived from the major alone, a bogus minor like `16.99` silently ran PostgreSQL 16 while claiming to be `16.99`, and only an unknown major produced a visible image-pull failure. An unknown version — anything `DescribeDBEngineVersions` doesn't advertise and that isn't a dot-boundary prefix of an advertised version (bare majors like `16` stay accepted, since real AWS resolves them server-side) — now fails immediately with `InvalidParameterCombination` / `Cannot find version {version} for aurora-postgresql`, matching real AWS and the existing aurora-mysql behavior; `DescribeOrderableDBInstanceOptions` rejects unknown versions the same way instead of echoing a fabricated option. The advertised catalog is refreshed to the full creatable set real AWS returns (41 versions, 11.9 through 18.4, including `-limitless` variants, as of 2026-08-06) and is a single shared constant used by both the catalog and the validator; the default `aurora-postgresql` version is now `17.7` (AWS's current default) and the CloudFormation `AWS::RDS::DBCluster` provisioner uses that shared default instead of a hard-coded `15.4`. Contributed by @kiran01bm.+- **RDS — duplicate DB instance wire code matches AWS** — a duplicate `CreateDBInstance`, `CreateDBInstanceReadReplica`, or `RestoreDBInstanceFromDBSnapshot` target returned wire code `DBInstanceAlreadyExistsFault`, but real AWS omits the `Fault` suffix for instance-level error codes (cluster-level codes such as `DBClusterAlreadyExistsFault` keep it). SDKs match the exact string to produce their typed error — aws-sdk-go-v2, for example, deserialized the response as a generic API error instead of the typed `DBInstanceAlreadyExistsFault`. The wire code is now `DBInstanceAlreadyExists`. This deliberately reverts the v1.1.18 change, which mistook the SDK exception *shape name* for the *wire code* — the model's `error.code` field (`DBInstanceAlreadyExists`) is what SDKs match, and exact-string tests now pin the correct direction. Contributed by @kiran01bm.- **Query-protocol services MiniStack does not implement now return a parseable error** — a call to an unimplemented Query service (`redshift`, `elasticbeanstalk`, `cloudsearch`, `sdb`, `importexport`) fell through to S3 and returned a 405 `<Error>` root that botocore's query parser can't read, raising a bare `KeyError('Error')` instead of a `ClientError`. Such requests now return a Query `<ErrorResponse>` envelope (`<Type>Sender</Type>`, code `InvalidAction`) at HTTP 400.- **AWS Backup, CloudFront, Inspector2, and MediaConnect — unrouted read operations** — services MiniStack ships whose REST sub-paths returned `Unknown path`, so an SDK call reached the service and got an error where AWS returns data. Roughly 96 read operations across the four now return AWS-shaped responses (Backup 47, Inspector2 22, CloudFront 14, MediaConnect 13); operations that require a resource store MiniStack does not keep were left unrouted rather than given a fabricated shape.+- **CloudFormation — `AWS::KMS::Key` honours `KeySpec` and update semantics** — the provisioner hard-coded `SYMMETRIC_DEFAULT` and dropped `KeyPolicy`, `Tags`, `Enabled`, and `EnableKeyRotation`, so a template asking for an asymmetric or otherwise-specced key reached `CREATE_COMPLETE` while `DescribeKey` reported a symmetric key, and had no update handler (a changed resource minted a brand-new key). It now delegates to `CreateKey` so the CFN and API paths agree, translates `KeyPolicy`/`Tags`, applies `Enabled`/`EnableKeyRotation`/`RotationPeriodInDays`, adds an update handler that fails the immutable `KeySpec`/`KeyUsage`/`Origin`/`MultiRegion` properties and applies the mutable ones in place, schedules deletion (with `DeletionDate`) instead of dropping the key, and fails the stack on an unimplemented spec rather than silently substituting a symmetric key. `RSA_3072` is now creatable via `CreateKey`. Contributed by @hiddengearz.+- **CloudWatch Logs — Insights `toMillis(@timestamp)` filters and `GetQueryResults` pagination** — the Insights subset ignored `filter toMillis(@timestamp) <=|>=|<|>|=|!= <epoch_ms>`, so sort+limit alone returned the wrong edge of the stream, and `GetQueryResults` returned the full result set regardless of `maxItems`. `toMillis(@timestamp)` comparisons are now honoured, and `GetQueryResults` pages with `maxItems` / `nextToken`. Contributed by @ovsteenb.+- **EC2 — `AuthorizeSecurityGroupIngress` / `AuthorizeSecurityGroupEgress` echo the existing rule on a duplicate** — both operations skip a rule that already exists (idempotency) but also dropped it from the response, returning an empty `securityGroupRuleSet`; terraform-provider-aws reads `SecurityGroupRules[0]` with no length check and panics. The already-present rule is still not re-appended, but it is now echoed in `securityGroupRuleSet` with the same id `DescribeSecurityGroupRules` reports. This hits egress on the first apply, where `CreateSecurityGroup` seeds the default allow-all rule that Terraform then re-declares. Contributed by @sac-outsystems.## [1.4.13] — 2026-08-06diff --git a/README.md b/README.mdindex 98b430cf..ad5199e3 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); EventBridge Scheduler, CodeBuild, and Resource Groups (1.4.4); Batch and SES (1.4.5); Athena, Auto Scaling, Cloud Map, EFS, EMR, Inspector2, Amazon MQ, AppSync, and S3 Files (1.4.6); Amazon Bedrock AgentCore, Amazon MWAA, Amazon EKS, and AWS Transfer Family (1.4.7); AWS IoT and AppSync Events (1.4.8); EC2, CloudTrail, ECR, Glue, OpenSearch, WAFv2, Backup, ACM, Elastic Load Balancing (ALB/NLB), MediaConnect, and RDS Data (1.4.9); Cognito and CloudFormation (1.4.10); API Gateway v1 (1.4.11); API Gateway v2 (1.4.12).+**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); Batch and SES (1.4.5); Athena, Auto Scaling, Cloud Map, EFS, EMR, Inspector2, Amazon MQ, AppSync, and S3 Files (1.4.6); Amazon Bedrock AgentCore, Amazon MWAA, Amazon EKS, and AWS Transfer Family (1.4.7); AWS IoT and AppSync Events (1.4.8); EC2, CloudTrail, ECR, Glue, OpenSearch, WAFv2, Backup, ACM, Elastic Load Balancing (ALB/NLB), MediaConnect, and RDS Data (1.4.9); Cognito and CloudFormation (1.4.10); API Gateway v1 (1.4.11); API Gateway v2 (1.4.12); AWS Config and Cloud Control API (1.4.14).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.@@ -433,11 +433,13 @@ subnet = ec2.create_subnet(| **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), 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; 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` actions; data plane via `{lb-name}.alb.localhost` Host header or `/_alb/{lb-name}/` path prefix |-| **KMS** | CreateKey, ListKeys, DescribeKey, GetPublicKey, Sign, Verify, Encrypt, Decrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, CreateAlias, DeleteAlias, ListAliases, UpdateAlias, EnableKeyRotation, DisableKeyRotation, GetKeyRotationStatus, GetKeyPolicy, PutKeyPolicy, ListKeyPolicies, EnableKey, DisableKey, ScheduleKeyDeletion, CancelKeyDeletion, TagResource, UntagResource, ListResourceTags | 29 actions; CMK specs: RSA (2048/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), and symmetric keys; PKCS1v15, PSS, and ECDSA signing; 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, ListKeys, DescribeKey, GetPublicKey, Sign, Verify, Encrypt, Decrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, CreateAlias, DeleteAlias, ListAliases, UpdateAlias, UpdateKeyDescription, EnableKeyRotation, DisableKeyRotation, GetKeyRotationStatus, GetKeyPolicy, PutKeyPolicy, ListKeyPolicies, EnableKey, DisableKey, ScheduleKeyDeletion, CancelKeyDeletion, TagResource, UntagResource, ListResourceTags | 30 actions; 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), and symmetric keys; PKCS1v15, PSS, and ECDSA signing; 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, 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 || **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 || **Resource Groups** | CreateGroup, GetGroup, DeleteGroup, UpdateGroup, ListGroups, GetGroupQuery, UpdateGroupQuery, GetGroupConfiguration, PutGroupConfiguration, GroupResources, UngroupResources, ListGroupResources, ListGroupingStatuses, SearchResources, Tag, Untag, GetTags, GetAccountSettings, UpdateAccountSettings | 19 of 23 spec ops; tag-sync ops omitted (not exposed by AWS CLI / Terraform); `Group` accepts bare name or full ARN |+| **AWS Config** | PutConfigRule, DescribeConfigRules, DeleteConfigRule, PutConfigurationRecorder, DescribeConfigurationRecorders, DescribeConfigurationRecorderStatus, PutDeliveryChannel, DescribeDeliveryChannels, DescribeDeliveryChannelStatus, StartConfigurationRecorder, StopConfigurationRecorder, DescribeComplianceByConfigRule, GetComplianceDetailsByConfigRule, DescribeConfigRuleEvaluationStatus | Control plane for config rules, configuration recorders, and delivery channels; recorder and delivery-channel CRUD plus their status reads; start/stop recorder; compliance and evaluation-status reads |+| **Cloud Control API** | CreateResource, GetResource, UpdateResource, DeleteResource, ListResources, ListResourceRequests, GetResourceRequestStatus, CancelResourceRequest | Generic resource control plane behind Terraform's `awscc` provider and CDK L1 constructs; AWS `ProgressEvent` and `ResourceDescription` shapes (`Properties` as a JSON string); resource-request status + cancel || **Cost & Usage Reports** | DeleteReportDefinition, DescribeReportDefinitions, ListTagsForResource, ModifyReportDefinition, PutReportDefinition, TagResource, UntagResource | 7 of 7 spec ops || **Inspector2** | Enable, Disable, ListFindings, BatchGetFindingDetails, ListCoverage, ListCoverageStatistics, ListFindingAggregations, SearchVulnerabilities, TagResource, UntagResource, ListTagsForResource, CreateFilter, ListFilters, DeleteFilter | 14 operations; deterministic stub vulnerability findings for ECR images, Lambda functions, and EC2 instances; filtering, sorting, pagination || **AmazonMQ** | CreateBroker, ListBrokers, DescribeBrokers, DeleteBrokers, UpdateBroker, RebootBroker, DescribeBrokerEngineTypes, DescribeBrokerInstanceOptions, CreateTags, ListTags, DeleteTags, CreateUser, DeleteUser, ListUsers, UpdateUser, DescribeUser | 16 of 24 spec ops; No real container support |diff --git a/ministack/services/cloudwatch.py b/ministack/services/cloudwatch.pyindex 42398ee6..41d8766d 100644--- a/ministack/services/cloudwatch.py+++ b/ministack/services/cloudwatch.py@@ -732,13 +732,22 @@ def _get_metric_data(params, cbor_data, is_cbor, is_json=False):_p(params, f"MetricDataQueries.member.{qi}.MetricStat.Stat")or "Average")+ dims = []+ dj = 1+ _dim_base = f"MetricDataQueries.member.{qi}.MetricStat.Metric.Dimensions.member"+ while _p(params, f"{_dim_base}.{dj}.Name"):+ dims.append({+ "Name": _p(params, f"{_dim_base}.{dj}.Name"),+ "Value": _p(params, f"{_dim_base}.{dj}.Value"),+ })+ dj += 1queries.append({"Id": qid,"Label": label,"ReturnData": return_data,"MetricStat": {- "Metric": {"Namespace": ns, "MetricName": mn},+ "Metric": {"Namespace": ns, "MetricName": mn, "Dimensions": dims},"Period": period,"Stat": stat_name,},@@ -777,9 +786,17 @@ def _get_metric_data(params, cbor_data, is_cbor, is_json=False):period = int(ms.get("Period", 60))stat_name = ms.get("Stat", "Average")+ # Each (namespace, name, dimension-set) is a distinct metric. Resolve by+ # the query's dimensions exactly, like GetMetricStatistics — otherwise a+ # value published under one dimension set leaks into queries for another.+ req_dims = _dims_from_list(metric.get("Dimensions") or [])+ req_dims_key = _dims_key(req_dims) if req_dims else None+all_pts = []- for (k_ns, k_mn, _), pts in _metrics.items():+ for (k_ns, k_mn, k_dk), pts in _metrics.items():if k_ns == ns and k_mn == mn:+ if req_dims_key is not None and k_dk != req_dims_key:+ continueall_pts.extend(pts)if start_time is not None:diff --git a/pyproject.toml b/pyproject.tomlindex 75f3f8e2..a418ad5e 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "ministack"-version = "1.4.13"+version = "1.4.14"description = "Free, open-source local AWS emulator — drop-in LocalStack replacement"readme = "README.md"license = { file = "LICENSE" }diff --git a/tests/test_cloudwatch.py b/tests/test_cloudwatch.pyindex 0c464757..575a11af 100644--- a/tests/test_cloudwatch.py+++ b/tests/test_cloudwatch.py@@ -221,6 +221,33 @@ def test_cloudwatch_get_metric_data_v2(cw):assert resp["MetricDataResults"][0]["StatusCode"] == "Complete"assert len(resp["MetricDataResults"][0]["Values"]) >= 1+def test_cloudwatch_get_metric_data_honors_dimensions(cw):+ """GetMetricData resolves by the query's dimension set, like GetMetricStatistics.++ Same namespace + name, two dimension values published; a query for a third,+ unpublished value must return no data rather than leaking another series'.+ """+ ns = "Test/GMDDims"+ cw.put_metric_data(Namespace=ns, MetricData=[+ {"MetricName": "Requests", "Dimensions": [{"Name": "Series", "Value": "A"}], "Value": 100.0},+ {"MetricName": "Requests", "Dimensions": [{"Name": "Series", "Value": "B"}], "Value": 7.0},+ ])++ def _q(qid, series):+ return {"Id": qid, "MetricStat": {"Metric": {+ "Namespace": ns, "MetricName": "Requests",+ "Dimensions": [{"Name": "Series", "Value": series}]},+ "Period": 3600, "Stat": "Maximum"}}++ resp = cw.get_metric_data(+ MetricDataQueries=[_q("a", "A"), _q("b", "B"), _q("c", "C")],+ StartTime=time.time() - 3600, EndTime=time.time() + 3600,+ )+ values = {r["Id"]: r["Values"] for r in resp["MetricDataResults"]}+ assert values["a"] == [100.0]+ assert values["b"] == [7.0]+ assert values["c"] == [] # dimension value never published+def test_cloudwatch_tags_v2(cw):cw.put_metric_alarm(AlarmName="cw-tag-v2",