@aws-solutions-constructs/aws-apigateway-lambda 2.51.0 → 2.52.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.
Files changed (27) hide show
  1. package/.eslintignore +5 -1
  2. package/.jsii +49 -4
  3. package/integ.config.json +7 -0
  4. package/lib/index.js +1 -1
  5. package/package.json +9 -8
  6. package/test/integ.apilam-deployFunction.js +5 -2
  7. package/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.assets.json +32 -0
  8. package/test/integ.apilam-deployFunction.js.snapshot/apilam-deployFunction.template.json +632 -0
  9. package/test/integ.apilam-deployFunction.js.snapshot/apilamdeployFunctionIntegDefaultTestDeployAssert281C111D.assets.json +19 -0
  10. package/test/integ.apilam-deployFunction.js.snapshot/apilamdeployFunctionIntegDefaultTestDeployAssert281C111D.template.json +36 -0
  11. package/test/integ.apilam-deployFunction.js.snapshot/asset.0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f/index.js +21 -0
  12. package/test/integ.apilam-deployFunction.js.snapshot/cdk.out +1 -0
  13. package/test/integ.apilam-deployFunction.js.snapshot/integ.json +12 -0
  14. package/test/integ.apilam-deployFunction.js.snapshot/manifest.json +215 -0
  15. package/test/integ.apilam-deployFunction.js.snapshot/tree.json +927 -0
  16. package/test/integ.apilam-existingFunction.js +5 -2
  17. package/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.assets.json +32 -0
  18. package/test/integ.apilam-existingFunction.js.snapshot/apilam-existingFunction.template.json +632 -0
  19. package/test/integ.apilam-existingFunction.js.snapshot/apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.assets.json +19 -0
  20. package/test/integ.apilam-existingFunction.js.snapshot/apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.template.json +36 -0
  21. package/test/integ.apilam-existingFunction.js.snapshot/asset.0904d3723480fed2daf7885caa427b930881caae6879d1e6b0d395020173ef6f/index.js +21 -0
  22. package/test/integ.apilam-existingFunction.js.snapshot/cdk.out +1 -0
  23. package/test/integ.apilam-existingFunction.js.snapshot/integ.json +12 -0
  24. package/test/integ.apilam-existingFunction.js.snapshot/manifest.json +215 -0
  25. package/test/integ.apilam-existingFunction.js.snapshot/tree.json +927 -0
  26. package/test/integ.apilam-deployFunction.expected.json +0 -632
  27. package/test/integ.apilam-existingFunction.expected.json +0 -632
