Hey all,
TITLE: Is AWS Bedrock AgentCore Gateway officially compatible with Durable Execution Lambda handlers?
I’m trying to use an AWS Durable Lambda function (https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html, https://github.com/aws/aws-durable-execution-sdk-python) as a target for AWS Bedrock AgentCore Gateway, but the target registration fails.
Error during “Update Target”:
Update Target operation failed for client-actions:
There was an error creating the target(s). ValidationException: Invalid request to Lambda function arn:xxxxx
Invalid parameter or request content. Check your request parameters and retry
My observations:
A plain Lambda function works successfully as a Gateway target.
A different plain durable Lambda fails if attempted to add as a Gateway target.
The failure happens during Gateway target validation/update, before actual runtime invocation.
Minimal reproducible example:
from aws_durable_execution_sdk_python.config import Duration
from aws_durable_execution_sdk_python.context import DurableContext, StepContext, durable_step
from aws_durable_execution_sdk_python.execution import durable_execution
@durable_execution
def lambda_handler(event, context) -> dict:
return {
"statusCode": 200,
"body": {
"responses": [
{
"answer": "Working",
"lang": "EN-US",
"options": ["1"]
}
],
"response_mode": "single",
"type": "success"
},
"provider_type": "sample_provider",
"bypass_send_message": False
}
AWS Region: us-west-2
Runtime: Python 3.x
Using AWS Durable Execution SDK for Python
AgentCore Gateway target type: Lambda
I found the Git repo example suggesting durable Lambda handlers can work with AgentCore Gateway as target, but I could not find official AWS documentation confirming whether this integration is supported.
Source: https://github.com/kpx-dev/strands-agentcore-async-demo
Questions:
Are durable lambda handlers decorated with @durable_execution officially supported as AgentCore Gateway targets?
Does Gateway validation require a specific request/response contract for durable handlers?
Would appreciate any help or examples being pointed out.
Thanks much in advance!
Top comments (0)