@aws-solutions-constructs/aws-lambda-opensearch 2.79.1 → 2.80.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 +4 -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 +6 -6
- package/test/integ.lamopn-cluster-config.js.snapshot/lamopnclusterconfigIntegDefaultTestDeployAssertD8012D1A.assets.json +1 -1
- package/test/integ.lamopn-cluster-config.js.snapshot/manifest.json +547 -2
- package/test/integ.lamopn-cluster-config.js.snapshot/tree.json +461 -87
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/{asset.abbc4eca9e7ddabc31da3ce83159e6eee8e72e2c358ab8af0711044514c41290 → 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 +6 -6
- 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 +523 -2
- package/test/integ.lamopn-disabled-zone-awareness.js.snapshot/tree.json +437 -82
- 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-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
|
@@ -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":"39.0.0"}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "39.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
|
+
"8efd25c2682c81e80359b66ceb0d9f35512221147bcfaf734344c97155fc89d8": {
|
|
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": "8efd25c2682c81e80359b66ceb0d9f35512221147bcfaf734344c97155fc89d8.json",
|
|
39
39
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
"S3Bucket": {
|
|
139
139
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
140
140
|
},
|
|
141
|
-
"S3Key": "
|
|
141
|
+
"S3Key": "36fdcee3b182bca7e3283fbd947213d1e59968159f93aec9fd62d15935c721b0.zip"
|
|
142
142
|
},
|
|
143
143
|
"Environment": {
|
|
144
144
|
"Variables": {
|
|
@@ -1178,7 +1178,7 @@
|
|
|
1178
1178
|
"S3Bucket": {
|
|
1179
1179
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
1180
1180
|
},
|
|
1181
|
-
"S3Key": "
|
|
1181
|
+
"S3Key": "7fa1e366ee8a9ded01fc355f704cff92bfd179574e6f9cfee800a3541df1b200.zip"
|
|
1182
1182
|
},
|
|
1183
1183
|
"Timeout": 900,
|
|
1184
1184
|
"MemorySize": 128,
|
|
@@ -1271,10 +1271,10 @@
|
|
|
1271
1271
|
"value": "nodejs20.x"
|
|
1272
1272
|
},
|
|
1273
1273
|
"cn-north-1": {
|
|
1274
|
-
"value": "
|
|
1274
|
+
"value": "nodejs20.x"
|
|
1275
1275
|
},
|
|
1276
1276
|
"cn-northwest-1": {
|
|
1277
|
-
"value": "
|
|
1277
|
+
"value": "nodejs20.x"
|
|
1278
1278
|
},
|
|
1279
1279
|
"eu-central-1": {
|
|
1280
1280
|
"value": "nodejs20.x"
|
|
@@ -1325,10 +1325,10 @@
|
|
|
1325
1325
|
"value": "nodejs20.x"
|
|
1326
1326
|
},
|
|
1327
1327
|
"us-gov-east-1": {
|
|
1328
|
-
"value": "
|
|
1328
|
+
"value": "nodejs20.x"
|
|
1329
1329
|
},
|
|
1330
1330
|
"us-gov-west-1": {
|
|
1331
|
-
"value": "
|
|
1331
|
+
"value": "nodejs20.x"
|
|
1332
1332
|
},
|
|
1333
1333
|
"us-iso-east-1": {
|
|
1334
1334
|
"value": "nodejs18.x"
|