@aws-solutions-constructs/aws-lambda-opensearch 2.85.2 → 2.85.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.jsii CHANGED
@@ -8,7 +8,7 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "@aws-solutions-constructs/core": "2.85.2",
11
+ "@aws-solutions-constructs/core": "2.85.4",
12
12
  "aws-cdk-lib": "^2.193.0",
13
13
  "constructs": "^10.0.0"
14
14
  },
@@ -3993,7 +3993,7 @@
3993
3993
  },
3994
3994
  "name": "@aws-solutions-constructs/aws-lambda-opensearch",
3995
3995
  "readme": {
3996
- "markdown": "# aws-lambda-opensearch module\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)\n\n> All classes are under active development and subject to non-backward compatible changes or removal in any\n> future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.\n> This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n<div style=\"height:8px\"></div>\n\n| **Language** | **Package** |\n|:-------------|-----------------|\n|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_opensearch`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-opensearch`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdaopensearch`|\n\n## Overview\nThis AWS Solutions Construct implements an AWS Lambda function and Amazon OpenSearch Service with the least privileged permissions.\n\nHere is a minimal deployable pattern definition:\n\nTypescript\n``` typescript\nimport { Construct } from 'constructs';\nimport { Stack, StackProps, Aws } from 'aws-cdk-lib';\nimport { LambdaToOpenSearch } from '@aws-solutions-constructs/aws-lambda-opensearch';\nimport * as lambda from \"aws-cdk-lib/aws-lambda\";\n\nconst lambdaProps: lambda.FunctionProps = {\n code: lambda.Code.fromAsset(`lambda`),\n runtime: lambda.Runtime.NODEJS_20_X,\n handler: 'index.handler'\n};\n\nnew LambdaToOpenSearch(this, 'sample', {\n lambdaFunctionProps: lambdaProps,\n openSearchDomainName: 'testdomain',\n // TODO: Ensure the Cognito domain name is globally unique\n cognitoDomainName: 'globallyuniquedomain' + Aws.ACCOUNT_ID\n});\n```\n\nPython\n```python\nfrom aws_solutions_constructs.aws_lambda_opensearch import LambdaToOpenSearch\nfrom aws_cdk import (\n aws_lambda as _lambda,\n Aws,\n Stack\n)\nfrom constructs import Construct\n\nlambda_props = _lambda.FunctionProps(\n code=_lambda.Code.from_asset('lambda'),\n runtime=_lambda.Runtime.PYTHON_3_11,\n handler='index.handler'\n)\n\nLambdaToOpenSearch(self, 'sample',\n lambda_function_props=lambda_props,\n open_search_domain_name='testdomain',\n # TODO: Ensure the Cognito domain name is globally unique\n cognito_domain_name='globallyuniquedomain' + Aws.ACCOUNT_ID\n )\n```\n\nJava\n``` java\nimport software.constructs.Construct;\n\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\nimport software.amazon.awscdk.Aws;\nimport software.amazon.awscdk.services.lambda.*;\nimport software.amazon.awscdk.services.lambda.Runtime;\nimport software.amazon.awsconstructs.services.lambdaopensearch.*;\n\nnew LambdaToOpenSearch(this, \"sample\",\n new LambdaToOpenSearchProps.Builder()\n .lambdaFunctionProps(new FunctionProps.Builder()\n .runtime(Runtime.NODEJS_20_X)\n .code(Code.fromAsset(\"lambda\"))\n .handler(\"index.handler\")\n .build())\n .openSearchDomainName(\"testdomain\")\n // TODO: Ensure the Cognito domain name is globally unique\n .cognitoDomainName(\"globallyuniquedomain\" + Aws.ACCOUNT_ID)\n .build());\n```\n## Pattern Construct Props\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|\n|lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|\n|openSearchDomainProps?|[`opensearchservice.CfnDomainProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomainProps.html)|Optional user provided props to override the default props for the OpenSearch Service.|\n|openSearchDomainName|`string`|Domain name for the OpenSearch Service.|\n|cognitoDomainName?|`string`|Optional Amazon Cognito domain name. If omitted the Amazon Cognito domain will default to the OpenSearch Service domain name.|\n|createCloudWatchAlarms?|`boolean`|Whether to create the recommended CloudWatch alarms.|\n|domainEndpointEnvironmentVariableName?|`string`|Optional name for the OpenSearch domain endpoint environment variable set for the Lambda function. Default is `DOMAIN_ENDPOINT`.|\n|existingVpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|An optional, existing VPC into which this pattern should be deployed. When deployed in a VPC, the Lambda function will use ENIs in the VPC to access network resources. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|\n|vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html)|Optional user provided properties to override the default properties for the new VPC. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|\n|deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|\n\n## Pattern Properties\n\n| **Name** | **Type** | **Description** |\n|:-------------|:----------------|-----------------|\n|lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of `lambda.Function` created by the construct|\n|userPool|[`cognito.UserPool`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPool.html)|Returns an instance of `cognito.UserPool` created by the construct|\n|userPoolClient|[`cognito.UserPoolClient`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolClient.html)|Returns an instance of `cognito.UserPoolClient` created by the construct|\n|identityPool|[`cognito.CfnIdentityPool`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnIdentityPool.html)|Returns an instance of `cognito.CfnIdentityPool` created by the construct|\n|openSearchDomain|[`opensearchservice.CfnDomain`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.html)|Returns an instance of `opensearch.CfnDomain` created by the construct|\n|openSearchRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of `iam.Role` created by the construct for `opensearch.CfnDomain`|\n|cloudWatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns a list of `cloudwatch.Alarm` created by the construct|\n|vpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|Returns an interface on the VPC used by the pattern (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|\n\n## Lambda Function\n\nThis pattern requires a lambda function that can post data into the OpenSearch. A sample function is provided [here](https://github.com/awslabs/aws-solutions-constructs/blob/master/source/patterns/%40aws-solutions-constructs/aws-lambda-opensearch/test/lambda/index.js).\n\n## Default settings\n\nOut of the box implementation of the Construct without any overrides will set the following defaults:\n\n### AWS Lambda Function\n* Configure limited privilege access IAM role for Lambda function\n* Enable reusing connections with Keep-Alive for Node.js Lambda function\n* Enable X-Ray Tracing\n* Set Environment Variables\n * (default) DOMAIN_ENDPOINT\n * AWS_NODEJS_CONNECTION_REUSE_ENABLED\n\n### Amazon Cognito\n* Set password policy for User Pools\n* Enforce the advanced security mode for User Pools\n\n### Amazon OpenSearch Service\n* Deploy best practices CloudWatch Alarms for the OpenSearch Service domain\n* Secure the OpenSearch Service dashboard access with Cognito User Pools\n* Enable server-side encryption for OpenSearch Service domain using AWS managed KMS Key\n* Enable node-to-node encryption for the OpenSearch Service domain\n* Configure the cluster for the OpenSearch Service domain\n\n## Architecture\n![Architecture Diagram](architecture.png)\n\n***\n&copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n"
3996
+ "markdown": "Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-opensearch/README.adoc)\n"
3997
3997
  },
