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;

已提問 2 年前檢視次數 2148 次
2 個答案
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
專家
john_l
已回答 2 年前
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
專家
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南