Pin JSONPath and JSONata mapping updates, state transitions, and response casing. Consolidate invalid request coverage and reject the legacy UUID spelling with the expected error message.
Related to floci-io/floci#7697; the runtime fix landed in #7720.
Under IAM enforcement, these tasks are now authorized as the execution role, or as the Credentials role a state names. DynamoDB is checked as a direct request is: batches on each table, transactions by each item's own action, ListTables on its regional collection and statements by what they do. S3 putObject is checked on the object in the bucket's own partition, and a bucket policy can grant or deny. RDS Data needs the action on the cluster and GetSecretValue on the secret. Redshift Data needs what an EventBridge target needs, and its statement operations are checked on any resource.
A request naming nothing it can reach is left to its service. With enforcement off nothing changes.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* feat(stepfunctions): evaluate the execution role on SQS tasks
Under IAM enforcement an SQS task now requires the execution role to exist
and trust Step Functions, assumes the role its Credentials name, and checks
sqs:SendMessage on the queue as the role it ends up with. LambdaTaskAuthorizer
gains a general authorize() that later integrations map onto through
TaskPermissions; it reads any service's resource policy and accepts resource
* and an S3 ARN's empty account. Lambda, API Gateway and nested tasks keep
their own paths and errors.
TaskScheduled and LambdaFunctionScheduled record taskCredentials when a task
declares Credentials. With enforcement off they are read softly, so a RoleArn
that does not resolve is omitted and the task still runs.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* fix(stepfunctions): let a queue's policy decide SQS task and direct calls
SQS had no resource policy provider, so a task's call to a queue in another account could never be granted. Add one reading the queue's Policy attribute, which IAM enforcement and the task authorizer both read, and build a direct request's ARN from the account its QueueUrl names so the right queue's policy is read.
Credentials read only for history now tolerate only a resolution failure, and the Step Functions integration tests share one client.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* feat(sfn): apply the EventBridge connection to HTTP Tasks
An HTTP Task now resolves the connection named by InvocationConfig or
Authentication. Its authorization, headers, query parameters and body
parameters are merged over the task's, and the connection's value wins on
a duplicate key, as the AWS HTTP Task guide describes. The body is merged
before Transform encodes it. A string body with connection body
parameters fails with States.Runtime, and an unknown connection fails
with Events.ConnectionResource.ResourceNotFound.
The connection logic is the API destination's: EventBridgeInvoker exposes
it as connectionHttpParameters, so both callers share one implementation,
OAuth client credentials included.
* fix(sfn): keep case-distinct query parameters and bound OAuth by the HTTP Task timeout
A connection query parameter now replaces only a task parameter of the exact same name, since query names are case-sensitive. The connection's OAuth token exchange now spends the task's TimeoutSeconds, so the API request gets only the time left.
* chore: retrigger CI
* fix(stepfunctions): authorize callbacks with generated resource lookups
Preserve measured callback resource authorization, token ownership and closed-token behavior. Use explicit generated member lookups, retaining ordinary name resolution and invalid-token precedence. Preserve current main Redshift session-through lookups, generator type validation and payment alias consumers.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* test(stepfunctions): reuse the SQS callback queue fixture
Create callback queues through SqsTestQueue and await token JSON with the shared in-process helper. Retain the existing callback authorization matrix, token error precedence and cleanup registration.
Signed-off-by: Andre Kurait <akurait@amazon.com>
---------
Signed-off-by: Andre Kurait <akurait@amazon.com>
* feat(stepfunctions): dispatch ECS Lambda mapping and secret SDK tasks
* fix(stepfunctions): render ECS task-set StabilityStatusAt as ISO-8601
* refactor(stepfunctions): share recase and timestamp helpers with SDK management invoker
Reuse AslExecutor.recaseKeys (with a verbatim-key set), capitalizeFirst and a
single renderSdkTimestamps walker instead of copies in SdkManagementTaskInvoker,
and inject the invoker through the AslExecutor constructor.
A PutEvents entry naming an event bus that does not exist failed with
InvalidArgument "EventBus not found" and counted in FailedEntryCount.
The EventBridge User Guide, on handling PutEvents failures: "If you use
PutEvents to publish an event to an event bus that does not exist,
EventBridge event matching will not find a corresponding rule and will
drop the event. Although EventBridge will send a 200 response, it will
not fail the request or include the event in the FailedEntryCount value
of the request response." botocore models no not-found error for
PutEvents, only InternalException, and the API Reference lists none.
Such an entry is now answered as published, with an event id and not
counted as failed, and dropped: it reaches no rule and no archive.
Floci logs the drop at INFO. An entry that is not valid, missing a
required field or with a Detail that is no JSON object, still fails as
before, whichever bus it names.
Only the PutEvents action changes. Floci's own deliveries to a bus, for
a rule's event bus target, a pipe, a schedule, a Lambda destination or
a replay, still fail an entry for a bus that does not exist: the
guide's sentence is about the action, and no document says how AWS
answers those deliveries.
Step Functions' optimized events:putEvents integration calls the
action, so a task publishing to a missing bus no longer fails with
EventBridge.FailedEntry; step-functions.md listed that as a deviation,
which is gone. Its two tests that used a missing bus to have an entry
rejected now leave out the entry's Source instead, and a third checks
that a task publishing to a missing bus succeeds.
* fix(stepfunctions): page GetExecutionHistory and honor reverseOrder
GetExecutionHistory read only executionArn and includeExecutionData.
Every call returned the whole history, oldest event first: maxResults
and nextToken were ignored, and reverseOrder=true still listed
ExecutionStarted first, so a caller asking for the newest event with
reverseOrder and maxResults=1 got the oldest one instead. The API
reference pages the history by 100 events unless maxResults says
otherwise, allows at most 1,000, returns a nextToken while events
remain, and lists the newest event first under reverseOrder.
Page the history by event id. Ids rise in the order events are
recorded, so a page starts after the last event the previous page
returned, even while the execution is still recording events. An
omitted or zero maxResults uses 100; a maxResults outside 0 to 1,000
or a nextToken outside 1 to 1,024 characters is a ValidationException,
as for ListActivities. A token names its execution and its
reverseOrder, so it is refused with InvalidToken for any other, while
maxResults and includeExecutionData may change from one page to the
next.
Tokens are signed with SignedMarkers and carry their issue time. An
edited token, one issued before a restart, or one issued more than 24
hours earlier is refused with InvalidToken; the 24-hour expiry is the
one the API reference documents. The execution is named in the token
by the SHA-256 of its ARN, so a token stays under 200 characters
however long the state machine and execution names are.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): page execution history with the SDK paginator
Run a 60-state execution, whose history of 122 events is longer than
one default page, and read it with the AWS SDK for Java: a plain call
returns 100 events and a nextToken, the paginator at 25 events a page
returns every event once, oldest first or with reverseOrder newest
first, and reverseOrder with maxResults=1 returns ExecutionSucceeded
with a token for the rest.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): give the ListExecutions filter test a clock
StepFunctionsListExecutionsFilterTest, merged from upstream main, built
the handler with the two-argument constructor. On this branch the
handler takes the application Clock for the lifetime of execution
history tokens, so the merged tree did not compile. Pass the system
clock, which ListExecutions does not read.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): pin the page-size checks of ListActivities and history
ListActivities and GetExecutionHistory each check maxResults and
nextToken on their own, with the same bounds and messages, and page by
100 when maxResults is omitted or 0. Pin the messages of both and the
ListActivities default before the two move onto one helper.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* refactor(stepfunctions): share the page-size checks of ListActivities and history
ListActivities and GetExecutionHistory each checked that maxResults is
0 to 1,000 and nextToken 1 to 1,024 characters, with the same messages,
and turned an omitted or zero maxResults into 100. Move that into
StepFunctionsPaging.pageSize, which validates the pair and returns the
page size, so the other Step Functions list operations can use it
later. Behaviour, messages and the order of the checks are unchanged.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): say why the paginator test ignores cleanup failures
The SDK paginator test deleted its state machine in a catch-all that
neither logged nor explained the failure it ignored. Say why it is
safe: the state machine has a unique name, and a cleanup failure must
not hide the test's own result.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): pin the page-size bounds and the order of the checks
Pin that ListActivities and GetExecutionHistory accept the bounds
themselves (a 1- or 1,024-character nextToken reaches the token
lookup, and ListActivities takes maxResults=1000), and that both read
maxResults and nextToken before bounding either. The test's cleanup
deletes its activities without asserting, so a failed delete can no
longer hide the test's own failure.
The last check is the one place where the shared helper changed
behaviour, which the commit that added it wrongly said it did not. A
history request with maxResults=1001 and a non-string nextToken used
to report the maxResults bound; it now reports "nextToken must be a
string.", as ListActivities always has. The new test fails that way
on the commit before the helper and passes after it.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* docs(stepfunctions): describe StepFunctionsPaging by its two callers
The class comment said every Step Functions list operation shares this
page request. Only ListActivities and GetExecutionHistory do;
ListStateMachineAliases still checks its own bounds. Name the two
callers and say that both fields are read before either is bounded.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): share one request helper between the paging tests
StepFunctionsPageSizeIntegrationTest and
StepFunctionsExecutionHistoryPaginationIntegrationTest each carried
the same private call() and content type. Add StepFunctionsRequests in
the testing package, as CfnRequests and EmrRequests serve their
services, and move both tests onto its sfn(action, body). The requests
they send are unchanged.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
* test(stepfunctions): take the request body of sfn() as a map
sfn() took any Object and said it serializes the body as JSON, which
holds for a map but not for a string, which RestAssured sends as is.
Both callers pass maps, as the private helpers it replaced took, so
type the parameter as Map<String, ?>.
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
---------
Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
Use the effective Lambda qualifier for optimized task authorization, target resolution and executor handoff. Keep embedded qualifier conflict validation aligned with Lambda.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
Carry the invoked Lambda alias or version into execution capacity selection after authorization, preserving the unqualified path.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(stepfunctions): honor ListExecutions status filters
Filter by the requested current status, validating filter values and types before listing executions. Serialize the captured matching status, preserve unfiltered behavior, and cover the wire path through the normal SDK suite.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(stepfunctions): reject unsupported pending-redrive listings
Reject PENDING_REDRIVE consistently without implying map-run listing support. Exercise execution filters through explicit stop completion instead of polling for asynchronous success.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
* fix(stepfunctions): use Smithy status filter validation
Reuse the shared enum validation helper and preserve the AWS status ordering in invalid ListExecutions filter errors. Verify exact messages before service access and through boto3.
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
---------
Signed-off-by: Andre Kurait <AndreKurait@gmail.com>
A Task can now use the six optimized EMR Serverless integrations the
Step Functions guide lists: createApplication, startApplication,
stopApplication, deleteApplication, startJobRun and cancelJobRun, each
request-response and .sync. Each calls Floci's EMR Serverless in the
state machine's Region. They failed with "Unsupported resource" before.
A Task names the API's members in PascalCase where the API writes them
in camelCase, so a request and a response are mapped against botocore's
EMR Serverless model, now vendored as aws/emr-serverless-shapes.json by
tools/aws/regen_emr_serverless_shapes.py: a structure's members are
renamed, a map keeps the keys the state machine wrote (tags,
InitialCapacity's DRIVER, a configuration's Properties such as
spark.executor.memory), and a member the model does not have is
dropped. A member, ApplicationId and JobRunId included, may be written
in either case. One the model has and Floci's request class lacks is
refused rather than dropped, and a test holds the classes to the model.
request_shapes.py can now keep output shapes for it. A request
without ClientToken gets a random one, as the SDK fills an idempotency
token in; the guide's examples leave it out.
The result is the API's response in PascalCase, or {"ApplicationId"}
where the API answers nothing, as the guide's table says. The guide
finds no difference between a .sync response and the API's, so a .sync
result is the starting call's own: state machines read a
createApplication.sync result's ApplicationId and a startJobRun.sync
result's JobRunId. A .sync Task records TaskSubmitted and polls
GetApplication or GetJobRun until the state the guide names, as the
elasticmapreduce ones do; a run that ends FAILED or CANCELLED, or an
application that can no longer get there, fails the Task with
States.TaskFailed and the describe response as the cause. A wait that
ends early cancels the run of a startJobRun.sync, stops the application
of a startApplication.sync and deletes the one a createApplication.sync
made, the call each integration's IAM policy grants beyond its own and
its read. EMR Serverless answering that the application or run is gone
or past undoing is logged and leaves the Task ending as it was; any
other failure is raised.
An EMR Serverless error keeps its code under EmrServerless., the
exception prefix the guide gives the service; no record shows the
optimized integration's. A Task without the ApplicationId, or a
cancelJobRun without the JobRunId, it acts on fails with
States.TaskFailed before EMR Serverless sees it.
CreateApplication now stores the configurations UpdateApplication
already did (runtime, monitoring, scheduler, disk encryption,
interactive, Identity Center and job-level cost allocation), and
ImageConfiguration keeps applicationLevelDigestResolution. Both were
dropped, from a Task and from the API alike. A runtime configuration
kept only its properties, lifted out of their member: Jackson bound the
properties member to the field of that name holding every member read.
It keeps its classification and properties now, on update as well.
GetApplication no longer returns the application's clientToken, which
its Application has no member for and which the .sync waits read. The
token stays with the stored application, which CreateApplication's
retries are matched on.
The .sync wait loop the elasticmapreduce integrations had is now shared
by both, as are their request and failure helpers, and the two EMR
Step Functions tests share their state machine helpers.
Part of #6046 (part 11).
A Task can now use the optimized EMR integrations the Step Functions
guide lists: createCluster, setClusterTerminationProtection,
terminateCluster, addStep, cancelStep, modifyInstanceFleetByName and
modifyInstanceGroupByName, with .sync for createCluster, terminateCluster
and addStep. Each calls Floci's EMR in the state machine's Region under
the guide's field names: ClusterId for JobFlowIds or JobFlowId, a single
Step or StepId, and the instance fleet or group found by name through
ListInstanceFleets or ListInstanceGroups. They failed with "Unsupported
resource" before.
A .sync Task records TaskSubmitted with the call's result and polls
DescribeCluster or DescribeStep under the Task's TimeoutSeconds and the
execution's budget, as ecs:runTask.sync does. Its result is the describe
response with the call's result after it, which is the createCluster.sync
output recorded on AWS (Cluster, then ClusterId). A step that ends FAILED,
CANCELLED or INTERRUPTED, or a cluster that terminates before WAITING,
fails the Task with States.TaskFailed and the describe response as the
cause. A wait that ends early cancels the step of an addStep.sync; a
cluster is left running, as the guide says Step Functions does.
An EMR error is named after the SDK exception class under EMR.:
InvalidRequestException and InternalServerException keep their names,
and any other code is EMR.AmazonElasticMapReduceException, as AWS reports
a ValidationException. createCluster refuses
KeepJobFlowAliveWhenNoSteps other than true and Steps, as the guide
requires, with States.TaskFailed and the guide's wording for each rule.
A Task without the ClusterId its API acts on, a cancelStep without a
StepId and a ByName request without its name fail the same way.
AddJobFlowSteps on an unknown cluster, or on one in another Region, now
answers ValidationException "Specified job flow ID does not exist.", as
AWS does: a botocore ClientError (raster-foundry/raster-foundry#352) and
a CloudTrail record on AWS re:Post show it. It answered DescribeCluster's
InvalidRequestException. That re:Post record is an addStep.sync failing
on an unknown cluster with EMR.AmazonElasticMapReduceException, which
addStep now reports as well.
ModifyInstanceGroups and ModifyInstanceFleet on a terminated cluster,
which modifyInstanceGroupByName and modifyInstanceFleetByName reach, now
answer as AWS does too: ValidationException "An instance group may only
be modified when the cluster is running or waiting."
(hashicorp/terraform-provider-aws#1355 and hashicorp/terraform-provider-aws#9400)
and InvalidRequestException "A job flow that is shutting down,
terminated, or finished may not be modified." with ErrorCode
INVALID_JOB_SHUT_DOWN (hashicorp/terraform-provider-aws#31375). Both answered InvalidRequestException "Cluster <id> is
terminated.", which no AWS response shows, and EMR's error body now
carries an error's extra members such as ErrorCode.
TerminateJobFlows, the four Set* cluster setters and CancelSteps now
refuse a request without a member their model requires (JobFlowIds and
the setting, or StepIds) with AWS's framework ValidationException, as
RunJobFlow does for Name. They read a missing list as empty and a missing
setting as its default and answered success, which the
setClusterTerminationProtection and terminateCluster integrations reached
too. The "Member must not be null" violation is now one helper in
SmithyValidationErrors.
Part of #6046 (part 10).
Reject the live-AWS-verified reserved names and hyphenated prefixes before state-machine creation or update, including JSONata and nested workflows. Share the existing exact-name policy with the invoker, preserve nearby accepted header names and keep the current response parser behavior.
Signed-off-by: Andre Kurait <akurait@amazon.com>
* feat(sfn): encode HTTP Task object bodies as form data
* refactor(sfn): simplify HTTP Task payload encoding
Reuse the shared RFC 3986 URI encoder and remove the unused form payload branch while preserving buffer and no-body requests.
* feat(stepfunctions): emit execution status change events to EventBridge
STANDARD executions now publish "Step Functions Execution Status Change"
events (source aws.states) to the default EventBridge bus on RUNNING,
SUCCEEDED, FAILED, TIMED_OUT and ABORTED, so rules matching aws.states
fire as they do on AWS. EXPRESS executions emit nothing, as on AWS.
StepFunctionsEventPublisher follows the EcsEventPublisher pattern.
RUNNING is published when StartExecution creates the execution, terminal
statuses from the worker's completion callback, and ABORTED from
StopExecution only, so a stopped execution emits exactly one ABORTED.
An idempotent StartExecution and the startup sweep of executions
abandoned by a restart emit nothing.
* fix(stepfunctions): match the documented execution status change event
Address review feedback on the aws.states events:
- Always send stateMachineVersionArn and stateMachineAliasArn, null
when unused, as AWS's documented events do.
- Report redrive status as the documented examples do: FAILED and
TIMED_OUT are REDRIVABLE with "Execution is <status> and is
redrivable"; RUNNING, SUCCEEDED and ABORTED are NOT_REDRIVABLE with
"Execution is <status> and cannot be redriven".
- Name States.Timeout as the error of a TIMED_OUT event.
- Apply the 248 KiB rule: input is left out when the escaped input
and output together exceed it, output when the escaped output alone
does, and inputDetails/outputDetails.included report it.
* test(stepfunctions): check event absences without waiting on empty queues
The integration test long-polled SQS for 2 s after each case to show
nothing more arrived, so the class waited about 10 s by design. It now
asserts only the events that should arrive. The absences that matter
are checked in StepFunctionsServiceExecutionEventsTest: it captures the
completion callback from a mocked AslExecutor and verifies that an
EXPRESS execution publishes nothing and that the worker's callback
after StopExecution adds no second ABORTED.
Add StepFunctionsExecutions.waitForTerminalState to the shared testing
package and use it here; moving the other Step Functions integration
tests onto it is left for a separate PR.
Under IAM enforcement, a Lambda task naming a function in another account was refused outright,
because Floci evaluated no Lambda function policy when #5079 added the check, and a task on a
function in the state machine's own account was not checked at all. Function policies now take
part in authorization (#5476), so a task is decided the way Lambda decides the Invoke call the
execution role makes (Step Functions Developer Guide, "I can't invoke a Lambda function from
another account"): within one account the role's policies or the function's policy can allow it,
and across accounts both have to (IAM User Guide, cross-account policy evaluation logic).
- LambdaTaskAuthorizer evaluates the role's policies, its permissions boundary and its account's
SCPs together with the function policy LambdaResourcePolicyProvider supplies. The role ARN has
to name an existing role, path included, matched as STS AssumeRole matches one
(IamService.roleArnMatches), and the role is evaluated under the ARN IAM holds for it.
- The task is authorized against the function ARN LambdaArnUtils.functionArn gives for its
reference: a full ARN as written, a name or partial ARN completed in the state machine's
partition, Region and account, with the version or alias it names, as Lambda authorizes an
invoke.
- A task whose Credentials name a role invokes the function as that role, once the execution role
has assumed it (Developer Guide, Task state "Credentials"). The role's trust policy has to allow
the execution role, with the state machine's ARN as sts:ExternalId, which the cross-account
tutorial's trust policy checks. The execution role's own policies have to allow sts:AssumeRole
on the role too when it is in another account, or when the trust policy names only the execution
role's account, since an account principal delegates to the account (IAM User Guide, "AWS
account principals"); AssumeRolePolicyEvaluator.decide tells the two grants apart. RoleArn is
read the way the task's Parameters or Arguments are. A role the execution role cannot assume
fails the task with States.Permissions, the Developer Guide's error for a task without the
privileges to run.
- A refusal to invoke fails the task with Lambda.AccessDeniedException. The cause names the role's
session as the Step Functions Developer Guide shows it
(arn:aws:sts::<account>:assumed-role/<role>) and ends in the IAM User Guide's context for the
policy type that refused it, explicit denials first, each in AWS's evaluation order: service
control policies, the resource-based policy or role trust policy, identity-based policies, the
permissions boundary.
* feat(redshift-data): add async execution and statement status events
* fix(redshift-data): address review findings on async Data API
- Mark a statement FAILED when its worker dies unexpectedly instead of leaving it active
- Let unexpected publisher errors propagate; the delivery pool logs them at error level
- Run CREATE/DROP INDEX CONCURRENTLY, REINDEX CONCURRENTLY, ALTER SYSTEM and tablespace DDL outside a transaction
- Drop WaitTimeSeconds from Scheduler targets so the shared dispatcher thread never blocks
- Share result rows and column metadata between snapshots; ListStatements no longer copies results
- Replace the global monitor with a ReentrantReadWriteLock for status writes and reset
* fix(redshift-data): reject CancelStatement on terminal statements
- Throw ValidationException ("Could not cancel a query that is already in <STATE> state.") instead of returning Status false, as AWS does
- Use WaitTimeSeconds instead of 30 s polling in the Serverless compatibility test and the Spectrum integration test
* fix(redshift-data): match AWS CancelStatement message and tidy test signature
- Append "with ID: <id>" to the terminal-state ValidationException message
- Drop the unused throws InterruptedException from workgroupLifecycleUsesAwsSdk
* feat(redshift): run Data API statements from Step Functions and Scheduler
Step Functions: add the arn:aws:states:::aws-sdk:redshiftdata:<action> Task
integration. It reuses RedshiftDataJsonHandler, so every Data API action
Floci implements works for provisioned clusters (ClusterIdentifier) and
Serverless workgroups (WorkgroupName). Arguments and results keep the wire
PascalCase names, CreatedAt and UpdatedAt are ISO-8601 at any depth, errors
surface as RedshiftData.<Code>Exception, and the task fails when redshift
or redshift-data is disabled. .sync resources are rejected, as AWS has no
such variant.
Scheduler: add the redshiftdata:executeStatement and
redshiftdata:batchExecuteStatement universal targets. The call runs as the
schedule's account and region, because the dispatcher thread carries no
request account and cluster and statement storage is account-aware. A SQL
error stays on the statement; a request the Data API rejects propagates so
the existing retry and dead-letter handling applies.
* fix(redshift-data): validate task input and isolate statement storage by account
* fix(redshift): run scheduled Data API statements off the dispatcher thread
Keep the request check on the dispatcher so a rejected request still
retries, and run the SQL on its own thread under the schedule's account.
Ask ServiceRegistry whether redshift-data is enabled instead of repeating
the rule, keep the resolver and connection factory package-private, and
cover the provisioned-cluster account in the resolver test.
* fix(scheduler): await scheduled Redshift Data statement in docker test
* docs(partition): document deployment, test coverage and known gaps
partitions.md said every partition-dependent rule had integration tests
over all eight partitions and that the China compat allowlist only
shrinks. Neither is accurate now: most services are tested in China
alone, and the allowlist is empty. The page now states the coverage as
it is (unit tests over every partition, IAM, Step Functions and the
cross-service smoke test through the emulator, China end to end), gives
a recipe for running a China, GovCloud, ISO or EUSC deployment, and
lists the known gaps: global state shared across partitions in one
process (now naming the Identity Center instance, which the smoke
test's inventory exempts for that reason), the commercial managed-policy
catalog, and client tooling untested outside the commercial partition.
API Gateway, IAM and Step Functions gain a Partitions section, and the
WAFv2 scope note names the partition's CloudFront region and where the
CLOUDFRONT scope exists.
* docs(partition): say only custom domains refuse EDGE, and when FLOCI_HOSTNAME is enough
The API Gateway Partitions section said EDGE was refused outside the
commercial partition and that REGIONAL and PRIVATE worked everywhere.
Only custom domains are checked: createRestApi and the REST API update
path accept EDGE in any partition, and createDomainName refuses PRIVATE
in all of them. The section now says so.
The deployment recipe offered FLOCI_HOSTNAME for a different port, but
it replaces only the host and keeps FLOCI_BASE_URL's port, so a
different port needs FLOCI_BASE_URL.
* fix(stepfunctions): record the iterations a failing Map iteration cuts, and the state each was in
AWS records, for each iteration an inline Map failure cuts, a
MapIterationAborted and then the TaskStateAborted or WaitStateAborted
of the state it was in, all chained to the failing iteration's last
event and ahead of MapIterationFailed and MapStateFailed. Floci cancelled
the iterations and recorded nothing for them.
MapIterationScheduler cancelled the in-flight iterations without knowing
their chains, so the Map saw them only after they had left their states.
It now calls back with each in-flight index before cancelling, and the
Map reads and cuts each one in one step through abandonInState, as the
Parallel does. The failing iteration's MapIterationFailed is recorded by
the Map after the cut, so the aborted events come first; its
previousEventId is unchanged.
Closes#4722
* fix(stepfunctions): never report a Map iteration both ended and cut
The scheduler names every iteration it has not yet taken off its queue,
so an iteration that finished after the failing one was dequeued was
cut as well and recorded MapIterationAborted after its own
MapIterationSucceeded. The iteration's end event is now published under
the chain's lock together with an ended marker, and the cut reads that
marker in the same step it reads the state, so an iteration is reported
either ended or cut, never both.
* fix(stepfunctions): record the iterations a Map failure cut only with its MapIterationFailed
A States.Runtime failure records no MapIterationFailed. When it was a
declared tolerance that failure exceeded, the Map ended with
States.ExceedToleratedFailureThreshold instead, which passed the check
for the cut iterations, so they were recorded aborted without the
MapIterationFailed of the iteration that cut them. Both now follow the
one condition.
* fix(stepfunctions): record a cut Map iteration by the rule of the event it accompanies
The cut iterations are recorded right before MapStateFailed and now
follow its rule, that the failure ending the Map is not States.Runtime,
while MapIterationFailed keeps the iteration's own. Tying both to the
iteration's condition had dropped the cut iterations for an ItemSelector
that fails before its iteration starts, which has nothing to report
itself but still cuts the others and still records MapStateFailed.
An iteration is also reported cut only when its MapIterationStarted is
recorded: the start is published under the chain's lock with a started
marker, read by the cut in the same step, so an iteration cut while its
ItemSelector was still being evaluated records neither a start nor an
abort.
---------
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
AWS returns, as the Task result of the optimized states:startExecution
integration (measured in ap-northeast-1 on 2026-09-30):
- request-response: the StartExecution response, {ExecutionArn, StartDate},
StartDate in epoch milliseconds
- .sync: the child's DescribeExecution response, PascalCase with its keys
in alphabetical order, dates in epoch milliseconds, Input and Output as
JSON strings
- .sync:2: the same envelope with Input and Output as JSON values
Floci returned camelCase with dates in seconds for the first two and the
child's output alone for .sync:2, so a state machine written against AWS
found nothing at $.Output, $.ExecutionArn or $.Status.
The failure cause of the two .sync modes already built this envelope
(#4675). It now builds the success result too: a SUCCEEDED child carries
Output, OutputDetails and RedriveStatusReason and reports NOT_REDRIVABLE.
Request-response returns the response TaskSubmitted already records.
This changes the result shape for state machines written against Floci's
earlier one: the child output of .sync:2 moves from $ to $.Output.
Closes#4723
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
executeParallelState joined the branch futures in declaration order, so a
failure in a later branch was only seen once every earlier branch had
returned: a .sync Task listed before the failing branch kept the Parallel
running until its job ended on its own, and a Wait listed first until the
Wait ended. AWS fails the Parallel within about 0.1 s of the failing branch
either way (measured in #4646).
The branches now go through an ExecutorCompletionService, as the Map
iterations already do, and are polled as they complete under the same two
deadlines. The failed branch is the one whose future came off the queue, so
continueFrom and the aborted-state events of #4660 attach to the same chain.
The outputs are collected by branch index and still come back in declaration
order.
Closes#4646
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
* fix(stepfunctions): record TaskSubmitted for a .sync Task, named as AWS names it
AWS records TaskSubmitted for every .sync Task once the call that starts
the job has returned and before it waits on the job, chained to
TaskStarted and carrying that call's response as output in PascalCase:
{ExecutionArn, StartDate} in epoch milliseconds for states:startExecution
.sync and .sync:2, {Failures, Tasks} for ecs:runTask.sync. Floci recorded
nothing between TaskStarted and the terminal event, so a client reading
the job's id from the history found nothing until the Task ended.
The two poll loops do not have the HistoryChain; invokeResource hands
them a callback that publishes the event. The SDK's SdkHttpMetadata and
SdkResponseMetadata, which AWS folds into the response, are left out,
as everywhere else in Floci.
The task event profile also split a well-formed integration id at its
last colon, so every event of a .sync:2 Task read resourceType
states:startExecution.sync, resource 2. AWS reports states /
startExecution.sync:2, so a parsed id now splits at its service.
Closes#4648
* test(stepfunctions): name the types in the TaskSubmitted history test
* fix(stepfunctions): stop the job when TaskSubmitted cannot be recorded
TaskSubmitted is the first event after the job exists. When it is the
event that hits the 25,000-event history limit, the publish throws
before the poll loop whose catch stops the job is entered, so the parent
failed with States.Runtime while the child execution or ECS task ran on.
Both loops now abort the job on that path, the way the wait would have.
---------
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
* test(stepfunctions): pin that a failing Map iteration stops the .sync job of another
The Run a Job guide names an uncaught failure in a Map iteration, next to a
Parallel branch failure, as a reason a .sync job is aborted. #4660 covers it
through the same InterruptedException catch, because MapIterationScheduler
cancels the sibling iterations with cancel(true), but only Parallel was named
in step-functions.md and no test held the Map case. One executor test now runs
an inline Map whose "fail" item fails while the other item's Task waits on a
child execution, and asserts the child is aborted with the AWS cause. Without
the catch it fails (child never stopped). The doc names the Map case beside
the Parallel one, and the gaps paragraph no longer says a cut Parallel branch
is unrecorded, which #4660 changed.
Follow-up from the review of #4660.
* docs(stepfunctions): record what AWS writes for a Map iteration it cuts
Measured in ap-northeast-1: an inline Map iteration that fails records a
MapIterationAborted for each iteration it cuts and the *StateAborted of the
state it was in, all chained to the failing iteration's last event and before
MapIterationFailed and MapStateFailed. The child the cut Task waited on is
aborted within about 0.15 s with the Task-state cause, with or without a Catch
on the Map. The gaps paragraph and the test's javadoc now say so.
---------
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
* fix(stepfunctions): fail a .sync Task on its child with States.TaskFailed and the child's description
Measured on AWS (ap-northeast-1, 2026-09-29), six child endings under
both states:startExecution.sync and .sync:2: FAILED with a custom error
with and without a cause, FAILED with States.Timeout from a Task's own
TimeoutSeconds, FAILED with States.TaskFailed, TIMED_OUT, and ABORTED by
a StopExecution carrying an error and a cause. In every case the parent
Task fails with States.TaskFailed, and the cause is the child's
DescribeExecution response as JSON: PascalCase, keys in alphabetical
order, Cause and Error only when the child has them, dates in epoch
milliseconds, no Output.
Floci passed the child's own error and cause straight through, falling
back to States.TaskFailed and "Nested execution ended with status: X"
only when the child had none. The error name matched AWS in two of the
six cases and the cause in none, so a parent Catch on States.TaskFailed
missed a child that failed with its own error or timed out, and a Catch
on the child's error name fired where AWS never takes it.
Closes#4562
* fix(stepfunctions): read a nested child's terminal state consistently, and keep its alias and version
Review of #4675.
The poll read the child's status without the monitor its worker and
StopExecution write the terminal fields under (status last), so a
terminal status could be seen before the error, cause or stop date
behind it, and the cause built from a half-written child. The status is
now read under that monitor, which makes everything written before it
visible.
A child started through an alias or a version also carries
StateMachineAliasArn and StateMachineVersionArn in the cause, measured
on AWS (ap-northeast-1, 2026-09-29): an alias gives both, a version
only the version, each in its alphabetical place between StartDate and
Status.
---------
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
* fix(stepfunctions): stop a .sync job whenever its Task is cut, and record the cut state
Measured on AWS (ap-northeast-1, 2026-09-29): Step Functions stops the
job a .sync Task waits on however the Task ends before the job does.
Besides the Task's own TimeoutSeconds and StopExecution, which #4519
covered, that is the execution's budget (child ABORTED, ECS task
UserInitiated, both at the budget) and a failure in a sibling Parallel
branch (both within about 0.1 s of the failure), always with the cause
"The Task state in AWS Step Functions execution [<arn>] which was
managing this resource was aborted". Floci left the job running in both
cases: the poll loops only stopped it on the Task's own timeout, and an
interrupt from a cut Parallel unwound through them untouched.
AWS also records the state each cut branch was in: one TaskStateAborted
per cut Task, or WaitStateAborted for a cut Wait, each chained to the
failing branch's last event and recorded before ParallelStateFailed,
which points at that same event. The Parallel now reads each branch's
current state before it cuts them and records those events with
HistoryChain.publishBeside. The execution's budget records none, as on
AWS.
Part of #4646
* fix(stepfunctions): read and cut a Parallel branch in one step
Review of #4660: the state a branch is in was published apart from the
event that enters or exits it, and read apart from the cut. A sibling
failure could therefore see a TaskStateEntered with no state marked and
record no TaskStateAborted, or mark a state that then exited before the
cut and record TaskStateAborted after its TaskStateExited.
HistoryChain now publishes the Entered and Exited events together with
the marker (publishStateEntered, publishStateExited), and the Parallel
reads and cuts each branch with abandonInState, all under the chain's
lock. A Task whose own failure ends its branch leaves the state and
records its TaskStateAborted in one step too (leaveStateAside), so a
concurrent cut reports it at most once. runState leaves the state in a
finally for the paths that end by throwing.
* fix(stepfunctions): let the cut branch's state alone decide its aborted event
Review of #4660: the cut read each branch's future after cutting it, so
a branch that finished in between had its Exited event suppressed by
the cut and its *StateAborted skipped by the isDone check, leaving a
state with neither. The future read is not needed: runState leaves
every state it entered before the branch returns, so a finished branch,
the failed one included, is always read as between states. The cut now
decides on the state it reads under the chain's lock and nothing else.
* test(stepfunctions): assert the parent's budget aborts a nested child over HTTP
StepFunctionsTimeoutSecondsIntegrationTest still said the child keeps
running when the parent's TimeoutSeconds fires, which this PR changes
to match AWS. The comment now says the child is aborted, and the test
asserts it through ListExecutions, so the change is covered end to end
and not only by the executor's unit tests.
---------
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
* fix(stepfunctions): bound a .sync Task by its TimeoutSeconds, not by a poll count
A Task waiting on ecs:runTask.sync or states:startExecution.sync gave up
after 600 polls at 100 ms, about 60 seconds, whatever its TimeoutSeconds
said; that clock was read for a task-token wait alone. The deadline is
now computed once at schedule time and shared by awaitToken and both
.sync loops, which poll until it or the execution's budget fires. The
Task's clock ends the state as States.Timeout with a TaskTimedOut event
and no cause, the shape the token wait already used.
Closes#4518
* fix(stepfunctions): stop the job a timed-out .sync Task was waiting on
Measured on AWS: when a Task's TimeoutSeconds fires around an
ecs:runTask.sync or states:startExecution.sync, Step Functions stops
the ECS task (stopCode UserInitiated) or aborts the child execution,
both with the cause "The Task state in AWS Step Functions execution
[<arn>] which was managing this resource was aborted". Floci left the
job running. Best effort, like AWS: a job already gone is logged and
the timeout is still what the state reports.
* fix(stepfunctions): end a .sync wait on StopExecution and start its clock at schedule time
Review follow-ups on #4519. The Task's TimeoutSeconds is read before the
scheduled event is built, so a large input cannot extend it. A late wake
re-reads the execution's clock, so a spent budget ends the execution
TIMED_OUT rather than the Task. Both .sync loops read the execution back
each poll and, once StopExecution has marked it ABORTED, stop the job and
unwind without writing an event, instead of polling until a clock ran
out. Tests cover .sync:2 under a Catch on States.Timeout and the aborted
parent; the nested test imports its types.
* docs(stepfunctions): drop the two em dashes the .sync timeout change added
* chore(stepfunctions): let sleepOrTimeOutExecution delegate to sleepOrTimeOutTask
With no Task deadline (Long.MAX_VALUE) sleepOrTimeOutTask parks on the
execution's budget alone and ends the execution TIMED_OUT, which is
exactly what sleepOrTimeOutExecution did in its own copy.
---------
Co-authored-by: mitsukado-shinagawa <mitsukado-shinagawa@users.noreply.github.com>
* feat(sfn): support ItemReader InputType CSV
A Distributed Map can read a CSV dataset through ItemReader. Field names come
from the first row, or from ReaderConfig.CSVHeaders when CSVHeaderLocation is
GIVEN, and each data row becomes an object of string values.
Every value is a string, a row shorter than the headers pads with empty
strings, and a longer one drops the surplus, as AWS documents.
Drops the assertion that CSV is not implemented, which this replaces.
* feat(sfn): honour CSVDelimiter and quoted newlines in ItemReader CSV
ReaderConfig.CSVDelimiter selects COMMA, PIPE, SEMICOLON, SPACE or TAB. An
unsupported value fails the state with States.ItemReaderFailed.
CsvParser.parseAll gained a delimiter overload and now tracks quotes across
line breaks, so a quoted field may carry the delimiter or a newline without
ending the record. The single argument overload keeps comma behaviour for the
existing callers.
* fix(sfn): apply the documented CSV quote and backslash escaping
AWS preserves a doubled quote as a single quote whether or not the field is
quoted, so the reference dataset's {""MyKey"":""MyValue""} has to reach
States.StringToJson as {"MyKey":"MyValue"}. The reader dropped both quotes
instead: only a quote opening a field starts a quoted run, and the unquoted
case fell through to the toggle that consumed the pair.
Backslash escaping was missing as well. A backslash escapes another backslash,
a quote or the configured delimiter, and a backslash before anything else is
dropped.
parseLine and parseAll now share one scanner so the rules live in one place.
The backslash rules stay off for parseLine, which S3 Select and Athena use,
where a lone backslash is ordinary data.
A Distributed Map could only read a JSON dataset: every other InputType failed
the state with "not yet implemented". JSONL now reads one item per line,
skipping blank lines, so a trailing newline is not an item.
ReaderConfig.ItemsPointer stays JSON only, as on AWS, and MaxItems truncates a
JSONL dataset the same way it truncates a JSON one.
* feat(sfn): support the s3:listObjectsV2 Distributed Map ItemReader
The Map state listed the resource as accepted at CreateStateMachine
but failed every execution with States.ItemReaderFailed. It now calls
the S3 service in process, reads every page under Prefix, and gives
each child the AWS item shape: Etag, Key, LastModified, Size and
StorageClass. Bucket and Prefix come from Parameters or JSONata
Arguments. An empty prefix succeeds with zero iterations and
ReaderConfig.MaxItems trims the list.
LastModified is epoch seconds. Real AWS renders it as a double in
JSONPath state machines and as an integer in JSONata ones, and the
emulator does the same.
Fixes#3409
* fix(sfn): evaluate ItemSelector in JSONata Map states
A JSONata Map state passed ItemSelector through the JSONPath resolver,
so every {% %} expression reached the child as a literal string. The
Map state now resolves ItemSelector as a JSONata template with
$states.input bound to the Map input and $states.context.Map.Item
carrying Value and Index, as on AWS.
Real AWS evaluates ItemSelector before it records MapIterationStarted.
A failing expression therefore fails the Map state without any event
for that iteration, in both query languages. The evaluation moved
ahead of the iteration event to match.
Verified against real Step Functions in us-east-1 on 2026-09-12.
* chore(sfn): simplify the listObjectsV2 reader and the ItemSelector failure path
The reader listed the bucket page by page although the S3 service
returns the whole sorted listing in one call. The Map state kept two
copies of the iteration failure handling. The tests reuse the shared
mapper and one JSONata Map definition.
* perf(sfn): cap the listObjectsV2 listing at MaxItems
ReaderConfig.MaxItems keeps the first keys in key order on AWS, which
is what the S3 service returns for maxKeys. The reader now passes
MaxItems to the listing instead of building every item and trimming
afterwards.
* chore(sfn): declare local types in the listObjectsV2 reader
Replace var with explicit types in the production code this branch added.
* chore(sfn): declare local types in the listObjectsV2 reader tests
Replace var with explicit types in the test code this branch added.
* fix(sfn): list every object when MaxItems is absent
S3Service now treats max keys 0 as a request for an empty page, as AWS
does for max-keys=0. The listObjectsV2 reader passed 0 when
ReaderConfig.MaxItems was not set, so the Map got no items. It now asks
for Integer.MAX_VALUE in that case, like the DynamoDB import path.
* feat(sfn): apply ItemBatcher to distributed Map children
ItemBatcher was parsed and then ignored: every child execution received one
item regardless of MaxItemsPerBatch, so a state machine that batches ran with a
different payload shape locally than on AWS, silently.
Items are now grouped into batches and each child execution receives
{"BatchInput": ..., "Items": [...]}. A batch closes on MaxItemsPerBatch or
MaxInputBytesPerBatch, in their literal, Path and JSONata expression forms, and
with neither set every item lands in one batch. ItemSelector still runs per item
before grouping, so the transform sees $$.Map.Item as it did before.
MaxConcurrency now bounds concurrent batches, and DescribeMapRun separates the
two counters it used to share: itemCounts counts items, executionCounts counts
child executions.
* fix(sfn): cap a batch at the 256 KiB child-input ceiling
MaxInputBytesPerBatch being optional let MaxItemsPerBatch alone build a child
input larger than Step Functions would ever start, and the byte count measured
the items alone, so a declared cap could still be exceeded by the envelope,
BatchInput and separators.
Batching now measures the serialized child payload and closes a batch at the
declared limit or at 256 KiB, whichever is smaller.
* fix(sfn): fail an item too large to start a child execution
An item whose serialized batch input already exceeded 256 KiB was added anyway,
because the split branch is skipped while the batch is empty, producing a child
input AWS would refuse to start.
Such an item now fails the state with States.DataLimitExceeded, naming its size
and pointing at ItemSelector as the way to reduce it.
* feat(sfn): honour ToleratedFailureCount and ToleratedFailurePercentage
Both fields were accepted and ignored: any failed item failed the Map run, and
DescribeMapRun reported a hardcoded zero for each, so a state machine that
relies on a failure budget behaved differently here than on AWS.
A declared tolerance now absorbs failed items while the run stays within it. An
absorbed failure contributes no result, so the Map output and any ResultWriter
export cover the successful children only. Exceeding the budget fails the state
with States.ExceedToleratedFailureThreshold. Both fields accept their literal,
Path and JSONata expression forms, the percentage is taken over the item count,
and declaring both applies the stricter of the two.
DescribeMapRun now reports the declared values. A Map that declares neither is
unchanged: the first failed item still fails the state with its own error.
* fix(sfn): export tolerated failures to FAILED_0.json
Filtering the ResultWriter input down to the successful children dropped every
absorbed failure from the export, which is exactly what the tolerance is meant
to keep observable.
Failed children now keep their input, timings and error, and are written to
FAILED_0.json with Status FAILED and the child's Error and Cause, listed under
ResultFiles.FAILED in the manifest.
* refactor(sfn): resolve every integer Map field through one helper
MaxConcurrency and the ItemBatcher limits read the same three forms, literal,
Path and JSONata expression, through two near-identical methods. The batcher one
already parameterized the field name, so the pair collapses into a single
resolver with a minimum: 0 for MaxConcurrency, where it means the service
ceiling, and 1 for a batch limit, where it is meaningless.
The shared resolver also clamps an oversized value to Integer.MAX_VALUE, which
only the MaxConcurrency copy did before.
* feat(sfn): apply ItemBatcher to distributed Map children
ItemBatcher was parsed and then ignored: every child execution received one
item regardless of MaxItemsPerBatch, so a state machine that batches ran with a
different payload shape locally than on AWS, silently.
Items are now grouped into batches and each child execution receives
{"BatchInput": ..., "Items": [...]}. A batch closes on MaxItemsPerBatch or
MaxInputBytesPerBatch, in their literal, Path and JSONata expression forms, and
with neither set every item lands in one batch. ItemSelector still runs per item
before grouping, so the transform sees $$.Map.Item as it did before.
MaxConcurrency now bounds concurrent batches, and DescribeMapRun separates the
two counters it used to share: itemCounts counts items, executionCounts counts
child executions.
* fix(sfn): cap a batch at the 256 KiB child-input ceiling
MaxInputBytesPerBatch being optional let MaxItemsPerBatch alone build a child
input larger than Step Functions would ever start, and the byte count measured
the items alone, so a declared cap could still be exceeded by the envelope,
BatchInput and separators.
Batching now measures the serialized child payload and closes a batch at the
declared limit or at 256 KiB, whichever is smaller.
* fix(sfn): fail an item too large to start a child execution
An item whose serialized batch input already exceeded 256 KiB was added anyway,
because the split branch is skipped while the batch is empty, producing a child
input AWS would refuse to start.
Such an item now fails the state with States.DataLimitExceeded, naming its size
and pointing at ItemSelector as the way to reduce it.
* refactor(sfn): resolve every integer Map field through one helper
MaxConcurrency and the ItemBatcher limits read the same three forms, literal,
Path and JSONata expression, through two near-identical methods. The batcher one
already parameterized the field name, so the pair collapses into a single
resolver with a minimum: 0 for MaxConcurrency, where it means the service
ceiling, and 1 for a batch limit, where it is meaningless.
The shared resolver also clamps an oversized value to Integer.MAX_VALUE, which
only the MaxConcurrency copy did before.
* fix(stepfunctions): resolve state machine alias arns
* docs(stepfunctions): list alias actions
* fix(stepfunctions): paginate state machine aliases
* ci: rerun compatibility checks
* fix(stepfunctions): persist execution history across restarts
* fix(stepfunctions): preserve persisted execution history
* fix(stepfunctions): preserve running execution snapshot during restart test
Keep the in-flight worker alive until the persisted snapshot is reloaded, then
wait for cleanup so the test cannot rewrite or retain its temporary state.
* fix(stepfunctions): checkpoint persisted execution history
* feat(sfn): publish Parallel branch and Map iteration history events
The states inside a Parallel branch or an inline Map iteration now publish
their events into the execution history.
The cause of a failure the interpreter raises now carries the AWS prefix
"An error occurred while executing the state '<name>' (entered at the event
id #<n>). ". It is written once, at the innermost state.
Every shape was verified against real Step Functions in us-east-1.
* feat(sfn): record EvaluationFailed for JSONata failures
A JSONata expression that fails now leaves the EvaluationFailed event AWS
records, with error, the attributed cause, location and state. The location
names the field the way the cause does. The event is recorded once per
attempt when the state retries, and before the Failed event and the Catch.
A Catch clause whose own expression fails records it from where the state
stood before its first Failed event, then fails the state again.
Verified against real Step Functions in us-east-1
* fix(sfn): record every Distributed Map run so DescribeMapRun resolves its ARN
* fix(sfn): stop counting history events once the execution has ended