3998
3998
  "repository": {
3999
3999
  "directory": "source/patterns/@aws-solutions-constructs/aws-lambda-opensearch",
@@ -4365,6 +4365,6 @@
4365
4365
  "symbolId": "lib/index:LambdaToOpenSearchProps"
4366
4366
  }
4367
4367
  },
4368
- "version": "2.85.2",
4369
- "fingerprint": "duxpQ21mMOrO9l39zXpPIXU5h0qKmrMDdDF/YH05mlw="
4368
+ "version": "2.85.4",
4369
+ "fingerprint": "pRYGGIr+DV0Y5XTwIxVYVy2wrUx7ETHyomE7tphJgzs="
4370
4370
  }
package/README.adoc ADDED
@@ -0,0 +1,268 @@
1
+ //!!NODE_ROOT <section>
2
+ //== aws-lambda-opensearch module
3
+
4
+ [.topic]
5
+ = aws-lambda-opensearch
6
+ :info_doctype: section
7
+ :info_title: aws-lambda-opensearch
8
+
9
+
10
+ image:https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge[Stability:Experimental]
11
+
12
+ ____
13
+ All classes are under active development and subject to non-backward
14
+ compatible changes or removal in any future version. These are not
15
+ subject to the https://semver.org/[Semantic Versioning] model. This
16
+ means that while you may use them, you may need to update your source
17
+ code when upgrading to a newer version of this package.
18
+ ____
19
+
20
+ [width="100%",cols="<50%,<50%",options="header",]
21
+ |===
22
+ |*Reference Documentation*:
23
+ |https://docs.aws.amazon.com/solutions/latest/constructs/
24
+ |===
25
+
26
+ [width="100%",cols="<46%,54%",options="header",]
27
+ |===
28
+ |*Language* |*Package*
29
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/python32.png[Python
30
+ Logo] Python
31
+ |`aws_solutions_constructs.aws_lambda_opensearch`
32
+
33
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png[Typescript
34
+ Logo] Typescript |`@aws-solutions-constructs/aws-lambda-opensearch`
35
+
36
+ |image:https://docs.aws.amazon.com/cdk/api/latest/img/java32.png[Java
37
+ Logo] Java |`software.amazon.awsconstructs.services.lambdaopensearch`
38
+ |===
39
+
40
+ == Overview
41
+
42
+ This AWS Solutions Construct implements an AWS Lambda function and
43
+ Amazon OpenSearch Service with the least privileged permissions.
44
+
45
+ Here is a minimal deployable pattern definition:
46
+
47
+ ====
48
+ [role="tablist"]
49
+ Typescript::
50
+ +
51
+ [source,typescript]
52
+ ----
53
+ import { Construct } from 'constructs';
54
+ import { Stack, StackProps, Aws } from 'aws-cdk-lib';
55
+ import { LambdaToOpenSearch } from '@aws-solutions-constructs/aws-lambda-opensearch';
56
+ import * as lambda from "aws-cdk-lib/aws-lambda";
57
+
58
+ const lambdaProps: lambda.FunctionProps = {
59
+ code: lambda.Code.fromAsset(`lambda`),
60
+ runtime: lambda.Runtime.NODEJS_20_X,
61
+ handler: 'index.handler'
62
+ };
63
+
64
+ new LambdaToOpenSearch(this, 'sample', {
65
+ lambdaFunctionProps: lambdaProps,
66
+ openSearchDomainName: 'testdomain',
67
+ // NOTE: Ensure the Cognito domain name is globally unique
68
+ cognitoDomainName: 'globallyuniquedomain' + Aws.ACCOUNT_ID
69
+ });
70
+ ----
71
+
72
+ Python::
73
+ +
74
+ [source,python]
75
+ ----
76
+ from aws_solutions_constructs.aws_lambda_opensearch import LambdaToOpenSearch
77
+ from aws_cdk import (
78
+ aws_lambda as _lambda,
79
+ Aws,
80
+ Stack
81
+ )
82
+ from constructs import Construct
83
+
84
+ lambda_props = _lambda.FunctionProps(
85
+ code=_lambda.Code.from_asset('lambda'),
86
+ runtime=_lambda.Runtime.PYTHON_3_11,
87
+ handler='index.handler'
88
+ )
89
+
90
+ LambdaToOpenSearch(self, 'sample',
91
+ lambda_function_props=lambda_props,
92
+ open_search_domain_name='testdomain',
93
+ # NOTE: Ensure the Cognito domain name is globally unique
94
+ cognito_domain_name='globallyuniquedomain' + Aws.ACCOUNT_ID
95
+ )
96
+ ----
97
+
98
+ Java::
99
+ +
100
+ [source,java]
101
+ ----
102
+ import software.constructs.Construct;
103
+
104
+ import software.amazon.awscdk.Stack;
105
+ import software.amazon.awscdk.StackProps;
106
+ import software.amazon.awscdk.Aws;
107
+ import software.amazon.awscdk.services.lambda.*;
108
+ import software.amazon.awscdk.services.lambda.Runtime;
109
+ import software.amazon.awsconstructs.services.lambdaopensearch.*;
110
+
111
+ new LambdaToOpenSearch(this, "sample",
112
+ new LambdaToOpenSearchProps.Builder()
113
+ .lambdaFunctionProps(new FunctionProps.Builder()
114
+ .runtime(Runtime.NODEJS_20_X)
115
+ .code(Code.fromAsset("lambda"))
116
+ .handler("index.handler")
117
+ .build())
118
+ .openSearchDomainName("testdomain")
119
+ // NOTE: Ensure the Cognito domain name is globally unique
120
+ .cognitoDomainName("globallyuniquedomain" + Aws.ACCOUNT_ID)
121
+ .build());
122
+ ----
123
+ ====
124
+
125
+ == Pattern Construct Props
126
+
127
+ [width="100%",cols="<30%,<35%,35%",options="header",]
128
+ |===
129
+ |*Name* |*Type* |*Description*
130
+ |existingLambdaObj?
131
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html[`lambda.Function`]
132
+ |Existing instance of Lambda Function object, providing both this and
133
+ `lambdaFunctionProps` will cause an error.
134
+
135
+ |lambdaFunctionProps?
136
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html[`lambda.FunctionProps`]
137
+ |User provided props to override the default props for the Lambda
138
+ function.
139
+
140
+ |openSearchDomainProps?
141
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomainProps.html[`opensearchservice.CfnDomainProps`]
142
+ |Optional user provided props to override the default props for the
143
+ OpenSearch Service.
144
+
145
+ |openSearchDomainName |`string` |Domain name for the OpenSearch Service.
146
+
147
+ |cognitoDomainName? |`string` |Optional Amazon Cognito domain name. If
148
+ omitted the Amazon Cognito domain will default to the OpenSearch Service
149
+ domain name.
150
+
151
+ |createCloudWatchAlarms? |`boolean` |Whether to create the recommended
152
+ CloudWatch alarms.
153
+
154
+ |domainEndpointEnvironmentVariableName? |`string` |Optional name for the
155
+ OpenSearch domain endpoint environment variable set for the Lambda
156
+ function. Default is `DOMAIN_ENDPOINT`.
157
+
158
+ |existingVpc?
159
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html[`ec2.IVpc`]
160
+ |An optional, existing VPC into which this pattern should be deployed.
161
+ When deployed in a VPC, the Lambda function will use ENIs in the VPC to
162
+ access network resources. If an existing VPC is provided, the
163
+ `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow
164
+ clients to supply VPCs that exist outside the stack using the
165
+ https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options[`ec2.Vpc.fromLookup()`]
166
+ method.
167
+
168
+ |vpcProps?
169
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html[`ec2.VpcProps`]
170
+ |Optional user provided properties to override the default properties
171
+ for the new VPC. `enableDnsHostnames`, `enableDnsSupport`, `natGateways`
172
+ and `subnetConfiguration` are set by the pattern, so any values for
173
+ those properties supplied here will be overridden. If `deployVpc` is not
174
+ `true` then this property will be ignored.
175
+
176
+ |deployVpc? |`boolean` |Whether to create a new VPC based on `vpcProps`
177
+ into which to deploy this pattern. Setting this to true will deploy the
178
+ minimal, most private VPC to run the pattern:
179
+ |===
180
+
181
+ == Pattern Properties
182
+
183
+ [width="100%",cols="<30%,<35%,35%",options="header",]
184
+ |===
185
+ |*Name* |*Type* |*Description*
186
+ |lambdaFunction
187
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html[`lambda.Function`]
188
+ |Returns an instance of `lambda.Function` created by the construct
189
+
190
+ |userPool
191
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPool.html[`cognito.UserPool`]
192
+ |Returns an instance of `cognito.UserPool` created by the construct
193
+
194
+ |userPoolClient
195
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolClient.html[`cognito.UserPoolClient`]
196
+ |Returns an instance of `cognito.UserPoolClient` created by the
197
+ construct
198
+
199
+ |identityPool
200
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnIdentityPool.html[`cognito.CfnIdentityPool`]
201
+ |Returns an instance of `cognito.CfnIdentityPool` created by the
202
+ construct
203
+
204
+ |openSearchDomain
205
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.html[`opensearchservice.CfnDomain`]
206
+ |Returns an instance of `opensearch.CfnDomain` created by the construct
207
+
208
+ |openSearchRole
209
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html[`iam.Role`]
210
+ |Returns an instance of `iam.Role` created by the construct for
211
+ `opensearch.CfnDomain`
212
+
213
+ |cloudWatchAlarms?
214
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html[`cloudwatch.Alarm[\]`]
215
+ |Returns a list of `cloudwatch.Alarm` created by the construct
216
+
217
+ |vpc?
218
+ |https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html[`ec2.IVpc`]
219
+ |Returns an interface on the VPC used by the pattern (if any). This may
220
+ be a VPC created by the pattern or the VPC supplied to the pattern
221
+ constructor.
222
+ |===
223
+
224
+ == Lambda Function
225
+
226
+ This pattern requires a lambda function that can post data into the
227
+ OpenSearch. A sample function is provided
228
+ https://github.com/awslabs/aws-solutions-constructs/blob/master/source/patterns/%40aws-solutions-constructs/aws-lambda-opensearch/test/lambda/index.js[here].
229
+
230
+ == Default settings
231
+
232
+ Out of the box implementation of the Construct without any overrides
233
+ will set the following defaults:
234
+
235
+ === AWS Lambda Function
236
+
237
+ * Configure limited privilege access IAM role for Lambda function
238
+ * Enable reusing connections with Keep-Alive for Node.js Lambda function
239
+ * Enable X-Ray Tracing
240
+ * Set Environment Variables
241
+ ** (default) DOMAIN_ENDPOINT
242
+ ** AWS_NODEJS_CONNECTION_REUSE_ENABLED
243
+
244
+ === Amazon Cognito
245
+
246
+ * Set password policy for User Pools
247
+ * Enforce the advanced security mode for User Pools
248
+
249
+ === Amazon OpenSearch Service
250
+
251
+ * Deploy best practices CloudWatch Alarms for the OpenSearch Service
252
+ domain
253
+ * Secure the OpenSearch Service dashboard access with Cognito User Pools
254
+ * Enable server-side encryption for OpenSearch Service domain using AWS
255
+ managed KMS Key
256
+ * Enable node-to-node encryption for the OpenSearch Service domain
257
+ * Configure the cluster for the OpenSearch Service domain
258
+
259
+ == Architecture
260
+
261
+
262
+ image::aws-lambda-opensearch.png["Diagram showing the Lambda function, OpenSearch domain, Cognito domain, CloudWatch log group and IAM role created by the construct",scaledwidth=100%]
263
+
264
+ // github block
265
+
266
+ '''''
267
+
268
+ © Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
package/README.md CHANGED
@@ -1,157 +1 @@
1
- # aws-lambda-opensearch module
2
- <!--BEGIN STABILITY BANNER-->
3
-
4
- ---
5
-
6
- ![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)
7
-
8
- > All classes are under active development and subject to non-backward compatible changes or removal in any
9
- > future version. These are not subject to the [Semantic Versioning](https://semver.org/) model.
10
- > This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
11
-
12
- ---
13
- <!--END STABILITY BANNER-->
14
-
15
- | **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
16
- |:-------------|:-------------|
17
- <div style="height:8px"></div>
18
-
19
- | **Language** | **Package** |
20
- |:-------------|-----------------|
21
- |![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_lambda_opensearch`|
22
- |![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-lambda-opensearch`|
23
- |![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.lambdaopensearch`|
24
-
25
- ## Overview
26
- This AWS Solutions Construct implements an AWS Lambda function and Amazon OpenSearch Service with the least privileged permissions.
27
-
28
- Here is a minimal deployable pattern definition:
29
-
30
- Typescript
31
- ``` typescript
32
- import { Construct } from 'constructs';
33
- import { Stack, StackProps, Aws } from 'aws-cdk-lib';
34
- import { LambdaToOpenSearch } from '@aws-solutions-constructs/aws-lambda-opensearch';
35
- import * as lambda from "aws-cdk-lib/aws-lambda";
36
-
37
- const lambdaProps: lambda.FunctionProps = {
38
- code: lambda.Code.fromAsset(`lambda`),
39
- runtime: lambda.Runtime.NODEJS_20_X,
40
- handler: 'index.handler'
41
- };
42
-
43
- new LambdaToOpenSearch(this, 'sample', {
44
- lambdaFunctionProps: lambdaProps,
45
- openSearchDomainName: 'testdomain',
46
- // TODO: Ensure the Cognito domain name is globally unique
47
- cognitoDomainName: 'globallyuniquedomain' + Aws.ACCOUNT_ID
48
- });
49
- ```
50
-
51
- Python
52
- ```python
53
- from aws_solutions_constructs.aws_lambda_opensearch import LambdaToOpenSearch
54
- from aws_cdk import (
55
- aws_lambda as _lambda,
56
- Aws,
57
- Stack
58
- )
59
- from constructs import Construct
60
-
61
- lambda_props = _lambda.FunctionProps(
62
- code=_lambda.Code.from_asset('lambda'),
63
- runtime=_lambda.Runtime.PYTHON_3_11,
64
- handler='index.handler'
65
- )
66
-
67
- LambdaToOpenSearch(self, 'sample',
68
- lambda_function_props=lambda_props,
69
- open_search_domain_name='testdomain',
70
- # TODO: Ensure the Cognito domain name is globally unique
71
- cognito_domain_name='globallyuniquedomain' + Aws.ACCOUNT_ID
72
- )
73
- ```
74
-
75
- Java
76
- ``` java
77
- import software.constructs.Construct;
78
-
79
- import software.amazon.awscdk.Stack;
80
- import software.amazon.awscdk.StackProps;
81
- import software.amazon.awscdk.Aws;
82
- import software.amazon.awscdk.services.lambda.*;
83
- import software.amazon.awscdk.services.lambda.Runtime;
84
- import software.amazon.awsconstructs.services.lambdaopensearch.*;
85
-
86
- new LambdaToOpenSearch(this, "sample",
87
- new LambdaToOpenSearchProps.Builder()
88
- .lambdaFunctionProps(new FunctionProps.Builder()
89
- .runtime(Runtime.NODEJS_20_X)
90
- .code(Code.fromAsset("lambda"))
91
- .handler("index.handler")
92
- .build())
93
- .openSearchDomainName("testdomain")
94
- // TODO: Ensure the Cognito domain name is globally unique
95
- .cognitoDomainName("globallyuniquedomain" + Aws.ACCOUNT_ID)
96
- .build());
97
- ```
98
- ## Pattern Construct Props
99
-
100
- | **Name** | **Type** | **Description** |
101
- |:-------------|:----------------|-----------------|
102
- |existingLambdaObj?|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Existing instance of Lambda Function object, providing both this and `lambdaFunctionProps` will cause an error.|
103
- |lambdaFunctionProps?|[`lambda.FunctionProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.FunctionProps.html)|User provided props to override the default props for the Lambda function.|
104
- |openSearchDomainProps?|[`opensearchservice.CfnDomainProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomainProps.html)|Optional user provided props to override the default props for the OpenSearch Service.|
105
- |openSearchDomainName|`string`|Domain name for the OpenSearch Service.|
106
- |cognitoDomainName?|`string`|Optional Amazon Cognito domain name. If omitted the Amazon Cognito domain will default to the OpenSearch Service domain name.|
107
- |createCloudWatchAlarms?|`boolean`|Whether to create the recommended CloudWatch alarms.|
108
- |domainEndpointEnvironmentVariableName?|`string`|Optional name for the OpenSearch domain endpoint environment variable set for the Lambda function. Default is `DOMAIN_ENDPOINT`.|
109
- |existingVpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|An optional, existing VPC into which this pattern should be deployed. When deployed in a VPC, the Lambda function will use ENIs in the VPC to access network resources. If an existing VPC is provided, the `deployVpc` property cannot be `true`. This uses `ec2.IVpc` to allow clients to supply VPCs that exist outside the stack using the [`ec2.Vpc.fromLookup()`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Vpc.html#static-fromwbrlookupscope-id-options) method.|
110
- |vpcProps?|[`ec2.VpcProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.VpcProps.html)|Optional user provided properties to override the default properties for the new VPC. `enableDnsHostnames`, `enableDnsSupport`, `natGateways` and `subnetConfiguration` are set by the pattern, so any values for those properties supplied here will be overridden. If `deployVpc` is not `true` then this property will be ignored.|
111
- |deployVpc?|`boolean`|Whether to create a new VPC based on `vpcProps` into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:<ul><li> One isolated subnet in each Availability Zone used by the CDK program</li><li>`enableDnsHostnames` and `enableDnsSupport` will both be set to true</li></ul>If this property is `true` then `existingVpc` cannot be specified. Defaults to `false`.|
112
-
113
- ## Pattern Properties
114
-
115
- | **Name** | **Type** | **Description** |
116
- |:-------------|:----------------|-----------------|
117
- |lambdaFunction|[`lambda.Function`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html)|Returns an instance of `lambda.Function` created by the construct|
118
- |userPool|[`cognito.UserPool`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPool.html)|Returns an instance of `cognito.UserPool` created by the construct|
119
- |userPoolClient|[`cognito.UserPoolClient`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.UserPoolClient.html)|Returns an instance of `cognito.UserPoolClient` created by the construct|
120
- |identityPool|[`cognito.CfnIdentityPool`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cognito.CfnIdentityPool.html)|Returns an instance of `cognito.CfnIdentityPool` created by the construct|
121
- |openSearchDomain|[`opensearchservice.CfnDomain`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_opensearchservice.CfnDomain.html)|Returns an instance of `opensearch.CfnDomain` created by the construct|
122
- |openSearchRole|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of `iam.Role` created by the construct for `opensearch.CfnDomain`|
123
- |cloudWatchAlarms?|[`cloudwatch.Alarm[]`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_cloudwatch.Alarm.html)|Returns a list of `cloudwatch.Alarm` created by the construct|
124
- |vpc?|[`ec2.IVpc`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html)|Returns an interface on the VPC used by the pattern (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.|
125
-
126
- ## Lambda Function
127
-
128
- This pattern requires a lambda function that can post data into the OpenSearch. A sample function is provided [here](https://github.com/awslabs/aws-solutions-constructs/blob/master/source/patterns/%40aws-solutions-constructs/aws-lambda-opensearch/test/lambda/index.js).
129
-
130
- ## Default settings
131
-
132
- Out of the box implementation of the Construct without any overrides will set the following defaults:
133
-
134
- ### AWS Lambda Function
135
- * Configure limited privilege access IAM role for Lambda function
136
- * Enable reusing connections with Keep-Alive for Node.js Lambda function
137
- * Enable X-Ray Tracing
138
- * Set Environment Variables
139
- * (default) DOMAIN_ENDPOINT
140
- * AWS_NODEJS_CONNECTION_REUSE_ENABLED
141
-
142
- ### Amazon Cognito
143
- * Set password policy for User Pools
144
- * Enforce the advanced security mode for User Pools
145
-
146
- ### Amazon OpenSearch Service
147
- * Deploy best practices CloudWatch Alarms for the OpenSearch Service domain
148
- * Secure the OpenSearch Service dashboard access with Cognito User Pools
149
- * Enable server-side encryption for OpenSearch Service domain using AWS managed KMS Key
150
- * Enable node-to-node encryption for the OpenSearch Service domain
151
- * Configure the cluster for the OpenSearch Service domain
152
-
153
- ## Architecture
154
- ![Architecture Diagram](architecture.png)
155
-
156
- ***
157
- &copy; Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
1
+ Documentation for this pattern can be found [here](https://github.com/awslabs/aws-solutions-constructs/blob/main/source/patterns/%40aws-solutions-constructs/aws-lambda-opensearch/README.adoc)
package/lib/index.js CHANGED
@@ -73,5 +73,5 @@ class LambdaToOpenSearch extends constructs_1.Construct {
73
73
  }
74
74
  exports.LambdaToOpenSearch = LambdaToOpenSearch;
75
75
  _a = JSII_RTTI_SYMBOL_1;
76
- LambdaToOpenSearch[_a] = { fqn: "@aws-solutions-constructs/aws-lambda-opensearch.LambdaToOpenSearch", version: "2.85.2" };
76
+ LambdaToOpenSearch[_a] = { fqn: "@aws-solutions-constructs/aws-lambda-opensearch.LambdaToOpenSearch", version: "2.85.4" };
77
77
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQW1CQSwyREFBMkQ7QUFDM0Qsd0ZBQXdGO0FBQ3hGLDJDQUF1QztBQW9FdkMsTUFBYSxrQkFBbUIsU0FBUSxzQkFBUztJQVUvQzs7Ozs7OztPQU9HO0lBQ0gsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxLQUE4QjtRQUN0RSxLQUFLLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDO1FBQ2pCLFFBQVEsQ0FBQyxhQUFhLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDOUIsUUFBUSxDQUFDLGdCQUFnQixDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ2pDLFFBQVEsQ0FBQyxvQkFBb0IsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUVyQyxJQUFJLEtBQUssQ0FBQyxRQUFRLElBQUksQ0FBQyxLQUFLLENBQUMsU0FBUyxFQUFFLENBQUM7WUFDdkMsTUFBTSxJQUFJLEtBQUssQ0FBQyx1REFBdUQsQ0FBQyxDQUFDO1FBQzNFLENBQUM7UUFFRCxJQUFJLEtBQUssQ0FBQyxtQkFBbUIsRUFBRSxHQUFHLElBQUksS0FBSyxDQUFDLG1CQUFtQixFQUFFLFVBQVUsRUFBRSxDQUFDO1lBQzVFLE1BQU0sSUFBSSxLQUFLLENBQUMseUVBQXlFLENBQUMsQ0FBQztRQUM3RixDQUFDO1FBRUQsSUFBSSxLQUFLLENBQUMsU0FBUyxJQUFJLEtBQUssQ0FBQyxXQUFXLEVBQUUsQ0FBQzt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01BSU5fRU5EUE9JTlQnO1xuICAgIHRoaXMubGFtYmRhRnVuY3Rpb24uYWRkRW52aXJvbm1lbnQoZG9tYWluRW5kcG9pbnRFbnZpcm9ubWVudFZhcmlhYmxlTmFtZSwgdGhpcy5vcGVuU2VhcmNoRG9tYWluLmF0dHJEb21haW5FbmRwb2ludCk7XG4gIH1cbn0iXX0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-solutions-constructs/aws-lambda-opensearch",
3
- "version": "2.85.2",
3
+ "version": "2.85.4",
4
4
  "description": "CDK Constructs for AWS Lambda to Amazon OpenSearch Service",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -22,12 +22,13 @@
22
22
  "test": "jest --coverage",
23
23
  "clean": "tsc -b --clean",
24
24
  "watch": "tsc -b -w",
25
+ "asciidoc": "asciidoctor --failure-level WARNING -o /dev/null README.adoc",
25
26
  "integ": "integ-runner --update-on-failed",
26
27
  "integ-no-clean": "integ-runner --update-on-failed --no-clean",
27
28
  "integ-assert": "integ-runner",
28
29
  "jsii": "jsii",
29
30
  "jsii-pacmak": "jsii-pacmak",
30
- "build+lint+test": "npm run jsii && npm run lint && npm test && npm run integ-assert",
31
+ "build+lint+test": "npm run jsii && npm run lint && npm run asciidoc && npm test && npm run integ-assert",
31
32
  "blt": "npm run build+lint+test",
32
33
  "snapshot-update": "npm run jsii && npm test -- -u && npm run integ-assert"
33
34
  },
@@ -54,7 +55,7 @@
54
55
  }
55
56
  },
56
57
  "dependencies": {
57
- "@aws-solutions-constructs/core": "2.85.2",
58
+ "@aws-solutions-constructs/core": "2.85.4",
58
59
  "constructs": "^10.0.0"
59
60
  },
60
61
  "devDependencies": {
@@ -78,7 +79,7 @@
78
79
  ]
79
80
  },
80
81
  "peerDependencies": {
81
- "@aws-solutions-constructs/core": "2.85.2",
82
+ "@aws-solutions-constructs/core": "2.85.4",
82
83
  "constructs": "^10.0.0",
83
84
  "aws-cdk-lib": "^2.193.0"
84
85
  },
File without changes