@aws-solutions-constructs/aws-cloudfront-apigateway-lambda 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 +76 -58
- package/lib/index.d.ts +7 -0
- package/lib/index.js +4 -3
- package/package.json +8 -8
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/asset.3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f/index.js +23 -0
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cdk.out +1 -1
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.assets.json +6 -6
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplam-customCloudfrontLoggingBucket.template.json +30 -41
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/cftaplamcustomCloudfrontLoggingBucketIntegDefaultTestDeployAssert35A683E0.assets.json +1 -1
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/integ.json +1 -1
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/manifest.json +429 -6
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/tree.json +1 -1713
- package/test/integ.cftaplam-no-arguments.js.snapshot/asset.3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f/index.js +23 -0
- package/test/integ.cftaplam-no-arguments.js.snapshot/cdk.out +1 -1
- package/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.assets.json +6 -6
- package/test/integ.cftaplam-no-arguments.js.snapshot/cftaplam-no-arguments.template.json +30 -41
- package/test/integ.cftaplam-no-arguments.js.snapshot/cftaplamnoargumentsIntegDefaultTestDeployAssertACC32F59.assets.json +1 -1
- package/test/integ.cftaplam-no-arguments.js.snapshot/integ.json +1 -1
- package/test/integ.cftaplam-no-arguments.js.snapshot/manifest.json +429 -6
- package/test/integ.cftaplam-no-arguments.js.snapshot/tree.json +1 -1713
- package/test/integ.cftaplam-no-usage-plan.d.ts +13 -0
- package/test/integ.cftaplam-no-usage-plan.js +50 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/asset.3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f/index.js +23 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/asset.faa95a81ae7d7373f3e1f242268f904eb748d8d0fdd306e8a6fe515a1905a7d6/index.js +1 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/cdk.out +1 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/cftaplam-no-usage-plan.assets.json +45 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/cftaplam-no-usage-plan.template.json +1403 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/cftaplamnousageplanIntegDefaultTestDeployAssertABA4F4C5.assets.json +19 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/cftaplamnousageplanIntegDefaultTestDeployAssertABA4F4C5.template.json +36 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/integ.json +12 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/manifest.json +704 -0
- package/test/integ.cftaplam-no-usage-plan.js.snapshot/tree.json +1 -0
- package/test/integ.cftaplam-override-behavior.js.snapshot/asset.3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f/index.js +23 -0
- package/test/integ.cftaplam-override-behavior.js.snapshot/cdk.out +1 -1
- package/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.assets.json +6 -6
- package/test/integ.cftaplam-override-behavior.js.snapshot/cftaplam-override-behavior.template.json +30 -41
- package/test/integ.cftaplam-override-behavior.js.snapshot/cftaplamoverridebehaviorIntegDefaultTestDeployAssert3DC30427.assets.json +1 -1
- package/test/integ.cftaplam-override-behavior.js.snapshot/integ.json +1 -1
- package/test/integ.cftaplam-override-behavior.js.snapshot/manifest.json +468 -6
- package/test/integ.cftaplam-override-behavior.js.snapshot/tree.json +1 -1797
- package/test/test.cloudfront-apigateway-lambda.test.js +42 -1
- package/test/integ.cftaplam-customCloudfrontLoggingBucket.js.snapshot/asset.42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c/index.js +0 -10
- package/test/integ.cftaplam-no-arguments.js.snapshot/asset.42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c/index.js +0 -10
- package/test/integ.cftaplam-override-behavior.js.snapshot/asset.42a35bbf0dec9ef0ac5b0dde87e71a1b8929e8d2d178dd09ccfb2c928ec0198c/index.js +0 -10
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
|
|
14
|
+
console.log('Loading function');
|
|
15
|
+
|
|
16
|
+
exports.handler = async (event, context) => {
|
|
17
|
+
console.log('Received event:', JSON.stringify(event, null, 2));
|
|
18
|
+
return {
|
|
19
|
+
statusCode: 200,
|
|
20
|
+
headers: { 'Content-Type': 'text/plain' },
|
|
21
|
+
body: `Hello from Project Vesper! You've hit ${event.path}\n`
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"40.0.0"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "40.0.0",
|
|
3
3
|
"files": {
|
|
4
|
-
"
|
|
4
|
+
"3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f": {
|
|
5
5
|
"source": {
|
|
6
|
-
"path": "asset.
|
|
6
|
+
"path": "asset.3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f",
|
|
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": "3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f.zip",
|
|
13
13
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
"
|
|
30
|
+
"4c551ce3b002ff0c25d4d15a330f1d228a516cfa684f07615e84f7c3f82fd94e": {
|
|
31
31
|
"source": {
|
|
32
32
|
"path": "cftaplam-no-arguments.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": "4c551ce3b002ff0c25d4d15a330f1d228a516cfa684f07615e84f7c3f82fd94e.json",
|
|
39
39
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"S3Bucket": {
|
|
40
40
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
41
41
|
},
|
|
42
|
-
"S3Key": "
|
|
42
|
+
"S3Key": "3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f.zip"
|
|
43
43
|
},
|
|
44
44
|
"Handler": ".handler",
|
|
45
45
|
"Role": {
|
|
@@ -235,40 +235,6 @@
|
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
},
|
|
238
|
-
"testcloudfrontapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyDB7FF8EB": {
|
|
239
|
-
"Type": "AWS::IAM::Policy",
|
|
240
|
-
"Properties": {
|
|
241
|
-
"PolicyDocument": {
|
|
242
|
-
"Statement": [
|
|
243
|
-
{
|
|
244
|
-
"Action": [
|
|
245
|
-
"xray:PutTelemetryRecords",
|
|
246
|
-
"xray:PutTraceSegments"
|
|
247
|
-
],
|
|
248
|
-
"Effect": "Allow",
|
|
249
|
-
"Resource": "*"
|
|
250
|
-
}
|
|
251
|
-
],
|
|
252
|
-
"Version": "2012-10-17"
|
|
253
|
-
},
|
|
254
|
-
"PolicyName": "testcloudfrontapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyDB7FF8EB",
|
|
255
|
-
"Roles": [
|
|
256
|
-
{
|
|
257
|
-
"Ref": "testcloudfrontapigatewaylambdaLambdaFunctionServiceRoleCB74590F"
|
|
258
|
-
}
|
|
259
|
-
]
|
|
260
|
-
},
|
|
261
|
-
"Metadata": {
|
|
262
|
-
"cfn_nag": {
|
|
263
|
-
"rules_to_suppress": [
|
|
264
|
-
{
|
|
265
|
-
"id": "W12",
|
|
266
|
-
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
|
|
267
|
-
}
|
|
268
|
-
]
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
238
|
"testcloudfrontapigatewaylambdaLambdaFunction17A55E65": {
|
|
273
239
|
"Type": "AWS::Lambda::Function",
|
|
274
240
|
"Properties": {
|
|
@@ -276,7 +242,7 @@
|
|
|
276
242
|
"S3Bucket": {
|
|
277
243
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
278
244
|
},
|
|
279
|
-
"S3Key": "
|
|
245
|
+
"S3Key": "3a18fd3de4803f72260a058823accffd4f8d69986c6862a23cd86265f6cafa0f.zip"
|
|
280
246
|
},
|
|
281
247
|
"Environment": {
|
|
282
248
|
"Variables": {
|
|
@@ -296,7 +262,6 @@
|
|
|
296
262
|
}
|
|
297
263
|
},
|
|
298
264
|
"DependsOn": [
|
|
299
|
-
"testcloudfrontapigatewaylambdaLambdaFunctionServiceRoleDefaultPolicyDB7FF8EB",
|
|
300
265
|
"testcloudfrontapigatewaylambdaLambdaFunctionServiceRoleCB74590F"
|
|
301
266
|
],
|
|
302
267
|
"Metadata": {
|
|
@@ -318,6 +283,30 @@
|
|
|
318
283
|
}
|
|
319
284
|
}
|
|
320
285
|
},
|
|
286
|
+
"testcloudfrontapigatewaylambdaLambdaFunctioninlinePolicyAddedToExecutionRole010F5D55C": {
|
|
287
|
+
"Type": "AWS::IAM::Policy",
|
|
288
|
+
"Properties": {
|
|
289
|
+
"PolicyDocument": {
|
|
290
|
+
"Statement": [
|
|
291
|
+
{
|
|
292
|
+
"Action": [
|
|
293
|
+
"xray:PutTelemetryRecords",
|
|
294
|
+
"xray:PutTraceSegments"
|
|
295
|
+
],
|
|
296
|
+
"Effect": "Allow",
|
|
297
|
+
"Resource": "*"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"Version": "2012-10-17"
|
|
301
|
+
},
|
|
302
|
+
"PolicyName": "testcloudfrontapigatewaylambdaLambdaFunctioninlinePolicyAddedToExecutionRole010F5D55C",
|
|
303
|
+
"Roles": [
|
|
304
|
+
{
|
|
305
|
+
"Ref": "testcloudfrontapigatewaylambdaLambdaFunctionServiceRoleCB74590F"
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
}
|
|
309
|
+
},
|
|
321
310
|
"testcloudfrontapigatewaylambdaApiAccessLogGroup97EB2E40": {
|
|
322
311
|
"Type": "AWS::Logs::LogGroup",
|
|
323
312
|
"UpdateReplacePolicy": "Retain",
|
|
@@ -1317,10 +1306,10 @@
|
|
|
1317
1306
|
"value": "nodejs20.x"
|
|
1318
1307
|
},
|
|
1319
1308
|
"cn-north-1": {
|
|
1320
|
-
"value": "
|
|
1309
|
+
"value": "nodejs20.x"
|
|
1321
1310
|
},
|
|
1322
1311
|
"cn-northwest-1": {
|
|
1323
|
-
"value": "
|
|
1312
|
+
"value": "nodejs20.x"
|
|
1324
1313
|
},
|
|
1325
1314
|
"eu-central-1": {
|
|
1326
1315
|
"value": "nodejs20.x"
|
|
@@ -1371,10 +1360,10 @@
|
|
|
1371
1360
|
"value": "nodejs20.x"
|
|
1372
1361
|
},
|
|
1373
1362
|
"us-gov-east-1": {
|
|
1374
|
-
"value": "
|
|
1363
|
+
"value": "nodejs20.x"
|
|
1375
1364
|
},
|
|
1376
1365
|
"us-gov-west-1": {
|
|
1377
|
-
"value": "
|
|
1366
|
+
"value": "nodejs20.x"
|
|
1378
1367
|
},
|
|
1379
1368
|
"us-iso-east-1": {
|
|
1380
1369
|
"value": "nodejs18.x"
|