@@ -0,0 +1,19 @@
1
+ {
2
+ "version": "36.0.0",
3
+ "files": {
4
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
5
+ "source": {
6
+ "path": "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.template.json",
7
+ "packaging": "file"
8
+ },
9
+ "destinations": {
10
+ "current_account-current_region": {
11
+ "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12
+ "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
13
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
14
+ }
15
+ }
16
+ }
17
+ },
18
+ "dockerImages": {}
19
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "Parameters": {
3
+ "BootstrapVersion": {
4
+ "Type": "AWS::SSM::Parameter::Value<String>",
5
+ "Default": "/cdk-bootstrap/hnb659fds/version",
6
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
7
+ }
8
+ },
9
+ "Rules": {
10
+ "CheckBootstrapVersion": {
11
+ "Assertions": [
12
+ {
13
+ "Assert": {
14
+ "Fn::Not": [
15
+ {
16
+ "Fn::Contains": [
17
+ [
18
+ "1",
19
+ "2",
20
+ "3",
21
+ "4",
22
+ "5"
23
+ ],
24
+ {
25
+ "Ref": "BootstrapVersion"
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ },
31
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
32
+ }
33
+ ]
34
+ }
35
+ }
36
+ }
@@ -0,0 +1,21 @@
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
+ exports.handler = async (event, context) => {
15
+ console.log('Received event:', JSON.stringify(event, null, 2));
16
+     return {
17
+       statusCode: 200,
18
+       headers: { 'Content-Type': 'text/plain' },
19
+       body: `Hello from Project Vesper! You've hit ${event.path}\n`
20
+     };
21
+ };
@@ -0,0 +1 @@
1
+ {"version":"36.0.0"}
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": "36.0.0",
3
+ "testCases": {
4
+ "apilam-existingFunction/Integ/DefaultTest": {
5
+ "stacks": [
6
+ "apilam-existingFunction"
7
+ ],
8
+ "assertionStack": "apilam-existingFunction/Integ/DefaultTest/DeployAssert",
9
+ "assertionStackName": "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03"
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,215 @@
1
+ {
2
+ "version": "36.0.0",
3
+ "artifacts": {
4
+ "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.assets": {
5
+ "type": "cdk:asset-manifest",
6
+ "properties": {
7
+ "file": "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.assets.json",
8
+ "requiresBootstrapStackVersion": 6,
9
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
10
+ }
11
+ },
12
+ "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03": {
13
+ "type": "aws:cloudformation:stack",
14
+ "environment": "aws://unknown-account/unknown-region",
15
+ "properties": {
16
+ "templateFile": "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.template.json",
17
+ "terminationProtection": false,
18
+ "validateOnSynth": false,
19
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
20
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
21
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
22
+ "requiresBootstrapStackVersion": 6,
23
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
24
+ "additionalDependencies": [
25
+ "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.assets"
26
+ ],
27
+ "lookupRole": {
28
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
29
+ "requiresBootstrapStackVersion": 8,
30
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
31
+ }
32
+ },
33
+ "dependencies": [
34
+ "apilamexistingFunctionIntegDefaultTestDeployAssert4238FD03.assets"
35
+ ],
36
+ "metadata": {
37
+ "/apilam-existingFunction/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
38
+ {
39
+ "type": "aws:cdk:logicalId",
40
+ "data": "BootstrapVersion"
41
+ }
42
+ ],
43
+ "/apilam-existingFunction/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
44
+ {
45
+ "type": "aws:cdk:logicalId",
46
+ "data": "CheckBootstrapVersion"
47
+ }
48
+ ]
49
+ },
50
+ "displayName": "apilam-existingFunction/Integ/DefaultTest/DeployAssert"
51
+ },
52
+ "apilam-existingFunction.assets": {
53
+ "type": "cdk:asset-manifest",
54
+ "properties": {
55
+ "file": "apilam-existingFunction.assets.json",
56
+ "requiresBootstrapStackVersion": 6,
57
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
58
+ }
59
+ },
60
+ "apilam-existingFunction": {
61
+ "type": "aws:cloudformation:stack",
62
+ "environment": "aws://unknown-account/unknown-region",
63
+ "properties": {
64
+ "templateFile": "apilam-existingFunction.template.json",
65
+ "terminationProtection": false,
66
+ "validateOnSynth": false,
67
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
68
+ "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
69
+ "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/78e827f281035db1c86a00fd6a2a077db91df9d4da007adc154d742647faf1bd.json",
70
+ "requiresBootstrapStackVersion": 6,
71
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
72
+ "additionalDependencies": [
73
+ "apilam-existingFunction.assets"
74
+ ],
75
+ "lookupRole": {
76
+ "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
77
+ "requiresBootstrapStackVersion": 8,
78
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
79
+ }
80
+ },
81
+ "dependencies": [
82
+ "apilam-existingFunction.assets"
83
+ ],
84
+ "metadata": {
85
+ "/apilam-existingFunction/LambdaFunctionServiceRole/Resource": [
86
+ {
87
+ "type": "aws:cdk:logicalId",
88
+ "data": "LambdaFunctionServiceRole0C4CDE0B"
89
+ }
90
+ ],
91
+ "/apilam-existingFunction/LambdaFunctionServiceRole/DefaultPolicy/Resource": [
92
+ {
93
+ "type": "aws:cdk:logicalId",
94
+ "data": "LambdaFunctionServiceRoleDefaultPolicy126C8897"
95
+ }
96
+ ],
97
+ "/apilam-existingFunction/LambdaFunction/Resource": [
98
+ {
99
+ "type": "aws:cdk:logicalId",
100
+ "data": "LambdaFunctionBF21E41F"
101
+ }
102
+ ],
103
+ "/apilam-existingFunction/test-apigateway-lambda/ApiAccessLogGroup/Resource": [
104
+ {
105
+ "type": "aws:cdk:logicalId",
106
+ "data": "testapigatewaylambdaApiAccessLogGroupEB3253A2"
107
+ }
108
+ ],
109
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Resource": [
110
+ {
111
+ "type": "aws:cdk:logicalId",
112
+ "data": "testapigatewaylambdaLambdaRestApiE957E944"
113
+ }
114
+ ],
115
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Deployment/Resource": [
116
+ {
117
+ "type": "aws:cdk:logicalId",
118
+ "data": "testapigatewaylambdaLambdaRestApiDeployment85334BB3938813331492485ced06ab87062fb015"
119
+ }
120
+ ],
121
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/DeploymentStage.prod/Resource": [
122
+ {
123
+ "type": "aws:cdk:logicalId",
124
+ "data": "testapigatewaylambdaLambdaRestApiDeploymentStageprod4EBF7247"
125
+ }
126
+ ],
127
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Endpoint": [
128
+ {
129
+ "type": "aws:cdk:logicalId",
130
+ "data": "testapigatewaylambdaLambdaRestApiEndpoint2EF0B753"
131
+ }
132
+ ],
133
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/{proxy+}/Resource": [
134
+ {
135
+ "type": "aws:cdk:logicalId",
136
+ "data": "testapigatewaylambdaLambdaRestApiproxy2C2C544E"
137
+ }
138
+ ],
139
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/{proxy+}/ANY/ApiPermission.apilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CD.ANY..{proxy+}": [
140
+ {
141
+ "type": "aws:cdk:logicalId",
142
+ "data": "testapigatewaylambdaLambdaRestApiproxyANYApiPermissionapilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CDANYproxy184097FE"
143
+ }
144
+ ],
145
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/{proxy+}/ANY/ApiPermission.Test.apilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CD.ANY..{proxy+}": [
146
+ {
147
+ "type": "aws:cdk:logicalId",
148
+ "data": "testapigatewaylambdaLambdaRestApiproxyANYApiPermissionTestapilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CDANYproxy0716AB43"
149
+ }
150
+ ],
151
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/{proxy+}/ANY/Resource": [
152
+ {
153
+ "type": "aws:cdk:logicalId",
154
+ "data": "testapigatewaylambdaLambdaRestApiproxyANYF6150927"
155
+ }
156
+ ],
157
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/ANY/ApiPermission.apilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CD.ANY..": [
158
+ {
159
+ "type": "aws:cdk:logicalId",
160
+ "data": "testapigatewaylambdaLambdaRestApiANYApiPermissionapilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CDANY245ECD8E"
161
+ }
162
+ ],
163
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/ANY/ApiPermission.Test.apilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CD.ANY..": [
164
+ {
165
+ "type": "aws:cdk:logicalId",
166
+ "data": "testapigatewaylambdaLambdaRestApiANYApiPermissionTestapilamexistingFunctiontestapigatewaylambdaLambdaRestApiEC1EB7CDANYCE9E6EFA"
167
+ }
168
+ ],
169
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/Default/ANY/Resource": [
170
+ {
171
+ "type": "aws:cdk:logicalId",
172
+ "data": "testapigatewaylambdaLambdaRestApiANY1FACA749"
173
+ }
174
+ ],
175
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApi/UsagePlan/Resource": [
176
+ {
177
+ "type": "aws:cdk:logicalId",
178
+ "data": "testapigatewaylambdaLambdaRestApiUsagePlan658131E3"
179
+ }
180
+ ],
181
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApiCloudWatchRole/Resource": [
182
+ {
183
+ "type": "aws:cdk:logicalId",
184
+ "data": "testapigatewaylambdaLambdaRestApiCloudWatchRole6D45E039"
185
+ }
186
+ ],
187
+ "/apilam-existingFunction/test-apigateway-lambda/LambdaRestApiAccount": [
188
+ {
189
+ "type": "aws:cdk:logicalId",
190
+ "data": "testapigatewaylambdaLambdaRestApiAccount0D88B6B8"
191
+ }
192
+ ],
193
+ "/apilam-existingFunction/BootstrapVersion": [
194
+ {
195
+ "type": "aws:cdk:logicalId",
196
+ "data": "BootstrapVersion"
197
+ }
198
+ ],
199
+ "/apilam-existingFunction/CheckBootstrapVersion": [
200
+ {
201
+ "type": "aws:cdk:logicalId",
202
+ "data": "CheckBootstrapVersion"
203
+ }
204
+ ]
205
+ },
206
+ "displayName": "apilam-existingFunction"
207
+ },
208
+ "Tree": {
209
+ "type": "cdk:tree",
210
+ "properties": {
211
+ "file": "tree.json"
212
+ }
213
+ }
214
+ }
215
+ }