Timestream Query running from Lambda

0

Hello: I want to retrieve my Timestream data from API Gateway, so I need to write query code in lambda. I tried the Timestream SDK in Nodejs, and it worked fine running from the CLI. However, trying to replicate same example in AWS Lambda, it runs without errors, but so far, I can't get any data... I was trying to get Query examples to run from Lambda but I couldn't find... Any help would be appreciated.

Regards;

posta 2 anni fa2148 visualizzazioni
2 Risposte
0

It's tough to tell without knowing the details of your implementation. We do have examples in the Timestream documentation that might help.

AWS
ESPERTO
john_l
con risposta 2 anni fa
0

If you are using NodeJS in lambda make sure that your handler is defined as an async function and that the code await on the Timestream API call. (see a generic example here https://docs.aws.amazon.com/lambda/latest/dg/nodejs-handler.html#nodejs-handler-async)

Alternatively use Python with is synchronous. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/timestream-query.html

AWS
ESPERTO
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande