- Newest
- Most votes
- Most comments
Good morning,
Did you have any success with the proposed changes above?
{ "messageVersion": "1.0", "response": { "actionGroup": "default", "function": "weather_data_crawler_action-tfeuw", "functionResponse": { "responseState": "SUCCESS", "responseBody": { "application/json": { "weather_data": [ { "dt": "2025.07.22 16:00:00", "temp": 38.8, "feels_like": 40.14, "pressure": 1005, "humidity": 28, "weather": [{"description": "clear sky"}] } ] } } } } }
answered a year ago
The error "The server encountered an error processing the Lambda response" you're experiencing with your Bedrock Agent could be due to several issues. Let me help you troubleshoot this problem.
First, there might be a permissions issue between your Bedrock Agent and Lambda function. You need to ensure that your Bedrock Agent has the necessary permissions to invoke the Lambda function by adding a resource-based policy statement to your Lambda function:
- Go to your Lambda function in the AWS Console
- Select the "Configuration" tab
- Click on "Permissions" in the left menu
- Scroll down to "Resource-based Policy Statements" and click "Add Permissions"
- Select "AWS Service" radio button
- Choose "Other" from the "Service" dropdown
- Enter a Statement ID (any identifier)
- Enter "bedrock.amazonaws.com" for the Principal
- Enter your Bedrock Agent's ARN as the Source ARN
- Select "lambda:InvokeFunction" as the Action
- Click "Save"
Regarding the Lambda response format, the issue might be with how you're structuring your response. For Bedrock Agents, try simplifying your response format to:
{
"messageVersion": "1.0",
"response": {
"actionGroup": "default",
"function": "weather_data_crawler_action-tfeuw",
"functionResponse": {
"responseState": "SUCCESS",
"responseBody": {
"application/json": {
"weather_data": [
{
"dt": "2025.07.22 16:00:00",
"temp": 38.8,
"feels_like": 40.14,
"pressure": 1005,
"humidity": 28,
"weather": [{"description": "clear sky"}]
}
]
}
}
}
}
}
Another potential issue could be with your action group name. Make sure your action group name doesn't contain hyphens (-) as these can cause issues with Bedrock Agents. Use underscores (_) instead.
To see more detailed error information, you can enable more comprehensive logging for both your Lambda function and the Bedrock Agent. Check the CloudWatch logs for both services to get more insight into where the error is occurring.
If you're still encountering issues after trying these solutions, you might want to run the agent container locally with the same payload for better diagnostics or consider implementing a custom parser Lambda function to handle the response.
Sources
Bedrock Agent hidden error | AWS re:Post
Error when Bedrock agent invoke lambda | AWS re:Post
Troubleshoot AgentCore Runtime - Amazon Bedrock AgentCore
Bedrock error "The server encountered an error processing the Lambda response. Check the Lambda response and retry the request" | AWS re:Post
Issue with Bedrock Agents and Lambda Function – Model Timeout/Error | AWS re:Post
answered a year ago
Relevant content
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 7 months ago

Hello,
According to the documentation the format of the response is:
Do you think that other formats would work ?
Hello,
I've tried also with the proposed changes, displayed below. The same error appeared.