Missing Header for AWS v4 signature requests
lopezdp opened this issue · 3 comments
Here is my implementation:
const awsConfig = new AWS.Config({
credentials: new AWS.Credentials(accessKeyId, secretAccessKey),
accessKeyId: accessKeyId,
secretAccessKey: secretAccessKey,
region: "us-west-9",
});
const client = new Client({
...createAwsElasticsearchConnector(awsConfig),
node:
"https://esDomain.us-west-9.es.amazonaws.com",
});
// index item in elasticsearch cluster
const result = await client.index(idxParams);
console.log("THIS IS DB RESULTING: ", result);
Using AWS Lambda to index and search an ES Cluster; Implemented library and get the following:
TypeError: Cannot read property 'presigned-expires' of undefined
ERROR:
INFO This call failed to Create a SearchCluster Item. TypeError: Cannot read property 'presigned-expires' of undefined
at V4.isPresigned (/var/task/node_modules/aws-sdk/lib/signers/v4.js:207:32)
at V4.addAuthorization (/var/task/node_modules/aws-sdk/lib/signers/v4.js:28:14)
at Runtime.main [as handler] (/var/task/indexItem.js:449:12)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
How do i get this working?
@compwright what do you think?
@lopezdp That may or may not be a bug in this library. Please provide a gist or runkit that reproduces the issue, and I can look into it further.
Possibly related: https://stackoverflow.com/questions/51969091/cannot-read-property-presigned-expires-of-undefined
turned out to be an access policy issue thanks for the response!