How we can set authentication for elasticsearch ?
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.
elasticsearch is not yet supported by cloudformation
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: