Aws-cdk: How to set authentication for elasticsearch

Created on 22 Apr 2019  路  5Comments  路  Source: aws/aws-cdk

How we can set authentication for elasticsearch ?

@aws-cdaws-elasticsearch efforsmall feature-request

All 5 comments

Appears that Cognito authentication is not supported by @aws-cdk/aws-elasticsearch yet. I believe an approach may be to create a custom resource that handles it onCreate.

In CloudFormation it looks like this:

CognitoOptions:
  Enabled: boolean;
  UserPoolId: string;
  IdentityPoolId: string;
  RoleArn: string;

Hi @vjindalradialtheory, like @cmckni3 mentioned, cognito for elasticsearch is not yet supported by cloudformation which means it isn't supported by the CDK. So in the meantime the best way is to follow the above steps. Thanks @cmckni3! 馃憤

Closing for now, but feel free to reopen.

Awesome!

I got the API and CFN docs mixed up. Example I posted came from AWS CLI.

Can use the AWS CDK escape hatch until official CDK support.

Thanks @steffeng!

We are actively working on an Elasticsearch L2 which will also include cognito authentication. In any case, The L1 also supports cognito options now:

https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-elasticsearch.CfnDomain.CognitoOptionsProperty.html

Was this page helpful?
0 / 5 - 0 ratings