Step Functions Express Workflows Deployer
What this skill does
Provisions Step Functions Express Workflows and surrounding
primitives (CloudWatch Logs with correct level and data-exposure,
IAM least-privilege execution role, EventBridge scheduling,
Distributed Map configuration, idempotency guard for at-least-once
delivery) with production defaults. The skill walks a 9-step
procedure, surfaces the silent-failure modes unique to Express
(most dangerous: .waitForTaskToken is rejected at create-time,
but operators migrating from Standard discover this only on deploy;
logging is NOT enabled by default, so async Express executions are
invisible after the 5-minute history window; the at-least-once
delivery model means non-idempotent Lambda handlers can double-
execute on retries). The single most common incident this skill
prevents: an operator migrates a high-volume Standard workflow to
Express for cost savings, the migration drops CloudWatch Logs, and
the first failed execution is invisible — no alarm, no log, and the
5-minute execution history has already rolled over.
Quick navigation
| Section |
What it covers |
When to read it |
| Quick reference |
Provisioning summary (9 steps), verdict thresholds |
Before any operation |
| Activation keywords |
Phrases that route to this skill |
Disambiguating routing |
| Reasoning framework |
Why Express is a cost + semantics decision |
Choosing Express vs Standard |
| Dependency graph |
Which configs silently no-op without their prerequisite |
Debugging "logs are empty" |
| Expert heuristic |
waitForTaskToken block; at-least-once idempotency; sync API Gateway timeouts |
Pre-empt incidents |
| Prerequisites |
What to verify before emitting any command |
Avoid PREREQUISITES_MISSING rework |
| 9-step procedure |
The actual provisioning with copy-pasteable CLI |
Executing the deploy |
| NEVER (top 5) |
Hard rules that prevent silent exposure / data-plane bugs |
Review before deploy |
| STRICT output contract |
Required EXPRESS_WORKFLOW / VERDICT / CHECKLIST / VERIFICATION_COMMANDS block |
Formatting the response |
| Recent AWS features |
Express + Distributed Map, AWS SDK direct calls |
Stay current |
Quick reference — provisioning summary (9 steps)
| Step |
Action |
Reversible? |
Key risk if skipped |
| 1 |
Confirm Express-vs-Standard decision (5-min cap, at-least-once, cost model) |
— |
wrong type = 100x cost or 5-min timeout |
| 2 |
Verify workflow duration fits in the 5-minute Express cap |
Yes |
sync API Gateway returns 500; async retried mid-flight |
| 3 |
Verify all service integrations are Express-compatible (NO .waitForTaskToken) |
Yes |
create-state-machine API silently rejects the definition |
| 4 |
Define the ASL with Express-compatible patterns (Distributed Map, .sync, AWS SDK) |
Yes |
— |
| 5 |
Create the IAM execution role with least-privilege |
Yes |
over-broad states:* on * |
| 6 |
Configure logging (CloudWatch Logs + level + INCLUDE_DATA/EXCLUDE_DATA) |
Yes |
async executions invisible after 5-min history |
| 7 |
Choose sync (RequestResponse) vs async invocation mode |
Yes |
sync API Gateway timeout misalignment |
| 8 |
Configure EventBridge scheduling + observability (X-Ray, CloudWatch alarms) |
Yes |
silent failures with no alarm |
| 9 |
Verify every configuration item against actual state + emit checklist |
— |
silent no-ops |
Critical ordering constraints: Express-vs-Standard decision
first (every downstream choice depends on the type); duration
budget before ASL definition (a workflow that exceeds 5 minutes
cannot be Express); integration compatibility before the IAM role
(.waitForTaskToken rejected at create-time even with a valid
role); logging configuration before the first execution (without
logging, async Express executions are invisible after the 5-minute
history rolls over); sync-vs-async choice before the caller
integration (API Gateway sync requires timeout alignment to ≤ 29s
to avoid 504). Rationale and the silent-failure table are below.
Activation keywords
Express workflow, create Express state machine, Step Functions
EXPRESS, sync express execution, start-sync-execution, async
express, Express workflow logging, Step Functions CloudWatch Logs,
INCLUDE_DATA, EXCLUDE_DATA, FATAL / ERROR / ALL levels, EventBridge
Step Functions target, Distributed Map Express, Inline Map Express,
Standard-to-Express migration, at-least-once Step Functions, Express
idempotency, Express sync API Gateway, .sync integration Express,
AWS SDK integration, X-Ray tracing Step Functions.
Invocation contract (hard requirement)
When this skill is invoked with an Express Workflow provisioning
request, the agent MUST respond with the checklist defined in
§"STRICT output contract" using the literal all-caps labels
EXPRESS_WORKFLOW:, VERDICT:, CHECKLIST:, and
VERIFICATION_COMMANDS:. Do NOT preface the checklist with prose,
headings, or disclaimers — emit the block as the first lines of the
response. This contract is what assertion-based evals and downstream
provisioning pipelines rely on; deviating from the literal labels
breaks automation silently.
Reasoning framework (why the Express decision matters)
Full detail moved verbatim to references/advanced-patterns.md - load on demand.
Summary: full Express-vs-Standard reasoning prose; every branch is preserved in the Decision tree below.
Dependency graph (silent-failure table)
| Configuration |
Hard dependencies (API error without) |
Silent failure mode (returns 200, does nothing) |
Enables downstream |
| Express state machine |
unique name; valid ASL |
.waitForTaskToken in ASL → API rejects with definition-validation error; operators misread as IAM error and keep re-applying |
— |
| CloudWatch Logs log group |
log group exists in same account + region |
log group ARN omitted at create-time → executions do not log; 5-min history rolls over and failure is invisible |
observability |
| Log level (ALL / ERROR / FATAL / OFF) |
log group attached |
level set to OFF or FATAL only → execution-level errors invisible; operator sees empty log group |
debuggability |
| INCLUDE_DATA / EXCLUDE_DATA |
log group attached |
EXCLUDE_DATA on a workflow that takes PII inputs → traces show only metadata, blocking RCA (or inverse: INCLUDE_DATA on PII → compliance violation) |
input/output visibility |
| IAM execution role |
trust policy allows states.<region>.amazonaws.com |
trust policy missing service principal → AccessDenied on first execution; not surfaced at create-time |
service integrations |
| Sync execution (start-sync-execution) |
state machine type EXPRESS |
calling start-sync-execution on a Standard state machine → error; but a caller using start-execution on Express works (just async) |
API Gateway / direct sync |
| EventBridge target |
execution role for EventBridge to assume |
target without role → rule fires, no execution; EventBridge shows Invocations = 1, Step Functions shows Executions = 0 |
scheduled recurring runs |
| Distributed Map |
state machine type EXPRESS or STANDARD; IAM allows read on ItemReader source |
Map state on Express with > 10,000-item fan-out hits 5-min cap → workflow fails mid-iteration with no progress signal |
large-scale fan-out |
| .sync integration |
supported service (Glue, Batch, ECS, SageMaker) |
unsupported service in Resource ARN → API rejects; misread as syntax error |
run-job-and-wait |
| AWS SDK integration |
IAM allows the underlying SDK action |
IAM allows lambda:InvokeFunction but the SDK integration calls lambda:UpdateFunctionCode → runtime AccessDenied |
direct API calls (no Lambda) |
The four silent-failure rows are the ones a baseline model
misses. Missing logging, wrong log level, EXCLUDE_DATA on
debugging inputs, and missing EventBridge target role all return
success or wrong-shaped errors. Only Step 9 verification catches
the gap.
Expert heuristic: the waitForTaskToken Express block
Full detail moved verbatim to references/advanced-patterns.md - load on demand.
Summary: the complete waitForTaskToken migration-trap analysis and remedies.
Expert heuristic: at-least-once idempotency
Full detail moved verbatim to references/advanced-patterns.md - load on demand.
Summary: the complete at-least-once idempotency pattern with ASL example.
Expert heuristic: sync API Gateway timeout misalignment
Full detail moved verbatim to references/advanced-patterns.md - load on demand.
Summary: the complete sync API Gateway timeout misalignment analysis.
Prerequisites (verify before provisioning)
| Prerequisite |
Why it matters |
How to verify |
| Workflow duration fits in 5 min |
Express caps at 5 min; sync API Gateway caps at 29s |
estimate from longest task * longest retry; validate-state-machine-definition does NOT check this |
Workflow does NOT use .waitForTaskToken |
Express rejects it at create-time |
grep ASL for :waitForTaskToken |
| IAM execution role trust policy |
service principal must be states.<region>.amazonaws.com |
aws iam get-role --role-name <ROLE> |
| CloudWatch Logs log group exists (recommended) |
Express execution history rolls over after 5 min |
aws logs describe-log-groups --log-group-name-prefix /aws/states/<NAME> |
| Caller can assume the role (cross-account) |
Cross-account callers need their own permission |
caller identity policy check |
| EventBridge rule exists (scheduled) |
Scheduled Express requires an EventBridge rule + target role |
aws events describe-rule --name <RULE> |
| AWS region supports Express |
Express is available in all commercial regions |
aws stepfunctions list-state-machines --region <REGION> |
If any prerequisite is missing, output VERDICT: PREREQUISITES_MISSING
and cite the specific gap.
9-step provisioning procedure
Step 1 — Confirm Express-vs-Standard decision
Verify Express is the correct type. Use this decision table:
| If your workload… |
Use |
| Runs > 5 minutes per execution |
STANDARD |
Uses .waitForTaskToken (callbacks) |
STANDARD |
| Needs exactly-once semantics and idempotency is infeasible |
STANDARD |
| Runs < 5 minutes, high-volume (>1k/day), idempotent or read-mostly |
EXPRESS |
| Triggered by EventBridge at high frequency |
EXPRESS |
| Fronted by API Gateway returning the workflow result synchronously |
EXPRESS (sync) |
| Async messaging with very high throughput |
EXPRESS (async) |
Full detail moved verbatim to references/advanced-patterns.md - load on demand.
Summary: the worked cost math (Standard vs Express break-even).
Step 2 — Verify workflow duration fits in the 5-minute cap
Sum the worst-case duration of every Task state multiplied by its
Retry MaxAttempts. If the workflow includes a Distributed Map,
sum the longest batch. If the result can exceed 5 minutes, the
workflow is incompatible with Express — go back to Step 1.
Full detail moved verbatim to references/diagnostic-commands.md - load on demand.
Summary: the validate-state-machine-definition CLI (syntax-only check).
Common mistake: assuming validate-state-machine-definition
checks the 5-min cap. It does NOT — only syntax. The cap is
enforced at runtime; executions fail with States.Timeout.
Step 3 — Verify all service integrations are Express-compatible
Full detail moved verbatim to references/diagnostic-commands.md - load on demand.
Summary: the grep command that rejects .waitForTaskToken definitions.
Express-compatible integration patterns:
- RequestResponse (default): invoke and return immediately
.sync: invoke and wait for completion (Glue, Batch, ECS, SageMaker, Comprehend)
- AWS SDK integrations: direct API calls without Lambda
Express-INCOMPATIBLE patterns:
.waitForTaskToken: callback pattern (unbounded wait)
Common mistake: converting a Standard workflow that uses
.waitForTaskToken for the human-approval step. Replace with a
DynamoDB polling loop (.sync on a Lambda that polls approval
status) or split into two workflows.
Step 4 — Define the ASL with Express-compatible patterns
Full detail moved verbatim to references/express-asl-patterns.md - load on demand.
Summary: the complete Step 4 walkthrough with Distributed Map ASL template.
Step 5 — Create the IAM execution role with least-privilege
Full detail moved verbatim to references/iam-and-logging-templates.md - load on demand.
Summary: the complete Step 5 CLI + trust/identity policy templates.
Step 6 — Configure logging (CloudWatch Logs)
Full detail moved verbatim to references/iam-and-logging-templates.md - load on demand.
Summary: the complete Step 6 logging CLI, level guidance, and pitfalls.
Step 7 — Choose sync (RequestResponse) vs async invocation
| Mode |
Caller |
Use when |
| Sync |
API Gateway, direct start-sync-execution |
Caller needs result synchronously, workflow < 29s p99 |
| Async |
EventBridge, S3, SQS, start-execution |
High throughput, fire-and-forget, up to 5 min |
Full detail moved verbatim to references/diagnostic-commands.md - load on demand.
Summary: the start-sync/start-execution CLI and timeout-alignment warning.
Step 8 — Configure EventBridge scheduling + observability
Full detail moved verbatim to references/scheduling-and-observability.md - load on demand.
Summary: the complete Step 8 EventBridge rule, alarm, and X-Ray templates.
Step 9 — Verification
Run every verification command and confirm each output matches the
expected state.
Full detail moved verbatim to references/diagnostic-commands.md - load on demand.
Summary: the Step 9 verification CLI listing.
NEVER do these things
These anti-patterns cause silent exposure, data-plane bugs, or
compliance violations. Each is observed in real production incidents
— the "why it's wrong" line is the post-mortem finding.
NEVER provision an Express workflow with .waitForTaskToken in
the ASL. Why it's wrong: Express rejects the integration at
create-time (5-min cap is incompatible with unbounded callback
wait). The error references the line number, not the
incompatibility — operators loop on re-applying. Replace with
.sync for supported run-job integrations or split into a
Standard + Express pair.
NEVER deploy async Express without CloudWatch Logs enabled and
an ExecutionsFailed alarm. Why it's wrong: async Express has
no caller to surface errors. The 5-min execution-history window
rolls over quickly; without persistent logging, failures are
invisible. Without an alarm, the failure may go undetected for
days. ALWAYS attach a log group with level >= ERROR and alarm
on ExecutionsFailed.
NEVER assume Express executions are exactly-once. Why it's
wrong: Express is at-least-once. The infrastructure can restart
an execution on internal events; the same input can produce two
invocations of a side-effecting integration. Every write-path
integration MUST be idempotent via a key persisted BEFORE the
side effect.
NEVER front a sync Express workflow with API Gateway without
aligning the timeout. Why it's wrong: API Gateway caps at 29s;
Express sync can run to 5 min. When p99 exceeds 29s, API Gateway
returns 504 while Express keeps running — the client retries,
producing a second execution that may double-charge if the
integration is non-idempotent. Set the API Gateway integration
timeout to 29000 ms and alarm on p99 duration > 25s.
NEVER set log level to OFF or FATAL on an Express workflow.
Why it's wrong: OFF and FATAL produce near-empty logs, blocking
RCA. Use ALL for development and non-PII workloads; ERROR for
high-volume production. Always set includeExecutionData=true
unless the workflow processes regulated PII — and in that case,
redact the PII at the input, not by disabling execution data.
Output format
Full detail moved verbatim to references/worked-examples.md - load on demand.
Summary: the literal output template block.
STRICT output contract
The rules below are hard constraints. Violating any one produces a
checklist that looks complete but contains a silent misconfiguration.
Self-check EVERY emitted block against these rules before returning.
Required output structure
Every response MUST be a single block using these literal labels, in
this order. Do NOT preface with prose, headings, or disclaimers.
EXPRESS_WORKFLOW: <name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
CHECKLIST:
[✓|✗] Express-vs-Standard decision: EXPRESS (duration < 5 min, at-least-once acceptable)
[✓|✗] Duration budget: p99 < 5 min (sync: p99 < 29s)
[✓|✗] No .waitForTaskToken in ASL: verified
[✓|✗] ASL definition validated: Distributed Map / .sync / AWS SDK as applicable
[✓|✗] IAM execution role: least-privilege, service principal states.<region>.amazonaws.com
[✓|✗] Logging: log-group /aws/states/<NAME>, level ALL|ERROR, includeExecutionData=true
[✓|✗] Invocation mode: sync | async (sync caller timeout aligned)
[✓|✗] EventBridge schedule + CloudWatch alarm: configured
[✓|✗] Idempotency: side-effecting integrations have idempotency key
VERIFICATION_COMMANDS:
<copy-pasteable verification commands — one per [✓] item>
Decision tree: Express vs Standard
Express vs Standard — START
│
Q1: Does any single execution need to run > 5 minutes?
├── YES → STANDARD (Express hard-caps at 5 min per execution)
└── NO → Q2
│
Q2: Does the ASL use .waitForTaskToken (callback / human-approval)?
├── YES → STANDARD (Express rejects .waitForTaskToken at create-time)
└── NO → Q3
│
Q3: Is exactly-once required AND idempotency is infeasible?
├── YES → STANDARD (Express is at-least-once; retries can double-execute)
└── NO → Q4
│
Q4: Is the workload high-volume (> 1,000 executions/day)?
├── NO → Either works; prefer STANDARD unless cost is a concern
└── YES → Q5
│
Q5: Can all side-effecting integrations be made idempotent?
├── NO → STANDARD (at-least-once risks duplicate writes / charges)
└── YES → EXPRESS
Cost model:
Standard: $25.00 / 1M state transitions
Express: $1.00 / 1M invocations + $0.025 / GB-hour
10-state workflow, 1M runs/day:
Standard = $250/day | Express = $1/day
10-state workflow, 10M runs/day:
Standard = $2,500/day | Express = $10/day
FORBIDDEN output patterns
NEVER emit VERDICT: READY_TO_DEPLOY without showing ALL 9
checklist items. Every item MUST appear with a status marker:
[✓], [✗], or [OPTIONAL] (e.g., EventBridge schedule when
the workflow is not scheduled). Omitting a row implies it was
not evaluated.
NEVER mark the ASL as [✓] without confirming the definition
contains NO .waitForTaskToken Resource ARN suffix. The
integration is silently rejected by Express at create-time; the
verification MUST include a grep or equivalent.
NEVER mark Logging as [✓] without citing the specific log
group name, level (ALL / ERROR), and includeExecutionData
value. A bare [✓] Logging: configured is non-compliant —
level and data-exposure flag are load-bearing. OFF and FATAL are
non-compliant for an Express workflow.
NEVER mark sync invocation as [✓] without confirming the
caller's timeout is ≤ 29s (API Gateway) or equivalent for the
direct caller. Misaligned timeouts cause silent 504s while
Express keeps running, producing double-executions on retry.
NEVER mark Idempotency as [✓] for a workflow with side-
effecting integrations unless each such integration has an
idempotency key persisted BEFORE the side effect. The checklist
MUST cite the key source (e.g.,
IdempotencyKey.$: "$$.Execution.Id").
NEVER emit VERDICT: PREREQUISITES_MISSING without citing the
specific gap. Each [✗] item MUST have a one-line reason:
[✗] ASL uses .waitForTaskToken at line 42 — replace with .sync or migrate to Standard. A bare [✗] is non-compliant.
NEVER omit the cost-model comparison from the Express-vs-
Standard checklist row. The row MUST cite the cost delta
(e.g., "Express $1/M invocations vs Standard $25/M transitions")
so the operator can sanity-check the type choice. A bare
"EXPRESS" without cost rationale is non-compliant.
Perfect example output — READY_TO_DEPLOY
Scenario: High-volume event-processing Express workflow. JSON event
batches land in S3; a Distributed Map fans them out to a Lambda for
per-event processing. Async, triggered by EventBridge every 5 minutes.
At 2M executions/day with a 5-state workflow: Standard would cost
~$250/day ($25/M x 10M transitions); Express costs ~$2/day ($1/M
x 2M invocations). p99 execution duration = 12s.
EXPRESS_WORKFLOW: event-processor-express
VERDICT: READY_TO_DEPLOY
CHECKLIST:
[✓] Express-vs-Standard decision: EXPRESS (p99 12s, idempotent;
cost: Express $1/M invocations vs Standard $25/M transitions;
2M runs/day x 5 states = 10M transitions -> Standard $250/day vs Express $2/day)
[✓] Duration budget: p99 12s < 5 min (async; no sync API Gateway alignment needed)
[✓] No .waitForTaskToken in ASL: verified (grep -c ':waitForTaskToken' definition.json = 0)
[✓] ASL definition validated: Distributed Map (MaxConcurrency 1000, S3 ItemReader)
+ Lambda Task with idempotency key (see ASL below)
[✓] IAM execution role: sfn-event-processor-exec, trust=states.us-east-1.amazonaws.com,
scoped to lambda:InvokeFunction on arn:aws:lambda:us-east-1:123456789012:function:process-event
+ s3:GetObject on arn:aws:s3:::event-input-bucket/events/*.json
[✓] Logging: /aws/states/event-processor-express, level ALL, includeExecutionData=true
(30-day retention; see logging CLI below)
[✓] Invocation mode: async (EventBridge schedule rate(5 minutes))
[✓] EventBridge schedule: rule event-processor-schedule, target role eventbridge-sfn-role,
CloudWatch alarm event-processor-failed on ExecutionsFailed >= 1
[✓] Idempotency: ProcessEvent Lambda checks IdempotencyKey=$$.Execution.Id against
DynamoDB table event-idempotency before writing; duplicate retries are no-ops
VERIFICATION_COMMANDS:
aws stepfunctions describe-state-machine --state-machine-arn arn:aws:states:us-east-1:123456789012:stateMachine:event-processor-express
grep -c ':waitForTaskToken' definition.json
aws logs describe-log-groups --log-group-name-prefix /aws/states/event-processor-express
aws events describe-rule --name event-processor-schedule
aws cloudwatch describe-alarms --alarm-names event-processor-failed
ASL definition (Distributed Map + Lambda Task with idempotency key):
{
"StartAt": "FanOutProcess",
"States": {
"FanOutProcess": {
"Type": "Map",
"ItemProcessor": {
"ProcessorConfig": { "Mode": "DISTRIBUTED" },
"StartAt": "ProcessEvent",
"States": {
"ProcessEvent": {
"Type": "Task",
"Resource": "arn:aws:lambda:us-east-1:123456789012:function:process-event",
"Parameters": {
"IdempotencyKey.$": "$$.Execution.Id",
"EventPayload.$": "$.value"
},
"Retry": [
{ "ErrorEquals": ["States.TaskFailed"], "MaxAttempts": 3, "BackoffRate": 2 }
],
"End": true
}
}
},
"ItemReader": {
"Resource": "arn:aws:states:::s3:getObject",
"Parameters": { "Bucket": "event-input-bucket", "Key": "events/batch.json" }
},
"MaxConcurrency": 1000,
"End": true
}
}
}
Logging configuration CLI (create log group with retention + attach
at state machine creation):
aws logs create-log-group --log-group-name /aws/states/event-processor-express
aws logs put-retention-policy \
--log-group-name /aws/states/event-processor-express --retention-in-days 30
aws stepfunctions create-state-machine \
--name event-processor-express \
--definition file://definition.json \
--role-arn arn:aws:iam::123456789012:role/sfn-event-processor-exec \
--type EXPRESS \
--logging-configuration \
level=ALL,includeExecutionData=true,\
destinations='[{CloudWatchLogsLogGroup={LogGroupArn=arn:aws:logs:us-east-1:123456789012:log-group:/aws/states/event-processor-express:*}}]'
Perfect example output — PREREQUISITES_MISSING
Full detail moved verbatim to references/worked-examples.md - load on demand.
Summary: the full PREREQUISITES_MISSING example with self-check list.
Recent AWS features
Full detail moved verbatim to references/advanced-patterns.md - load on demand.
Summary: the full feature list (Distributed Map on Express, SDK integrations, typed ARNs, log granularity, X-Ray, IAM condition keys).
References (load on demand)
- references/worked-examples.md - secondary example output (PREREQUISITES_MISSING) and the output-format template
- references/diagnostic-commands.md - pre-flight validation, compatibility grep, invocation, and verification CLI listings
- references/advanced-patterns.md - Express reasoning prose, expert heuristics, cost math, recent AWS features
- references/scheduling-and-observability.md - EventBridge scheduling, CloudWatch alarms, X-Ray tracing templates
- references/express-asl-patterns.md - (existing) ASL patterns; now also holds the Step 4 Express ASL template
- references/iam-and-logging-templates.md - (existing) IAM/logging templates; now also holds Step 5-6 CLI templates
1---2name: stepfunctions-express-deployer3description: 'Provisions Step Functions Express Workflows with production defaults: Express-vs-Standard decision (5-min cap, at-least-once vs exactly-once, per-invocation vs per-transition pricing), sync (RequestResponse) vs async invocation, CloudWatch Logs configuration (ALL / ERROR / FATAL / OFF levels and INCLUDE_DATA / EXCLUDE_DATA), IAM least-privilege execution role, EventBridge scheduling, Distributed Map and Inline Map fan-out, Express-compatible service integrations (.sync, AWS SDK direct calls), idempotency for at-least-once delivery, observability (metrics, X-Ray, CloudWatch alarms). Emits READY_TO_DEPLOY / PREREQUISITES_MISSING with copy-pasteable stepfunctions / logs / events / iam CLI. Use when provisioning an Express workflow, migrating high-volume Standard workloads to Express, configuring sync invocation from API Gateway, or hardening logging. Triggers: Express workflow, create state machine EXPRESS, sync express, async express, EventBridge Step Functions, Step Functions logging, Distributed Map Express.'4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Live provisioning uses AWS CLI v2 with stepfunctions (create-state-machine, update-state-machine, describe-state-machine, start-sync-execution, start-execution, validate-state-machine-definition), logs (create-log-group, put-retention-policy), events (put-rule, put-targets), iam (create-role, attach-role-policy, put-role-policy), and cloudformation / terraform aws_sfn_state_machine equivalents.6metadata:7 source: https://skillmd.com/skills/jhkchan/stepfunctions-express-deployer8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '1'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: AppIntegration15 task_type: deploy16 skill_class: capability17 lifecycle_status: active18 verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING19 when_to_use: Provisioning a new Step Functions Express Workflow, deciding between Express and Standard (5-min cap, at-least-once semantics, per-invocation pricing), configuring sync (RequestResponse) vs async invocation, attaching a CloudWatch Logs log group with the correct level (ALL / ERROR / FATAL / OFF) and INCLUDE_DATA / EXCLUDE_DATA exposure, scheduling recurring Express executions via EventBridge, using Distributed Map or Inline Map with Express, using .sync service integrations (Glue, Batch, ECS, SageMaker), or hardening idempotency for at-least-once delivery. Do NOT invoke for Standard workflows that run >5 minutes or use .waitForTaskToken (use stepfunctions-statemachine-deployer), or for troubleshooting execution failures (use stepfunctions-execution-troubleshooter).20 activation_triggers: Express workflow, create Express state machine, Step Functions EXPRESS, sync express execution, start-sync-execution, async express, Express workflow logging, Step Functions CloudWatch Logs, INCLUDE_DATA, EXCLUDE_DATA, EventBridge Step Functions, Distributed Map Express, Standard-to-Express migration, Express idempotency21 invocation_schema: 'Input: either (a) a workflow name + ASL definition (or requirements to derive one) + sync/async invocation mode, or (b) a Standard-to-Express migration spec (existing state machine ARN + compatibility check), or (c) an EventBridge-scheduled Express spec (schedule expression + execution role). Output: deterministic EXPRESS_WORKFLOW / VERDICT / CHECKLIST / VERIFICATION_COMMANDS block per the STRICT output contract, where VERDICT is READY_TO_DEPLOY or PREREQUISITES_MISSING.'22 version: 0.1.023 author: Jacky Chan — AWS Community Builder24 keywords: aws, step-functions, stepfunctions, express-workflow, state-machine, asl, amazon-states-language, sync-execution, requestresponse, async-execution, cloudwatch-logs, include-data, exclude-data, eventbridge, distributed-map, inline-map, sync-integration, waitfortasktoken, idempotency, at-least-once, iam-execution-role, x-ray, cloudops, deploy25 tags: aws, step-functions, express-workflow, state-machine, sync-execution, logging, eventbridge, deploy, app-integration26 dependencies: aws-orchestrator27---2829# Step Functions Express Workflows Deployer3031## What this skill does3233Provisions Step Functions Express Workflows and surrounding34primitives (CloudWatch Logs with correct level and data-exposure,35IAM least-privilege execution role, EventBridge scheduling,36Distributed Map configuration, idempotency guard for at-least-once37delivery) with production defaults. The skill walks a 9-step38procedure, surfaces the silent-failure modes unique to Express39(most dangerous: `.waitForTaskToken` is rejected at create-time,40but operators migrating from Standard discover this only on deploy;41logging is NOT enabled by default, so async Express executions are42invisible after the 5-minute history window; the at-least-once43delivery model means non-idempotent Lambda handlers can double-44execute on retries). The single most common incident this skill45prevents: an operator migrates a high-volume Standard workflow to46Express for cost savings, the migration drops CloudWatch Logs, and47the first failed execution is invisible — no alarm, no log, and the485-minute execution history has already rolled over.4950## Quick navigation5152| Section | What it covers | When to read it |53|---|---|---|54| **Quick reference** | Provisioning summary (9 steps), verdict thresholds | Before any operation |55| **Activation keywords** | Phrases that route to this skill | Disambiguating routing |56| **Reasoning framework** | Why Express is a cost + semantics decision | Choosing Express vs Standard |57| **Dependency graph** | Which configs silently no-op without their prerequisite | Debugging "logs are empty" |58| **Expert heuristic** | waitForTaskToken block; at-least-once idempotency; sync API Gateway timeouts | Pre-empt incidents |59| **Prerequisites** | What to verify before emitting any command | Avoid PREREQUISITES_MISSING rework |60| **9-step procedure** | The actual provisioning with copy-pasteable CLI | Executing the deploy |61| **NEVER (top 5)** | Hard rules that prevent silent exposure / data-plane bugs | Review before deploy |62| **STRICT output contract** | Required EXPRESS_WORKFLOW / VERDICT / CHECKLIST / VERIFICATION_COMMANDS block | Formatting the response |63| **Recent AWS features** | Express + Distributed Map, AWS SDK direct calls | Stay current |6465## Quick reference — provisioning summary (9 steps)6667| Step | Action | Reversible? | Key risk if skipped |68|---|---|---|---|69| 1 | Confirm Express-vs-Standard decision (5-min cap, at-least-once, cost model) | — | wrong type = 100x cost or 5-min timeout |70| 2 | Verify workflow duration fits in the 5-minute Express cap | Yes | sync API Gateway returns 500; async retried mid-flight |71| 3 | Verify all service integrations are Express-compatible (NO `.waitForTaskToken`) | Yes | create-state-machine API silently rejects the definition |72| 4 | Define the ASL with Express-compatible patterns (Distributed Map, .sync, AWS SDK) | Yes | — |73| 5 | Create the IAM execution role with least-privilege | Yes | over-broad `states:*` on `*` |74| 6 | Configure logging (CloudWatch Logs + level + INCLUDE_DATA/EXCLUDE_DATA) | Yes | async executions invisible after 5-min history |75| 7 | Choose sync (RequestResponse) vs async invocation mode | Yes | sync API Gateway timeout misalignment |76| 8 | Configure EventBridge scheduling + observability (X-Ray, CloudWatch alarms) | Yes | silent failures with no alarm |77| 9 | Verify every configuration item against actual state + emit checklist | — | silent no-ops |7879**Critical ordering constraints:** Express-vs-Standard decision80first (every downstream choice depends on the type); duration81budget before ASL definition (a workflow that exceeds 5 minutes82cannot be Express); integration compatibility before the IAM role83(`.waitForTaskToken` rejected at create-time even with a valid84role); logging configuration before the first execution (without85logging, async Express executions are invisible after the 5-minute86history rolls over); sync-vs-async choice before the caller87integration (API Gateway sync requires timeout alignment to ≤ 29s88to avoid 504). Rationale and the silent-failure table are below.8990## Activation keywords9192Express workflow, create Express state machine, Step Functions93EXPRESS, sync express execution, start-sync-execution, async94express, Express workflow logging, Step Functions CloudWatch Logs,95INCLUDE_DATA, EXCLUDE_DATA, FATAL / ERROR / ALL levels, EventBridge96Step Functions target, Distributed Map Express, Inline Map Express,97Standard-to-Express migration, at-least-once Step Functions, Express98idempotency, Express sync API Gateway, .sync integration Express,99AWS SDK integration, X-Ray tracing Step Functions.100101## Invocation contract (hard requirement)102103When this skill is invoked with an Express Workflow provisioning104request, the agent MUST respond with the checklist defined in105§"STRICT output contract" using the literal all-caps labels106`EXPRESS_WORKFLOW:`, `VERDICT:`, `CHECKLIST:`, and107`VERIFICATION_COMMANDS:`. Do NOT preface the checklist with prose,108headings, or disclaimers — emit the block as the first lines of the109response. This contract is what assertion-based evals and downstream110provisioning pipelines rely on; deviating from the literal labels111breaks automation silently.112113## Reasoning framework (why the Express decision matters)114115> Full detail moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) - load on demand.116> Summary: full Express-vs-Standard reasoning prose; every branch is preserved in the Decision tree below.117118## Dependency graph (silent-failure table)119120| Configuration | Hard dependencies (API error without) | Silent failure mode (returns 200, does nothing) | Enables downstream |121|---|---|---|---|122| Express state machine | unique name; valid ASL | `.waitForTaskToken` in ASL → API rejects with definition-validation error; operators misread as IAM error and keep re-applying | — |123| CloudWatch Logs log group | log group exists in same account + region | **log group ARN omitted at create-time → executions do not log; 5-min history rolls over and failure is invisible** | observability |124| Log level (ALL / ERROR / FATAL / OFF) | log group attached | **level set to OFF or FATAL only → execution-level errors invisible; operator sees empty log group** | debuggability |125| INCLUDE_DATA / EXCLUDE_DATA | log group attached | **EXCLUDE_DATA on a workflow that takes PII inputs → traces show only metadata, blocking RCA** (or inverse: INCLUDE_DATA on PII → compliance violation) | input/output visibility |126| IAM execution role | trust policy allows `states.<region>.amazonaws.com` | trust policy missing service principal → `AccessDenied` on first execution; not surfaced at create-time | service integrations |127| Sync execution (start-sync-execution) | state machine type EXPRESS | calling start-sync-execution on a Standard state machine → error; but a caller using start-execution on Express works (just async) | API Gateway / direct sync |128| EventBridge target | execution role for EventBridge to assume | **target without role → rule fires, no execution; EventBridge shows Invocations = 1, Step Functions shows Executions = 0** | scheduled recurring runs |129| Distributed Map | state machine type EXPRESS or STANDARD; IAM allows read on ItemReader source | **Map state on Express with > 10,000-item fan-out hits 5-min cap → workflow fails mid-iteration with no progress signal** | large-scale fan-out |130| .sync integration | supported service (Glue, Batch, ECS, SageMaker) | unsupported service in Resource ARN → API rejects; misread as syntax error | run-job-and-wait |131| AWS SDK integration | IAM allows the underlying SDK action | **IAM allows `lambda:InvokeFunction` but the SDK integration calls `lambda:UpdateFunctionCode` → runtime AccessDenied** | direct API calls (no Lambda) |132133**The four silent-failure rows are the ones a baseline model134misses.** Missing logging, wrong log level, EXCLUDE_DATA on135debugging inputs, and missing EventBridge target role all return136success or wrong-shaped errors. Only Step 9 verification catches137the gap.138139## Expert heuristic: the waitForTaskToken Express block140141> Full detail moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) - load on demand.142> Summary: the complete waitForTaskToken migration-trap analysis and remedies.143144## Expert heuristic: at-least-once idempotency145146> Full detail moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) - load on demand.147> Summary: the complete at-least-once idempotency pattern with ASL example.148149## Expert heuristic: sync API Gateway timeout misalignment150151> Full detail moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) - load on demand.152> Summary: the complete sync API Gateway timeout misalignment analysis.153154## Prerequisites (verify before provisioning)155156| Prerequisite | Why it matters | How to verify |157|---|---|---|158| Workflow duration fits in 5 min | Express caps at 5 min; sync API Gateway caps at 29s | estimate from longest task * longest retry; `validate-state-machine-definition` does NOT check this |159| Workflow does NOT use `.waitForTaskToken` | Express rejects it at create-time | grep ASL for `:waitForTaskToken` |160| IAM execution role trust policy | service principal must be `states.<region>.amazonaws.com` | `aws iam get-role --role-name <ROLE>` |161| CloudWatch Logs log group exists (recommended) | Express execution history rolls over after 5 min | `aws logs describe-log-groups --log-group-name-prefix /aws/states/<NAME>` |162| Caller can assume the role (cross-account) | Cross-account callers need their own permission | caller identity policy check |163| EventBridge rule exists (scheduled) | Scheduled Express requires an EventBridge rule + target role | `aws events describe-rule --name <RULE>` |164| AWS region supports Express | Express is available in all commercial regions | `aws stepfunctions list-state-machines --region <REGION>` |165166If any prerequisite is missing, output `VERDICT: PREREQUISITES_MISSING`167and cite the specific gap.168169## 9-step provisioning procedure170171### Step 1 — Confirm Express-vs-Standard decision172173Verify Express is the correct type. Use this decision table:174175| If your workload… | Use |176|---|---|177| Runs > 5 minutes per execution | STANDARD |178| Uses `.waitForTaskToken` (callbacks) | STANDARD |179| Needs exactly-once semantics and idempotency is infeasible | STANDARD |180| Runs < 5 minutes, high-volume (>1k/day), idempotent or read-mostly | EXPRESS |181| Triggered by EventBridge at high frequency | EXPRESS |182| Fronted by API Gateway returning the workflow result synchronously | EXPRESS (sync) |183| Async messaging with very high throughput | EXPRESS (async) |184185> Full detail moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) - load on demand.186> Summary: the worked cost math (Standard vs Express break-even).187188### Step 2 — Verify workflow duration fits in the 5-minute cap189190Sum the worst-case duration of every Task state multiplied by its191Retry `MaxAttempts`. If the workflow includes a Distributed Map,192sum the longest batch. If the result can exceed 5 minutes, the193workflow is incompatible with Express — go back to Step 1.194195> Full detail moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md) - load on demand.196> Summary: the validate-state-machine-definition CLI (syntax-only check).197198**Common mistake:** assuming `validate-state-machine-definition`199checks the 5-min cap. It does NOT — only syntax. The cap is200enforced at runtime; executions fail with `States.Timeout`.201202### Step 3 — Verify all service integrations are Express-compatible203204> Full detail moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md) - load on demand.205> Summary: the grep command that rejects .waitForTaskToken definitions.206207Express-compatible integration patterns:208- RequestResponse (default): invoke and return immediately209- `.sync`: invoke and wait for completion (Glue, Batch, ECS, SageMaker, Comprehend)210- AWS SDK integrations: direct API calls without Lambda211212Express-INCOMPATIBLE patterns:213- `.waitForTaskToken`: callback pattern (unbounded wait)214215**Common mistake:** converting a Standard workflow that uses216`.waitForTaskToken` for the human-approval step. Replace with a217DynamoDB polling loop (`.sync` on a Lambda that polls approval218status) or split into two workflows.219220### Step 4 — Define the ASL with Express-compatible patterns221222> Full detail moved verbatim to [references/express-asl-patterns.md](references/express-asl-patterns.md) - load on demand.223> Summary: the complete Step 4 walkthrough with Distributed Map ASL template.224225### Step 5 — Create the IAM execution role with least-privilege226227> Full detail moved verbatim to [references/iam-and-logging-templates.md](references/iam-and-logging-templates.md) - load on demand.228> Summary: the complete Step 5 CLI + trust/identity policy templates.229230### Step 6 — Configure logging (CloudWatch Logs)231232> Full detail moved verbatim to [references/iam-and-logging-templates.md](references/iam-and-logging-templates.md) - load on demand.233> Summary: the complete Step 6 logging CLI, level guidance, and pitfalls.234235### Step 7 — Choose sync (RequestResponse) vs async invocation236237| Mode | Caller | Use when |238|---|---|---|239| Sync | API Gateway, direct start-sync-execution | Caller needs result synchronously, workflow < 29s p99 |240| Async | EventBridge, S3, SQS, start-execution | High throughput, fire-and-forget, up to 5 min |241242> Full detail moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md) - load on demand.243> Summary: the start-sync/start-execution CLI and timeout-alignment warning.244245### Step 8 — Configure EventBridge scheduling + observability246247> Full detail moved verbatim to [references/scheduling-and-observability.md](references/scheduling-and-observability.md) - load on demand.248> Summary: the complete Step 8 EventBridge rule, alarm, and X-Ray templates.249250### Step 9 — Verification251252Run every verification command and confirm each output matches the253expected state.254255> Full detail moved verbatim to [references/diagnostic-commands.md](references/diagnostic-commands.md) - load on demand.256> Summary: the Step 9 verification CLI listing.257258## NEVER do these things259260These anti-patterns cause silent exposure, data-plane bugs, or261compliance violations. Each is observed in real production incidents262— the "why it's wrong" line is the post-mortem finding.2632641. **NEVER provision an Express workflow with `.waitForTaskToken` in265 the ASL.** Why it's wrong: Express rejects the integration at266 create-time (5-min cap is incompatible with unbounded callback267 wait). The error references the line number, not the268 incompatibility — operators loop on re-applying. Replace with269 `.sync` for supported run-job integrations or split into a270 Standard + Express pair.2712722. **NEVER deploy async Express without CloudWatch Logs enabled and273 an `ExecutionsFailed` alarm.** Why it's wrong: async Express has274 no caller to surface errors. The 5-min execution-history window275 rolls over quickly; without persistent logging, failures are276 invisible. Without an alarm, the failure may go undetected for277 days. ALWAYS attach a log group with `level >= ERROR` and alarm278 on `ExecutionsFailed`.2792803. **NEVER assume Express executions are exactly-once.** Why it's281 wrong: Express is at-least-once. The infrastructure can restart282 an execution on internal events; the same input can produce two283 invocations of a side-effecting integration. Every write-path284 integration MUST be idempotent via a key persisted BEFORE the285 side effect.2862874. **NEVER front a sync Express workflow with API Gateway without288 aligning the timeout.** Why it's wrong: API Gateway caps at 29s;289 Express sync can run to 5 min. When p99 exceeds 29s, API Gateway290 returns 504 while Express keeps running — the client retries,291 producing a second execution that may double-charge if the292 integration is non-idempotent. Set the API Gateway integration293 timeout to 29000 ms and alarm on p99 duration > 25s.2942955. **NEVER set log level to OFF or FATAL on an Express workflow.**296 Why it's wrong: OFF and FATAL produce near-empty logs, blocking297 RCA. Use `ALL` for development and non-PII workloads; `ERROR` for298 high-volume production. Always set `includeExecutionData=true`299 unless the workflow processes regulated PII — and in that case,300 redact the PII at the input, not by disabling execution data.301302## Output format303304> Full detail moved verbatim to [references/worked-examples.md](references/worked-examples.md) - load on demand.305> Summary: the literal output template block.306307## STRICT output contract308309The rules below are hard constraints. Violating any one produces a310checklist that looks complete but contains a silent misconfiguration.311Self-check EVERY emitted block against these rules before returning.312313### Required output structure314315Every response MUST be a single block using these literal labels, in316this order. Do NOT preface with prose, headings, or disclaimers.317318```text319EXPRESS_WORKFLOW: <name>320VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING321CHECKLIST:322 [✓|✗] Express-vs-Standard decision: EXPRESS (duration < 5 min, at-least-once acceptable)323 [✓|✗] Duration budget: p99 < 5 min (sync: p99 < 29s)324 [✓|✗] No .waitForTaskToken in ASL: verified325 [✓|✗] ASL definition validated: Distributed Map / .sync / AWS SDK as applicable326 [✓|✗] IAM execution role: least-privilege, service principal states.<region>.amazonaws.com327 [✓|✗] Logging: log-group /aws/states/<NAME>, level ALL|ERROR, includeExecutionData=true328 [✓|✗] Invocation mode: sync | async (sync caller timeout aligned)329 [✓|✗] EventBridge schedule + CloudWatch alarm: configured330 [✓|✗] Idempotency: side-effecting integrations have idempotency key331VERIFICATION_COMMANDS:332 <copy-pasteable verification commands — one per [✓] item>333```334335### Decision tree: Express vs Standard336337```text338Express vs Standard — START339 │340 Q1: Does any single execution need to run > 5 minutes?341 ├── YES → STANDARD (Express hard-caps at 5 min per execution)342 └── NO → Q2343 │344 Q2: Does the ASL use .waitForTaskToken (callback / human-approval)?345 ├── YES → STANDARD (Express rejects .waitForTaskToken at create-time)346 └── NO → Q3347 │348 Q3: Is exactly-once required AND idempotency is infeasible?349 ├── YES → STANDARD (Express is at-least-once; retries can double-execute)350 └── NO → Q4351 │352 Q4: Is the workload high-volume (> 1,000 executions/day)?353 ├── NO → Either works; prefer STANDARD unless cost is a concern354 └── YES → Q5355 │356 Q5: Can all side-effecting integrations be made idempotent?357 ├── NO → STANDARD (at-least-once risks duplicate writes / charges)358 └── YES → EXPRESS359 Cost model:360 Standard: $25.00 / 1M state transitions361 Express: $1.00 / 1M invocations + $0.025 / GB-hour362 10-state workflow, 1M runs/day:363 Standard = $250/day | Express = $1/day364 10-state workflow, 10M runs/day:365 Standard = $2,500/day | Express = $10/day366```367368### FORBIDDEN output patterns3693701. **NEVER emit `VERDICT: READY_TO_DEPLOY` without showing ALL 9371 checklist items.** Every item MUST appear with a status marker:372 `[✓]`, `[✗]`, or `[OPTIONAL]` (e.g., EventBridge schedule when373 the workflow is not scheduled). Omitting a row implies it was374 not evaluated.3753762. **NEVER mark the ASL as `[✓]` without confirming the definition377 contains NO `.waitForTaskToken` Resource ARN suffix.** The378 integration is silently rejected by Express at create-time; the379 verification MUST include a `grep` or equivalent.3803813. **NEVER mark Logging as `[✓]` without citing the specific log382 group name, level (ALL / ERROR), and `includeExecutionData`383 value.** A bare `[✓] Logging: configured` is non-compliant —384 level and data-exposure flag are load-bearing. OFF and FATAL are385 non-compliant for an Express workflow.3863874. **NEVER mark sync invocation as `[✓]` without confirming the388 caller's timeout is ≤ 29s (API Gateway) or equivalent for the389 direct caller.** Misaligned timeouts cause silent 504s while390 Express keeps running, producing double-executions on retry.3913925. **NEVER mark Idempotency as `[✓]` for a workflow with side-393 effecting integrations unless each such integration has an394 idempotency key persisted BEFORE the side effect.** The checklist395 MUST cite the key source (e.g.,396 `IdempotencyKey.$: "$$.Execution.Id"`).3973986. **NEVER emit `VERDICT: PREREQUISITES_MISSING` without citing the399 specific gap.** Each `[✗]` item MUST have a one-line reason:400 `[✗] ASL uses .waitForTaskToken at line 42 — replace with .sync401 or migrate to Standard`. A bare `[✗]` is non-compliant.4024037. **NEVER omit the cost-model comparison from the Express-vs-404 Standard checklist row.** The row MUST cite the cost delta405 (e.g., "Express $1/M invocations vs Standard $25/M transitions")406 so the operator can sanity-check the type choice. A bare407 "EXPRESS" without cost rationale is non-compliant.408409### Perfect example output — READY_TO_DEPLOY410411Scenario: High-volume event-processing Express workflow. JSON event412batches land in S3; a Distributed Map fans them out to a Lambda for413per-event processing. Async, triggered by EventBridge every 5 minutes.414At 2M executions/day with a 5-state workflow: Standard would cost415~$250/day ($25/M x 10M transitions); Express costs ~$2/day ($1/M416x 2M invocations). p99 execution duration = 12s.417418```text419EXPRESS_WORKFLOW: event-processor-express420VERDICT: READY_TO_DEPLOY421CHECKLIST:422 [✓] Express-vs-Standard decision: EXPRESS (p99 12s, idempotent;423 cost: Express $1/M invocations vs Standard $25/M transitions;424 2M runs/day x 5 states = 10M transitions -> Standard $250/day vs Express $2/day)425 [✓] Duration budget: p99 12s < 5 min (async; no sync API Gateway alignment needed)426 [✓] No .waitForTaskToken in ASL: verified (grep -c ':waitForTaskToken' definition.json = 0)427 [✓] ASL definition validated: Distributed Map (MaxConcurrency 1000, S3 ItemReader)428 + Lambda Task with idempotency key (see ASL below)429 [✓] IAM execution role: sfn-event-processor-exec, trust=states.us-east-1.amazonaws.com,430 scoped to lambda:InvokeFunction on arn:aws:lambda:us-east-1:123456789012:function:process-event431 + s3:GetObject on arn:aws:s3:::event-input-bucket/events/*.json432 [✓] Logging: /aws/states/event-processor-express, level ALL, includeExecutionData=true433 (30-day retention; see logging CLI below)434 [✓] Invocation mode: async (EventBridge schedule rate(5 minutes))435 [✓] EventBridge schedule: rule event-processor-schedule, target role eventbridge-sfn-role,436 CloudWatch alarm event-processor-failed on ExecutionsFailed >= 1437 [✓] Idempotency: ProcessEvent Lambda checks IdempotencyKey=$$.Execution.Id against438 DynamoDB table event-idempotency before writing; duplicate retries are no-ops439VERIFICATION_COMMANDS:440 aws stepfunctions describe-state-machine --state-machine-arn arn:aws:states:us-east-1:123456789012:stateMachine:event-processor-express441 grep -c ':waitForTaskToken' definition.json442 aws logs describe-log-groups --log-group-name-prefix /aws/states/event-processor-express443 aws events describe-rule --name event-processor-schedule444 aws cloudwatch describe-alarms --alarm-names event-processor-failed445```446447ASL definition (Distributed Map + Lambda Task with idempotency key):448449```json450{451 "StartAt": "FanOutProcess",452 "States": {453 "FanOutProcess": {454 "Type": "Map",455 "ItemProcessor": {456 "ProcessorConfig": { "Mode": "DISTRIBUTED" },457 "StartAt": "ProcessEvent",458 "States": {459 "ProcessEvent": {460 "Type": "Task",461 "Resource": "arn:aws:lambda:us-east-1:123456789012:function:process-event",462 "Parameters": {463 "IdempotencyKey.$": "$$.Execution.Id",464 "EventPayload.$": "$.value"465 },466 "Retry": [467 { "ErrorEquals": ["States.TaskFailed"], "MaxAttempts": 3, "BackoffRate": 2 }468 ],469 "End": true470 }471 }472 },473 "ItemReader": {474 "Resource": "arn:aws:states:::s3:getObject",475 "Parameters": { "Bucket": "event-input-bucket", "Key": "events/batch.json" }476 },477 "MaxConcurrency": 1000,478 "End": true479 }480 }481}482```483484Logging configuration CLI (create log group with retention + attach485at state machine creation):486487```bash488aws logs create-log-group --log-group-name /aws/states/event-processor-express489aws logs put-retention-policy \490 --log-group-name /aws/states/event-processor-express --retention-in-days 30491492aws stepfunctions create-state-machine \493 --name event-processor-express \494 --definition file://definition.json \495 --role-arn arn:aws:iam::123456789012:role/sfn-event-processor-exec \496 --type EXPRESS \497 --logging-configuration \498 level=ALL,includeExecutionData=true,\499 destinations='[{CloudWatchLogsLogGroup={LogGroupArn=arn:aws:logs:us-east-1:123456789012:log-group:/aws/states/event-processor-express:*}}]'500```501502### Perfect example output — PREREQUISITES_MISSING503504> Full detail moved verbatim to [references/worked-examples.md](references/worked-examples.md) - load on demand.505> Summary: the full PREREQUISITES_MISSING example with self-check list.506507## Recent AWS features508509> Full detail moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) - load on demand.510> Summary: the full feature list (Distributed Map on Express, SDK integrations, typed ARNs, log granularity, X-Ray, IAM condition keys).511## References (load on demand)512513- [references/worked-examples.md](references/worked-examples.md) - secondary example output (PREREQUISITES_MISSING) and the output-format template514- [references/diagnostic-commands.md](references/diagnostic-commands.md) - pre-flight validation, compatibility grep, invocation, and verification CLI listings515- [references/advanced-patterns.md](references/advanced-patterns.md) - Express reasoning prose, expert heuristics, cost math, recent AWS features516- [references/scheduling-and-observability.md](references/scheduling-and-observability.md) - EventBridge scheduling, CloudWatch alarms, X-Ray tracing templates517- [references/express-asl-patterns.md](references/express-asl-patterns.md) - (existing) ASL patterns; now also holds the Step 4 Express ASL template518- [references/iam-and-logging-templates.md](references/iam-and-logging-templates.md) - (existing) IAM/logging templates; now also holds Step 5-6 CLI templates