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
Fix/release v1.1.59 (#223)
Nahuel Nucerad1b02cc0e3fb
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4110d598..032ee83e 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,17 +7,28 @@ Versioning follows [Semantic Versioning](https://semver.org/).----## [Unreleased]+## [1.1.59] — 2026-04-09### Added-- **CloudFormation `ListStackResources` action** — Serverless Framework calls `ListStackResources` during deploy to check provisioned resources. Without this action the deploy fails with `Unknown action: ListStackResources`. Response uses the correct AWS XML shape (`StackResourceSummaries` wrapper with `LastUpdatedTimestamp`). Accepts stack name or stack ID.+- **EventBridge expanded API coverage** — 20 new actions: `ListRuleNamesByTarget`, `TestEventPattern`, `UpdateArchive`, `StartReplay`, `DescribeReplay`, `ListReplays`, `CancelReplay`, `CreateEndpoint`, `DeleteEndpoint`, `DescribeEndpoint`, `ListEndpoints`, `UpdateEndpoint`, `DeauthorizeConnection`, `ActivateEventSource`, `DeactivateEventSource`, `DescribeEventSource`, `CreatePartnerEventSource`, `DeletePartnerEventSource`, `DescribePartnerEventSource`, `ListPartnerEventSources`, `ListPartnerEventSourceAccounts`, `ListEventSources`, `PutPartnerEvents`. Contributed by @aldokimi (#210).+- **CloudFormation `AWS::Kinesis::Stream` provisioner** — create/delete with `ShardCount`, `Name`, `RetentionPeriodHours`, `StreamModeDetails` (ON_DEMAND/PROVISIONED); `Fn::GetAtt` for `Arn`, `StreamId`. Also registered `rds-data` in service handler routing. Contributed by @aldokimi (#207).+- **EC2 default subnets** — default VPC now creates 3 subnets (one per AZ: a/b/c) matching real AWS behavior instead of a single subnet. Contributed by @jayjanssen (#205).+- **Step Functions `States.JsonToString` intrinsic** — counterpart to `States.StringToJson`. Contributed by @jayjanssen (#215).+- **CloudFormation `AWS::ElasticLoadBalancingV2::LoadBalancer` and `::Listener` provisioners** — create/delete with full ALB lifecycle, including default rules, tag propagation, and cascading cleanup. `Fn::GetAtt` for `Arn`, `DNSName`, `LoadBalancerFullName`, `CanonicalHostedZoneID`. Contributed by @aldokimi (#217).++### Fixed+- **EventBridge ARN-as-bus-name in PutEvents** — events published with a full ARN as `EventBusName` (e.g. `arn:aws:events:us-east-1:000000000000:event-bus/my-bus`) were silently dropped because the bus name comparison against rules failed. `PutEvents` now normalizes ARN-style values to the plain bus name before dispatch. Contributed by @ctnnguyen (#208).+- **CloudFormation EventBridge rule composite key** — `_eb_rule_create` and `_eb_rule_delete` used reversed key order (`name|bus` instead of `bus|name`), making CFN-provisioned rules invisible to the EventBridge API (`DescribeRule`, `ListTargetsByRule`) and event dispatch. Now uses `_eb._rule_key()` for consistent key construction. Contributed by @ctnnguyen (#208).+- **CloudFormation EventBridge target storage** — CFN rule provisioner cherry-picked only `Id`, `Arn`, `RoleArn`, `Input`, `InputPath` from targets, dropping `InputTransformer`, `SqsParameters`, `EcsParameters`, and other properties. Now stores the full target dict. Contributed by @ctnnguyen (#208).+- **Step Functions aws-sdk action casing** — SFN ARNs use camelCase (e.g. `createDBSubnetGroup`) but query-protocol and JSON-protocol services expect PascalCase (`CreateDBSubnetGroup`). Both dispatch paths now capitalize the first letter. Contributed by @jayjanssen (#204, #215).+- **RDS `_parse_member_list` botocore format** — list parameters dispatched via Step Functions aws-sdk integrations use `Prefix.MemberName.N` format instead of `Prefix.member.N`. The parser now handles both formats.---## [1.1.58] — 2026-04-09### Fixed-- **Kinesis CBOR protocol support** — `PutRecord` and `PutRecords` from the AWS Java SDK v2 failed with `'utf-8' codec can't decode byte 0xbf`. The Java SDK sends Kinesis requests as CBOR (`application/x-amz-cbor-1.1`) by default, but the handler only accepted JSON. Kinesis now detects CBOR content-type, decodes with `cbor2`, and returns CBOR-encoded responses. Reported by community.+- **Kinesis CBOR protocol support** — `PutRecord` and `PutRecords` from the AWS Java SDK v2 failed with `'utf-8' codec can't decode byte 0xbf`. The Java SDK sends Kinesis requests as CBOR (`application/x-amz-cbor-1.1`) by default, but the handler only accepted JSON. Kinesis now detects CBOR content-type, decodes with `cbor2`, and returns CBOR-encoded responses. Reported by @markwimpory.---diff --git a/README.md b/README.mdindex 0678779b..b2d29318 100644--- a/README.md+++ b/README.md@@ -331,7 +331,7 @@ subnet = ec2.create_subnet(| **SES v2** | SendEmail, CreateEmailIdentity, GetEmailIdentity, DeleteEmailIdentity, ListEmailIdentities, CreateConfigurationSet, GetConfigurationSet, DeleteConfigurationSet, ListConfigurationSets, GetAccount, PutAccountSuppressionAttributes, ListSuppressedDestinations | REST API (`/v2/email/`); identities auto-verified; emails stored in-memory, not sent || **ACM** | RequestCertificate, DescribeCertificate, ListCertificates, DeleteCertificate, GetCertificate, ImportCertificate, AddTagsToCertificate, RemoveTagsFromCertificate, ListTagsForCertificate, UpdateCertificateOptions, RenewCertificate, ResendValidationEmail | Certificates auto-issued; DNS validation records generated; supports SANs || **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.JsonMerge, States.Format); nested startExecution.sync |+| **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, CreateStage, GetStage, GetStages, UpdateStage, DeleteStage, CreateDeployment, GetDeployment, GetDeployments, DeleteDeployment, CreateAuthorizer, GetAuthorizer, GetAuthorizers, UpdateAuthorizer, DeleteAuthorizer, TagResource, UntagResource, GetTags | HTTP API (v2) protocol; Lambda proxy (AWS_PROXY) and HTTP proxy (HTTP_PROXY) integrations; data plane via `{apiId}.execute-api.localhost`; `{param}` and `{proxy+}` path matching; JWT/Lambda authorizer CRUD || **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, 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`; resource tree with `{param}` and `{proxy+}` path matching; JSON Patch for all PATCH operations; state persistence || **ELBv2 / ALB** | CreateLoadBalancer, DescribeLoadBalancers, DeleteLoadBalancer, DescribeLoadBalancerAttributes, ModifyLoadBalancerAttributes, CreateTargetGroup, DescribeTargetGroups, ModifyTargetGroup, DeleteTargetGroup, DescribeTargetGroupAttributes, ModifyTargetGroupAttributes, CreateListener, DescribeListeners, ModifyListener, DeleteListener, CreateRule, DescribeRules, ModifyRule, DeleteRule, SetRulePriorities, 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 |@@ -407,6 +407,8 @@ subnet = ec2.create_subnet(| `AWS::ECS::Cluster` | Cluster name | Arn, ClusterName || `AWS::ECS::TaskDefinition` | Task def ARN | TaskDefinitionArn || `AWS::ECS::Service` | Service ARN | ServiceArn, Name |+| `AWS::ElasticLoadBalancingV2::LoadBalancer` | LB ARN | Arn, DNSName, LoadBalancerFullName, CanonicalHostedZoneID, SecurityGroups |+| `AWS::ElasticLoadBalancingV2::Listener` | Listener ARN | ListenerArn, Arn || `AWS::CloudFormation::WaitCondition` | Condition ID | — || `AWS::CloudFormation::WaitConditionHandle` | Handle URL | — |@@ -815,11 +817,28 @@ Creates VPC with per-VPC default network ACL, security group, and main route tab### AWS CDK-```typescript-// cdk.json or in your app-const app = new cdk.App();-// Set endpoint override via environment-process.env.AWS_ENDPOINT_URL = "http://localhost:4566";+Set `AWS_ENDPOINT_URL` to route all CDK requests to MiniStack:++```bash+export AWS_ENDPOINT_URL=http://localhost:4566+export AWS_ACCESS_KEY_ID=test+export AWS_SECRET_ACCESS_KEY=test+export AWS_DEFAULT_REGION=us-east-1++cdk bootstrap aws://000000000000/us-east-1+cdk deploy --require-approval never+```++> **Important:** Running `cdk deploy` without `AWS_ENDPOINT_URL` will send requests to **real AWS**, not MiniStack. If you see "The security token included in the request is invalid", your requests are hitting AWS — set the endpoint.++To reset the bootstrap stack or delete all state:++```bash+# Delete a specific stack+aws --endpoint-url=http://localhost:4566 cloudformation delete-stack --stack-name CDKToolkit++# Or reset all MiniStack state+curl -X POST http://localhost:4566/_ministack/reset```### Pulumidiff --git a/ministack/services/cloudformation/provisioners.py b/ministack/services/cloudformation/provisioners.pyindex 8b5833dc..ecb8a03b 100644--- a/ministack/services/cloudformation/provisioners.py+++ b/ministack/services/cloudformation/provisioners.py@@ -351,14 +351,15 @@ def _ddb_delete(physical_id, props):# --- Lambda Function ----def _zip_inline(source: str | None, handler: str) -> bytes | None:+def _zip_inline(source: str | None, handler: str, runtime: str = "python3.9") -> bytes | None:"""Wrap inline ZipFile source code into a real zip archive."""if not source:return Nonemodule = handler.split(".")[0] if handler and "." in handler else "index"+ ext = ".js" if runtime.startswith("nodejs") else ".py"buf = io.BytesIO()with zipfile.ZipFile(buf, "w", zipfile.ZIP_DEFLATED) as zf:- zf.writestr(f"{module}.py", source)+ zf.writestr(f"{module}{ext}", source)return buf.getvalue()@@ -398,7 +399,7 @@ def _lambda_create(logical_id, props, stack_name):"TracingConfig": props.get("TracingConfig", {"Mode": "PassThrough"}),"RevisionId": new_uuid(),},- "code_zip": _zip_inline(code.get("ZipFile"), handler),+ "code_zip": _zip_inline(code.get("ZipFile"), handler, runtime),"code_s3_bucket": code.get("S3Bucket"),"code_s3_key": code.get("S3Key"),"versions": {},diff --git a/ministack/services/ec2.py b/ministack/services/ec2.pyindex 6b95eb35..58a270f4 100644--- a/ministack/services/ec2.py+++ b/ministack/services/ec2.py@@ -164,6 +164,8 @@ if _restored:# Default VPC / subnet created at import time so DescribeVpcs always returns something_DEFAULT_VPC_ID = "vpc-00000001"_DEFAULT_SUBNET_ID = "subnet-00000001"+_DEFAULT_SUBNET_ID_B = "subnet-00000002"+_DEFAULT_SUBNET_ID_C = "subnet-00000003"_DEFAULT_SG_ID = "sg-00000001"_DEFAULT_RTB_ID = "rtb-00000001"_DEFAULT_ACL_ID = "acl-00000001"@@ -186,8 +188,8 @@ def _init_defaults():}_default_subnets = [(_DEFAULT_SUBNET_ID, "172.31.0.0/20", f"{REGION}a"),- ("subnet-00000002", "172.31.16.0/20", f"{REGION}b"),- ("subnet-00000003", "172.31.32.0/20", f"{REGION}c"),+ (_DEFAULT_SUBNET_ID_B, "172.31.16.0/20", f"{REGION}b"),+ (_DEFAULT_SUBNET_ID_C, "172.31.32.0/20", f"{REGION}c"),]for subnet_id, cidr, az in _default_subnets:if subnet_id not in _subnets:diff --git a/ministack/services/rds.py b/ministack/services/rds.pyindex 5cbb1648..ff6ca35d 100644--- a/ministack/services/rds.py+++ b/ministack/services/rds.py@@ -1969,7 +1969,12 @@ def _parse_tags(params):def _parse_member_list(params, prefix):- """Parse Prefix.member.N style lists from query params."""+ """Parse list params in either Prefix.member.N or Prefix.<MemberName>.N format.++ The member.N format is used by direct AWS CLI/SDK calls. The <MemberName>.N+ format is produced by botocore's serializer when dispatched via Step Functions+ aws-sdk integrations (e.g. SubnetIds.SubnetIdentifier.N).+ """items = []i = 1while True:@@ -1978,7 +1983,18 @@ def _parse_member_list(params, prefix):breakitems.append(val)i += 1- return items+ if items:+ return items+ # Fall back to Prefix.<AnyMemberName>.N (botocore serializer format)+ import re+ pattern = re.compile(rf"^{re.escape(prefix)}\.([^.]+)\.(\d+)$")+ numbered = {}+ for key in params:+ m = pattern.match(key)+ if m:+ idx = int(m.group(2))+ numbered[idx] = _p(params, key)+ return [numbered[k] for k in sorted(numbered)] if numbered else []def _parse_filters(params):diff --git a/pyproject.toml b/pyproject.tomlindex 65705efb..54c944b2 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"[project]name = "ministack"-version = "1.1.58"+version = "1.1.59"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 0ece780b..d4f993cd 100644--- a/tests/test_cfn.py+++ b/tests/test_cfn.py@@ -1205,3 +1205,36 @@ def test_cfn_ssm_parameter_timestamp_is_epoch(cfn, ssm):finally:cfn.delete_stack(StackName="cfn-ssm-epoch")_wait_stack(cfn, "cfn-ssm-epoch")+++def test_cfn_lambda_nodejs_inline_zip(cfn, lam):+ """CFN inline ZipFile with Node.js runtime should write index.js, not index.py."""+ template = json.dumps({+ "AWSTemplateFormatVersion": "2010-09-09",+ "Resources": {+ "Fn": {+ "Type": "AWS::Lambda::Function",+ "Properties": {+ "FunctionName": "cfn-nodejs-inline",+ "Runtime": "nodejs20.x",+ "Handler": "index.handler",+ "Role": "arn:aws:iam::000000000000:role/r",+ "Code": {+ "ZipFile": 'exports.handler = async () => { return "hello"; };',+ },+ },+ },+ },+ })+ cfn.create_stack(StackName="cfn-nodejs-inline", TemplateBody=template)+ stack = _wait_stack(cfn, "cfn-nodejs-inline")+ assert stack["StackStatus"] == "CREATE_COMPLETE"++ resp = lam.invoke(FunctionName="cfn-nodejs-inline",+ Payload=b'{}')+ assert resp["StatusCode"] == 200+ payload = resp["Payload"].read().decode()+ assert "hello" in payload++ cfn.delete_stack(StackName="cfn-nodejs-inline")+ _wait_stack(cfn, "cfn-nodejs-inline")diff --git a/tests/test_ec2.py b/tests/test_ec2.pyindex f9b9864d..ce812c36 100644--- a/tests/test_ec2.py+++ b/tests/test_ec2.py@@ -1110,3 +1110,23 @@ def test_ec2_launch_template_not_found(ec2):with pytest.raises(ClientError) as exc:ec2.describe_launch_template_versions(LaunchTemplateId="lt-nonexistent")assert "NotFound" in exc.value.response["Error"]["Code"]+++def test_ec2_default_subnets_three_azs(ec2):+ """Default VPC should have 3 subnets, one per AZ (a/b/c) with correct CIDRs."""+ resp = ec2.describe_subnets(Filters=[{"Name": "vpc-id", "Values": ["vpc-00000001"]}])+ subnets = resp["Subnets"]+ assert len(subnets) >= 3++ by_az = {s["AvailabilityZone"]: s for s in subnets}+ assert "us-east-1a" in by_az+ assert "us-east-1b" in by_az+ assert "us-east-1c" in by_az++ assert by_az["us-east-1a"]["CidrBlock"] == "172.31.0.0/20"+ assert by_az["us-east-1b"]["CidrBlock"] == "172.31.16.0/20"+ assert by_az["us-east-1c"]["CidrBlock"] == "172.31.32.0/20"++ for s in subnets:+ assert s["DefaultForAz"] is True+ assert s["MapPublicIpOnLaunch"] is Truediff --git a/tests/test_rds.py b/tests/test_rds.pyindex 939cd031..010685dd 100644--- a/tests/test_rds.py+++ b/tests/test_rds.py@@ -444,3 +444,28 @@ def test_rds_global_cluster_modify(rds):rds.delete_global_cluster(GlobalClusterIdentifier="test-global-renamed")except Exception:pass+++def test_rds_parse_member_list_both_formats():+ """_parse_member_list handles both Prefix.member.N and Prefix.MemberName.N formats."""+ from ministack.services.rds import _parse_member_list++ # Standard member.N format (direct API calls)+ params_standard = {+ "SubnetIds.member.1": "subnet-aaa",+ "SubnetIds.member.2": "subnet-bbb",+ }+ result = _parse_member_list(params_standard, "SubnetIds")+ assert result == ["subnet-aaa", "subnet-bbb"]++ # Botocore serializer format: Prefix.MemberName.N (via SFN aws-sdk)+ params_botocore = {+ "SubnetIds.SubnetIdentifier.1": "subnet-xxx",+ "SubnetIds.SubnetIdentifier.2": "subnet-yyy",+ "SubnetIds.SubnetIdentifier.3": "subnet-zzz",+ }+ result2 = _parse_member_list(params_botocore, "SubnetIds")+ assert result2 == ["subnet-xxx", "subnet-yyy", "subnet-zzz"]++ # Empty case+ assert _parse_member_list({}, "SubnetIds") == []diff --git a/tests/test_sfn.py b/tests/test_sfn.pyindex 0e169d4a..4189c583 100644--- a/tests/test_sfn.py+++ b/tests/test_sfn.py@@ -1962,3 +1962,118 @@ def test_sfn_start_execution_not_found(sfn):sfn.start_execution(stateMachineArn="arn:aws:states:us-east-1:000000000000:stateMachine:nonexistent-99")err = exc.value.response["Error"]["Code"]assert "StateMachineDoesNotExist" in err or "NotFound" in err or "ResourceNotFound" in err+++def test_sfn_intrinsic_json_to_string(sfn, sfn_sync):+ """States.JsonToString serializes structured data to a compact JSON string."""+ definition = json.dumps({+ "StartAt": "Serialize",+ "States": {+ "Serialize": {+ "Type": "Pass",+ "Parameters": {+ "serialized.$": "States.JsonToString($.obj)"+ },+ "End": True,+ }+ },+ })+ sm = sfn.create_state_machine(+ name="sfn-intrinsic-j2s",+ definition=definition,+ roleArn="arn:aws:iam::000000000000:role/R",+ )+ resp = sfn_sync.start_sync_execution(+ stateMachineArn=sm["stateMachineArn"],+ input=json.dumps({"obj": {"a": 1, "b": [2, 3]}}),+ )+ assert resp["status"] == "SUCCEEDED"+ output = json.loads(resp["output"])+ # Should be compact JSON (no spaces)+ parsed = json.loads(output["serialized"])+ assert parsed == {"a": 1, "b": [2, 3]}+ assert " " not in output["serialized"]+++def test_sfn_aws_sdk_query_pascal_case(sfn, sfn_sync, ssm):+ """SFN aws-sdk integration converts camelCase action to PascalCase for query-protocol services."""+ definition = json.dumps({+ "StartAt": "PutParam",+ "States": {+ "PutParam": {+ "Type": "Task",+ "Resource": "arn:aws:states:::aws-sdk:ssm:putParameter",+ "Parameters": {+ "Name": "sfn-pascal-test-param",+ "Value": "hello-from-sfn",+ "Type": "String",+ "Overwrite": True,+ },+ "ResultPath": "$.putResult",+ "Next": "GetParam",+ },+ "GetParam": {+ "Type": "Task",+ "Resource": "arn:aws:states:::aws-sdk:ssm:getParameter",+ "Parameters": {+ "Name": "sfn-pascal-test-param",+ },+ "End": True,+ },+ },+ })+ sm = sfn.create_state_machine(+ name="sfn-pascal-query",+ definition=definition,+ roleArn="arn:aws:iam::000000000000:role/R",+ )+ resp = sfn_sync.start_sync_execution(+ stateMachineArn=sm["stateMachineArn"],+ input="{}",+ )+ assert resp["status"] == "SUCCEEDED"+ output = json.loads(resp["output"])+ assert output["Parameter"]["Value"] == "hello-from-sfn"+ # Cleanup+ ssm.delete_parameter(Name="sfn-pascal-test-param")+++def test_sfn_aws_sdk_json_pascal_case(sfn, sfn_sync, sm):+ """SFN aws-sdk integration converts camelCase action to PascalCase for JSON-protocol services."""+ definition = json.dumps({+ "StartAt": "CreateSecret",+ "States": {+ "CreateSecret": {+ "Type": "Task",+ "Resource": "arn:aws:states:::aws-sdk:secretsmanager:createSecret",+ "Parameters": {+ "Name": "sfn-pascal-json-secret",+ "SecretString": "my-secret-value",+ },+ "ResultPath": "$.createResult",+ "Next": "GetSecret",+ },+ "GetSecret": {+ "Type": "Task",+ "Resource": "arn:aws:states:::aws-sdk:secretsmanager:getSecretValue",+ "Parameters": {+ "SecretId": "sfn-pascal-json-secret",+ },+ "End": True,+ },+ },+ })+ sm_resp = sfn.create_state_machine(+ name="sfn-pascal-json",+ definition=definition,+ roleArn="arn:aws:iam::000000000000:role/R",+ )+ resp = sfn_sync.start_sync_execution(+ stateMachineArn=sm_resp["stateMachineArn"],+ input="{}",+ )+ assert resp["status"] == "SUCCEEDED"+ output = json.loads(resp["output"])+ assert output["SecretString"] == "my-secret-value"+ # Cleanup+ sm.delete_secret(SecretId="sfn-pascal-json-secret", ForceDeleteWithoutRecovery=True)