Hello,
I'm using a Bedrock Agent to do a recommendation engine. The agent has a Lambda associated with it to invoke certain Prompt Flows.
I have this error when trying to invoke the prompt flow that tells me my alias is wrong however I see conflicting info in the docs.
This is how I invoke it:
` response = client.prepare_flow(flowIdentifier="arn:aws:bedrock:us-east-1:123456789:flow/CKUHX8JW7L")
client_runtime = boto3.client('bedrock-agent-runtime')
response = client_runtime.invoke_flow(
flowIdentifier="arn:aws:bedrock:us-east-1:123456789:flow/CKUHX8JW7L",
flowAliasIdentifier="arn:aws:bedrock:us-east-1:123456789:flow/CKUHX8JW7L/alias/BOTALIAS1",
inputs=[
{
"content": {
"document":
user_input
},
"nodeName": "FlowInput",
"nodeOutputName": "document"
}
]
)`
This is the error:
"errorMessage": "An error occurred (ValidationException) when calling the InvokeFlow operation: The FlowAliasIdentifier is invalid. Please use a valid Flow Alias Arn or Id.", "errorType": "ValidationException",
The documentation (https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html) hints from the regex that the alias should be 10 characters however the UI tells you it can be 100.
How can I fix this issue?
thank you for your assistance,
Antoine