Skip to content

feat(sfn): AWS Step Functions + Amazon Bedrock AgentCore Harness optimized integration (CDK)#3166

Open
NithinChandranR-AWS wants to merge 4 commits into
aws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-sfn-bedrockagentcore-harness-cdk
Open

feat(sfn): AWS Step Functions + Amazon Bedrock AgentCore Harness optimized integration (CDK)#3166
NithinChandranR-AWS wants to merge 4 commits into
aws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-sfn-bedrockagentcore-harness-cdk

Conversation

@NithinChandranR-AWS

Copy link
Copy Markdown
Contributor

Description

First CDK pattern using the AWS Step Functions optimized integration for Amazon Bedrock AgentCore Harness. Zero AWS Lambda — returns Converse-shaped responses with aggregated token metrics and CloudWatch reasoning traces.

Architecture

User Input → AWS Step Functions → Amazon Bedrock AgentCore Harness (optimized) → Formatted Output

Services

  • AWS Step Functions (Standard)
  • Amazon Bedrock AgentCore (Harness)

Testing performed

  • Deployed to us-east-1, execution SUCCEEDED
  • Response: 5,202 tokens, 20.7s latency, end_turn stop reason
  • Error handling: throttle retry with exponential backoff, ResourceNotFoundException catch

@bfreiberg bfreiberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great already, minor changes required

@@ -0,0 +1,81 @@
{
"title": "AWS Step Functions with Amazon Bedrock AgentCore Harness Optimized Integration (CDK)",
"description": "Invoke Amazon Bedrock AgentCore harness directly from AWS Step Functions using the optimized integration — zero Lambda, Converse-shaped responses, aggregated token metrics, and CloudWatch reasoning traces.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description needs to be 175 characters or less

@NithinChandranR-AWS NithinChandranR-AWS Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, trimmed to 158 characters.

```

----
Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copyright 2026 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, updated to 2026.

- Shorten description to 158 chars (was 207, limit 175)
- Update copyright year to 2026
@@ -0,0 +1,112 @@
# AWS Step Functions with Amazon Bedrock AgentCore Harness Optimized Integration (CDK)

This pattern invokes an Amazon Bedrock AgentCore harness directly from AWS Step Functions using the optimized integration — no AWS Lambda function required. The harness handles model inference, tool use, and multi-turn conversations, returning a Converse-shaped response with aggregated token metrics.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you didn't need a Lambda function before but the optimized integration has a higher timeout for example

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point -- reframed. The real differentiator is the 15-minute timeout vs 60 seconds on the SDK integration, not the Lambda-free aspect.

| Response format | Raw API response | Converse-shaped (text only, tool use omitted) |
| Token metrics | Manual calculation | Aggregated across all turns automatically |
| CloudWatch traces | Not available | Turn-by-turn reasoning deep-links |
| Max timeout | AWS Lambda timeout (15 min) | 15 minutes (Task state limit) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double check the SDK integration, I think it has only a 60 seconds timeout

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected -- updated the table to show 60 seconds for SDK integration. Thanks for catching that.

- SDK integration has 60-second API call timeout, not 15 min
- Optimized integration's key advantage is 15-min timeout for complex agents
- Lambda is optional for both, not required for SDK integration

@bfreiberg bfreiberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for your contribution. Your pattern will be merged soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants