Hi,
I am trying to make a connection to kendra and used the following lines of code.
String accessKey = <xxxxxxxxxxxxxxxxxxx>;
String secretKey = <xxxxxxxxxxxxxxx>;
String indexId = <xxxxxxxxxxxxxx>;
AwsCredentials awsCredentials = AwsBasicCredentials.create(accessKey, secretKey);
//S/dkHttpClient httpClient = ApacheHttpClient.builder().build();
KendraClient kendraClient = KendraClient.builder()
.region(Region.US_EAST_1)
.credentialsProvider(() -> awsCredentials)
.build();
// Set up the query request with attribute filter
QueryRequest queryRequest = QueryRequest.builder()
.queryText(searchWord)
.indexId(indexId)
.build();
QueryResponse queryResult = kendraClient.query(queryRequest);
I am getting the following error :
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. (Service: Kendra, Status Code: 400, Request ID: 06ce1fc5-e040-4939-9a85-3e9b245f7a2e)
Thanks in advance!