Modify CDK Step Functions workflows (ReviewProcessor and ChecklistProcessor) for the RAPID application, including workflow step changes, Map State concurrency, retry/timeout configuration, error handling, and parameter updates. Use when changing workflow step sequences, adjusting concurrency, modifying retry logic, or adding/removing workflow steps.
cdk/lib/constructs/
├── review-processor.ts # Review workflow (3-step)
├── checklist-processor.ts # Checklist workflow (5-step)
├── agent.ts # AgentCore infrastructure
└── lambda/invoke-agent/ # Agent invocation Lambda
Config: maxConcurrency default 1, timeout 2 hours
Config: inlineMapConcurrency default 1, timeout 24 hours, thresholds: 40 pages (medium), 100 pages (large)
// Create task
const newTask = new tasks.LambdaInvoke(this, "NewTaskId", {
lambdaFunction: processorLambda,
payload: sfn.TaskInput.fromObject({
action: "newAction",
dataParam: sfn.JsonPath.stringAt("$.previous.result"),
}),
resultPath: "$.newResult",
resultSelector: { "Payload.$": "$.Payload" },
});
// Add error handling
newTask.addCatch(handleErrorTask, {
errors: ["States.ALL"],
resultPath: "$.error",
});
// Chain into workflow
const definition = prepareTask.next(newTask).next(processTask).next(finalizeTask);
Look for definitionBody: sfn.DefinitionBody.fromChainable() in processor files.
const processItemsMap = new sfn.Map(this, "ProcessAllItems", {
maxConcurrency: maxConcurrency,
itemsPath: sfn.JsonPath.stringAt("$.prepareResult.Payload.checkItems"),
resultPath: "$.processedItems",
});
Set via CDK parameters: cdk deploy -c rapid.reviewMapConcurrency=5
Trade-offs: Higher = faster but more cost/throttling. Lower = slower but predictable.
task.addRetry({
errors: ["RetryException", "ThrottlingException", "ServiceQuotaExceededException"],
interval: cdk.Duration.seconds(2),
maxAttempts: 5,
backoffRate: 2,
});
parameter-schema.ts with a default and a description (project
convention — the real schema uses .default(...), not .optional()):
reviewMapConcurrency: z.number().int().min(1).default(5).describe("...").
Users override the default in cdk/lib/parameter.ts (or via -c rapid=...).rapid-stack.tsTask: timeout: cdk.Duration.minutes(15)
State machine: timeout: cdk.Duration.hours(2)
For JsonPath patterns and state machine creation templates, see references/CDK-PATTERNS.md.
| Modification | Location | Search For |
|--------------|----------|------------|
| Review workflow steps | review-processor.ts | definitionBody.fromChainable |
| Checklist workflow steps | checklist-processor.ts | definitionBody.fromChainable |
| Map State concurrency | Both processor files | new sfn.Map |
| Retry logic | Task definitions | .addRetry |
| Error handling | Task definitions | .addCatch |
| Parameters | parameter-schema.ts | z.number(), z.boolean() |
cd cdk && npx cdk synth
After verification, deploy with /deploy-cdk-stack.
cdk synth completes without errorsnpx skills add aws-samples/modify-cdk-workflows下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer