Skip to content

How to search OpenSearch DB with nodejs lambda function ? #4082

Answered by RanVaknin
ouelletalexandre asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @ouelletalexandre ,

The SDK is usable 😄
Here is the link to the docs that you'll need to figure out which shapes the commands take in.

As a rule of thumb, every command in the SDK for example: getSomethingCommand will take a JS object of type getSomethingCommandInput as input, and return a JS object as output in the same convention getSomethingCommandOutput

So in your caseAcceptInboundConnectionCommand will take in a AcceptInboundConnectionCommandInput type. In this it takes in an object with this property:

so your code will look something like this:

import { OpenSearchClient, AcceptInboundConnectionCommand } from "@aws-sdk/client-opensearch";

const client = new OpenSearchClient({ re…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ouelletalexandre
Comment options

Answer selected by ouelletalexandre
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants