invokeFlow with Postman returns empty body and "Network error" in the Test prompt flow

0

Hi,

I'm trying to run a flow defined in the prompt flows in Bedrock, I'm trying to do it with a POST request so I'm using Postman, this is the request:

This is the request with the response

As you can see in the image I get a 200 OK response but an empty body but I don't know why because the response should be a string.

This is the flow

I tried to test the flow in the Test Prompt flow but I get a "Network Error" in the chat, I want to check the logs of this but I don't know where.

This is the error in the Test prompt flow

Things to consider:

  • Each prompt is using Llama 3.1 70b
  • If I only use one prompt it works
  • The region is us-west-2 but I'm calling it from Spain

I need to use both prompts and I have to add more. So my questions are:

  • Why is the Test prompt flow failing with two prompts with an "Network error"?
  • Where can I check the Prompt flows logs (with api calls or not)?
  • Why is the invokeFlow api call returning an 200 OK with an empty body? Is this related to the "Network error" in the Test prompt flow?

Thanks in advance.

John
asked a month ago75 views
1 Answer
0

Hello,

This is Shubham from AWS !

Based on my analysis, I would like to provide the following information to address your questions:

Q1 - Why is the Test prompt flow failing with two prompts with a "Network Error"?

Answer - As per the documentation[1], the maximum number of prompt nodes that can be added to a prompt flow is 5. Since you mentioned that the flow works with a single prompt, the issue seems to be arising when you are using multiple prompts. To investigate further, I would recommend checking the network logs of your browser when this error occurs, as it might contain more detailed information related to the issue. If you need assistance from our end, please record a HAR file[2] of this issue and share it with us by creating a support case with AWS Support[3].

Q2 - Where can I check the Prompt flows logs (with API calls or not)?

Answer - For API calls like invokeFlow, you can check the CloudTrail logs for the specific API call event. CloudTrail logs can provide detailed information about the request and response, which can be helpful in troubleshooting. You can find more information on Bedrock CloudTrail logging in the documentation[5].

Q3 - Why is the invokeFlow API call returning a 200 OK with an empty body? Is this related to the "Network Error" in the Test prompt flow?

Answer - The ideal response structure for the invokeFlow API call should look similar to what is mentioned in the documentation[4]. If you are receiving a 200 OK response with an empty body, it could indicate an issue with the API call.

While the "Network Error" in the Test prompt flow and the empty response from the invokeFlow API call could be related, it's difficult to determine the exact cause without further investigation. Checking the CloudTrail logs for the invokeFlow API call event, as mentioned earlier, might provide more insights into the issue.

If you need further assistance or if the issue persists, please open a support case with the AWS Technical Support team. Provide detailed information about your setup, the steps you've taken, and any relevant logs or error messages. AWS Support can investigate further and provide more specific guidance.

References:

[1] Bedrock quota: https://docs.aws.amazon.com/bedrock/latest/userguide/quotas.html

[2] Creating a HAR file: https://repost.aws/knowledge-center/support-case-browser-har-file

[3] Creating a support case: https://docs.aws.amazon.com/awssupport/latest/user/case-management.html#creating-a-support-case

[4] InvokeFlow API response syntax: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent-runtime_InvokeFlow_ResponseSyntax

[5] Bedrock CloudTrail logging: https://docs.aws.amazon.com/bedrock/latest/userguide/logging-using-cloudtrail.html#service-name-data-events-cloudtrail

Please let me know if you need any further assistance or have additional questions.

AWS
SUPPORT ENGINEER
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions