@aws-solutions-constructs/aws-lambda-opensearch 2.79.1 → 2.81.0
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 +43 -43
- package/lib/index.js +1 -1
- package/package.json +6 -6
- package/test/integ.lamopn-cluster-config.js.snapshot/{asset.abbc4eca9e7ddabc31da3ce83159e6eee8e72e2c358ab8af0711044514c41290 → asset.36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0}/index.js +13 -0
- package/test/integ.lamopn-cluster-config.js.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
- package/test/integ.lamopn-cluster-config.js.snapshot/cdk.out +1 -1
- package/test/integ.lamopn-cluster-config.js.snapshot/integ.json +1 -1
- package/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.assets.json +9 -9
- package/test/integ.lamopn-cluster-config.js.snapshot/lamopn-cluster-config.template.json +35 -9
- package/test/integ.lamopn-cluster-config.js.snapshot/lamopnclusterconfigIntegDefaultTestDeployAssertD8012D1A.assets.json +1 -1
- package/test/integ.lamopn-cluster-config.js.snapshot/manifest.json +587 -3
- package/test/integ.lamopn-cluster-config.js.snapshot/tree.json +1 -1803
- package/test/{integ.lamopn-domain-arguments.js.snapshot/asset.abbc4eca9e7ddabc31da3ce83159e6eee8e72e2c358ab8af0711044514c41290 → integ.lamopn-disabled-zone-awareness.js.snapshot/asset.36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0}/index.js +13 -0
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/cdk.out +1 -1
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/integ.json +1 -1
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.assets.json +9 -9
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopn-disabled-zone-awareness.template.json +34 -9
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/lamopndisabledzoneawarenessIntegDefaultTestDeployAssert7E083B68.assets.json +1 -1
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/manifest.json +563 -3
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/tree.json +1 -1695
- package/test/{integ.lamopn-existing-vpc.js.snapshot/asset.abbc4eca9e7ddabc31da3ce83159e6eee8e72e2c358ab8af0711044514c41290 → integ.lamopn-domain-arguments.js.snapshot/asset.36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0}/index.js +13 -0
- package/test/integ.lamopn-domain-arguments.js.snapshot/cdk.out +1 -1
- package/test/integ.lamopn-domain-arguments.js.snapshot/integ.json +1 -1
- package/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.assets.json +6 -6
- package/test/integ.lamopn-domain-arguments.js.snapshot/lamopn-domain-arguments.template.json +25 -36
- package/test/integ.lamopn-domain-arguments.js.snapshot/lamopndomainargumentsIntegDefaultTestDeployAssert47534E1E.assets.json +1 -1
- package/test/integ.lamopn-domain-arguments.js.snapshot/manifest.json +338 -6
- package/test/integ.lamopn-domain-arguments.js.snapshot/tree.json +1 -1256
- package/test/{integ.lamopn-disabled-zone-awareness.js.snapshot/asset.abbc4eca9e7ddabc31da3ce83159e6eee8e72e2c358ab8af0711044514c41290 → integ.lamopn-existing-vpc.js.snapshot/asset.36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0}/index.js +13 -0
- package/test/integ.lamopn-existing-vpc.js.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
- package/test/integ.lamopn-existing-vpc.js.snapshot/cdk.out +1 -1
- package/test/integ.lamopn-existing-vpc.js.snapshot/integ.json +1 -1
- package/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.assets.json +9 -9
- package/test/integ.lamopn-existing-vpc.js.snapshot/lamopn-existing-vpc.template.json +33 -5
- package/test/integ.lamopn-existing-vpc.js.snapshot/lamopnexistingvpcIntegDefaultTestDeployAssert4A7EE058.assets.json +1 -1
- package/test/integ.lamopn-existing-vpc.js.snapshot/manifest.json +659 -3
- package/test/integ.lamopn-existing-vpc.js.snapshot/tree.json +1 -2207
- package/test/integ.lamopn-no-arguments.js.snapshot/asset.36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0/index.js +73 -0
- package/test/integ.lamopn-no-arguments.js.snapshot/cdk.out +1 -1
- package/test/integ.lamopn-no-arguments.js.snapshot/integ.json +1 -1
- package/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.assets.json +6 -6
- package/test/integ.lamopn-no-arguments.js.snapshot/lamopn-no-arguments.template.json +25 -36
- package/test/integ.lamopn-no-arguments.js.snapshot/lamopnnoargumentsIntegDefaultTestDeployAssert4290A592.assets.json +1 -1
- package/test/integ.lamopn-no-arguments.js.snapshot/manifest.json +338 -6
- package/test/integ.lamopn-no-arguments.js.snapshot/tree.json +1 -1256
- package/test/integ.lamopn-vpc-props.js.snapshot/asset.36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0/index.js +73 -0
- package/test/integ.lamopn-vpc-props.js.snapshot/asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200/__entrypoint__.js +1 -0
- package/test/integ.lamopn-vpc-props.js.snapshot/cdk.out +1 -1
- package/test/integ.lamopn-vpc-props.js.snapshot/integ.json +1 -1
- package/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.assets.json +9 -9
- package/test/integ.lamopn-vpc-props.js.snapshot/lamopn-vpc-props.template.json +31 -5
- package/test/integ.lamopn-vpc-props.js.snapshot/lamopnvpcpropsIntegDefaultTestDeployAssertC7FD49B0.assets.json +1 -1
- package/test/integ.lamopn-vpc-props.js.snapshot/manifest.json +587 -3
- package/test/integ.lamopn-vpc-props.js.snapshot/tree.json +1 -1795
- package/test/integ.lamopn-cluster-config.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
- package/test/integ.lamopn-existing-vpc.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
- package/test/integ.lamopn-no-arguments.js.snapshot/asset.abbc4eca9e7ddabc31da3ce83159e6eee8e72e2c358ab8af0711044514c41290/index.js +0 -60
- package/test/integ.lamopn-vpc-props.js.snapshot/asset.abbc4eca9e7ddabc31da3ce83159e6eee8e72e2c358ab8af0711044514c41290/index.js +0 -60
- package/test/integ.lamopn-vpc-props.js.snapshot/asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a/__entrypoint__.js +0 -1
- /package/test/integ.lamopn-cluster-config.js.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
- /package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
- /package/test/integ.lamopn-existing-vpc.js.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
- /package/test/integ.lamopn-vpc-props.js.snapshot/{asset.ee7de53d64cc9d6248fa6aa550f92358f6c907b5efd6f3298aeab1b5e7ea358a → asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200}/index.js +0 -0
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
5
|
+
* with the License. A copy of the License is located at
|
|
6
|
+
*
|
|
7
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
10
|
+
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
11
|
+
* and limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
|
|
1
14
|
var AWS = require('aws-sdk');
|
|
2
15
|
var path = require('path');
|
|
3
16
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.external=void 0,exports.handler=handler,exports.withRetries=withRetries;const https=require("https"),url=require("url");exports.external={sendHttpRequest:defaultSendHttpRequest,log:defaultLog,includeStackTraces:!0,userHandlerIndex:"./index"};const CREATE_FAILED_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::CREATE_FAILED",MISSING_PHYSICAL_ID_MARKER="AWSCDK::CustomResourceProviderFramework::MISSING_PHYSICAL_ID";async function handler(event,context){const sanitizedEvent={...event,ResponseURL:"..."};if(exports.external.log(JSON.stringify(sanitizedEvent,void 0,2)),event.RequestType==="Delete"&&event.PhysicalResourceId===CREATE_FAILED_PHYSICAL_ID_MARKER){exports.external.log("ignoring DELETE event caused by a failed CREATE event"),await submitResponse("SUCCESS",event);return}try{const userHandler=require(exports.external.userHandlerIndex).handler,result=await userHandler(sanitizedEvent,context),responseEvent=renderResponse(event,result);await submitResponse("SUCCESS",responseEvent)}catch(e){const resp={...event,Reason:exports.external.includeStackTraces?e.stack:e.message};resp.PhysicalResourceId||(event.RequestType==="Create"?(exports.external.log("CREATE failed, responding with a marker physical resource id so that the subsequent DELETE will be ignored"),resp.PhysicalResourceId=CREATE_FAILED_PHYSICAL_ID_MARKER):exports.external.log(`ERROR: Malformed event. "PhysicalResourceId" is required: ${JSON.stringify(event)}`)),await submitResponse("FAILED",resp)}}function renderResponse(cfnRequest,handlerResponse={}){const physicalResourceId=handlerResponse.PhysicalResourceId??cfnRequest.PhysicalResourceId??cfnRequest.RequestId;if(cfnRequest.RequestType==="Delete"&&physicalResourceId!==cfnRequest.PhysicalResourceId)throw new Error(`DELETE: cannot change the physical resource ID from "${cfnRequest.PhysicalResourceId}" to "${handlerResponse.PhysicalResourceId}" during deletion`);return{...cfnRequest,...handlerResponse,PhysicalResourceId:physicalResourceId}}async function submitResponse(status,event){const json={Status:status,Reason:event.Reason??status,StackId:event.StackId,RequestId:event.RequestId,PhysicalResourceId:event.PhysicalResourceId||MISSING_PHYSICAL_ID_MARKER,LogicalResourceId:event.LogicalResourceId,NoEcho:event.NoEcho,Data:event.Data},parsedUrl=url.parse(event.ResponseURL),loggingSafeUrl=`${parsedUrl.protocol}//${parsedUrl.hostname}/${parsedUrl.pathname}?***`;exports.external.log("submit response to cloudformation",loggingSafeUrl,json);const responseBody=JSON.stringify(json),req={hostname:parsedUrl.hostname,path:parsedUrl.path,method:"PUT",headers:{"content-type":"","content-length":Buffer.byteLength(responseBody,"utf8")}};await withRetries({attempts:5,sleep:1e3},exports.external.sendHttpRequest)(req,responseBody)}async function defaultSendHttpRequest(options,requestBody){return new Promise((resolve,reject)=>{try{const request=https.request(options,response=>{response.resume(),!response.statusCode||response.statusCode>=400?reject(new Error(`Unsuccessful HTTP response: ${response.statusCode}`)):resolve()});request.on("error",reject),request.write(requestBody),request.end()}catch(e){reject(e)}})}function defaultLog(fmt,...params){console.log(fmt,...params)}function withRetries(options,fn){return async(...xs)=>{let attempts=options.attempts,ms=options.sleep;for(;;)try{return await fn(...xs)}catch(e){if(attempts--<=0)throw e;await sleep(Math.floor(Math.random()*ms)),ms*=2}}}async function sleep(ms){return new Promise(ok=>setTimeout(ok,ms))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"40.0.0"}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "40.0.0",
|
|
3
3
|
"files": {
|
|
4
|
-
"
|
|
4
|
+
"7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200": {
|
|
5
5
|
"source": {
|
|
6
|
-
"path": "asset.
|
|
6
|
+
"path": "asset.7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200",
|
|
7
7
|
"packaging": "zip"
|
|
8
8
|
},
|
|
9
9
|
"destinations": {
|
|
10
10
|
"current_account-current_region": {
|
|
11
11
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
12
|
-
"objectKey": "
|
|
12
|
+
"objectKey": "7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200.zip",
|
|
13
13
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
|
-
"
|
|
17
|
+
"36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0": {
|
|
18
18
|
"source": {
|
|
19
|
-
"path": "asset.
|
|
19
|
+
"path": "asset.36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0",
|
|
20
20
|
"packaging": "zip"
|
|
21
21
|
},
|
|
22
22
|
"destinations": {
|
|
23
23
|
"current_account-current_region": {
|
|
24
24
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
25
|
-
"objectKey": "
|
|
25
|
+
"objectKey": "36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0.zip",
|
|
26
26
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
"
|
|
30
|
+
"a0f48ddcdcd2632e89be85921a38f0a1da3d33738b35e5d7649b56897dc775bb": {
|
|
31
31
|
"source": {
|
|
32
32
|
"path": "lamopn-disabled-zone-awareness.template.json",
|
|
33
33
|
"packaging": "file"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"destinations": {
|
|
36
36
|
"current_account-current_region": {
|
|
37
37
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
38
|
-
"objectKey": "
|
|
38
|
+
"objectKey": "a0f48ddcdcd2632e89be85921a38f0a1da3d33738b35e5d7649b56897dc775bb.json",
|
|
39
39
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -73,9 +73,7 @@
|
|
|
73
73
|
"ec2:CreateNetworkInterface",
|
|
74
74
|
"ec2:DeleteNetworkInterface",
|
|
75
75
|
"ec2:DescribeNetworkInterfaces",
|
|
76
|
-
"ec2:UnassignPrivateIpAddresses"
|
|
77
|
-
"xray:PutTelemetryRecords",
|
|
78
|
-
"xray:PutTraceSegments"
|
|
76
|
+
"ec2:UnassignPrivateIpAddresses"
|
|
79
77
|
],
|
|
80
78
|
"Effect": "Allow",
|
|
81
79
|
"Resource": "*"
|
|
@@ -138,7 +136,7 @@
|
|
|
138
136
|
"S3Bucket": {
|
|
139
137
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
140
138
|
},
|
|
141
|
-
"S3Key": "
|
|
139
|
+
"S3Key": "36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0.zip"
|
|
142
140
|
},
|
|
143
141
|
"Environment": {
|
|
144
142
|
"Variables": {
|
|
@@ -202,6 +200,33 @@
|
|
|
202
200
|
}
|
|
203
201
|
}
|
|
204
202
|
},
|
|
203
|
+
"testlambdaopensearchLambdaFunctioninlinePolicyAddedToExecutionRole09B870594": {
|
|
204
|
+
"Type": "AWS::IAM::Policy",
|
|
205
|
+
"Properties": {
|
|
206
|
+
"PolicyDocument": {
|
|
207
|
+
"Statement": [
|
|
208
|
+
{
|
|
209
|
+
"Action": [
|
|
210
|
+
"xray:PutTelemetryRecords",
|
|
211
|
+
"xray:PutTraceSegments"
|
|
212
|
+
],
|
|
213
|
+
"Effect": "Allow",
|
|
214
|
+
"Resource": "*"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"Version": "2012-10-17"
|
|
218
|
+
},
|
|
219
|
+
"PolicyName": "testlambdaopensearchLambdaFunctioninlinePolicyAddedToExecutionRole09B870594",
|
|
220
|
+
"Roles": [
|
|
221
|
+
{
|
|
222
|
+
"Ref": "testlambdaopensearchLambdaFunctionServiceRole4722AB8A"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"DependsOn": [
|
|
227
|
+
"VpcisolatedSubnet1RouteTableAssociationD259E31A"
|
|
228
|
+
]
|
|
229
|
+
},
|
|
205
230
|
"testlambdaopensearchCognitoUserPoolA09096F9": {
|
|
206
231
|
"Type": "AWS::Cognito::UserPool",
|
|
207
232
|
"Properties": {
|
|
@@ -1178,7 +1203,7 @@
|
|
|
1178
1203
|
"S3Bucket": {
|
|
1179
1204
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
1180
1205
|
},
|
|
1181
|
-
"S3Key": "
|
|
1206
|
+
"S3Key": "7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200.zip"
|
|
1182
1207
|
},
|
|
1183
1208
|
"Timeout": 900,
|
|
1184
1209
|
"MemorySize": 128,
|
|
@@ -1271,10 +1296,10 @@
|
|
|
1271
1296
|
"value": "nodejs20.x"
|
|
1272
1297
|
},
|
|
1273
1298
|
"cn-north-1": {
|
|
1274
|
-
"value": "
|
|
1299
|
+
"value": "nodejs20.x"
|
|
1275
1300
|
},
|
|
1276
1301
|
"cn-northwest-1": {
|
|
1277
|
-
"value": "
|
|
1302
|
+
"value": "nodejs20.x"
|
|
1278
1303
|
},
|
|
1279
1304
|
"eu-central-1": {
|
|
1280
1305
|
"value": "nodejs20.x"
|
|
@@ -1325,10 +1350,10 @@
|
|
|
1325
1350
|
"value": "nodejs20.x"
|
|
1326
1351
|
},
|
|
1327
1352
|
"us-gov-east-1": {
|
|
1328
|
-
"value": "
|
|
1353
|
+
"value": "nodejs20.x"
|
|
1329
1354
|
},
|
|
1330
1355
|
"us-gov-west-1": {
|
|
1331
|
-
"value": "
|
|
1356
|
+
"value": "nodejs20.x"
|
|
1332
1357
|
},
|
|
1333
1358
|
"us-iso-east-1": {
|
|
1334
1359
|
"value": "nodejs18.x"
|