I'm trying to build a semantic search engine using Amazon Kendra. I wrote the code on Sagemaker's Jupyter Notebook. I'm stuck at the following part:
Code:
response = kendra.query(
QueryText = "retrieve blue colored shoes from the inventory data",
IndexId = "xxxxxx"
)
Error:
EndpointConnectionError: Could not connect to the endpoint URL: "https://kendra.eu-north-1.amazonaws.com/"
My S3 buckets in which I've stored the datasets used in the code have the 'AWS Region' as 'Asia Pacific (Mumbai) ap-south-1'. My Amazon Kendra index too has the same region. Then why is my error talking about some other region: eu-north-1?
Try to initialize session and pass the region, then from that session initialize the kendra client: