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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