最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

amazon web services - AWS OpenSearch-Cognito authenticationauthorization for Lambda functions - Stack Overflow

programmeradmin0浏览0评论

We have an AWS OpenSearch cluster with cognito userPool/identityPool integrated with it. So when we go to access the dashboard, it takes us to cognito login page, where we login and gain access to the dashboard. This part of the set up is fine.

Now, we want our lambda function to interact with openSearch, for reading and writing into various indices. We are thinking of using "client_credentials" authentication flow (provided by cognito) to authenticate our requests from the lambda function.

The challenge is, for users to login, the OAuthFlow should be "code" and for lambda functions to authenticate, the OAuthFlow should be "client_credentials" (Machine-to-Machine authentication). But apparently, these two flows cannot be selected for a single appClient, as is evident in the error shown below:

So, first of all, is this the right practice? I mean trying to use cognito to authenticate our lambda function against openSearch. If yes, then what should the set up look like?

Please advise.

发布评论

评论列表(0)

  1. 暂无评论