@aws-solutions-constructs/aws-lambda-secretsmanager 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.lamsec-deployFunction.js.snapshot/asset.a0c6248ec595d3ceec1177aa5ac5b494fdf4c66f1b88aa48086befd44f193d8c/index.js +21 -0
- package/test/integ.lamsec-deployFunction.js.snapshot/cdk.out +1 -1
- package/test/integ.lamsec-deployFunction.js.snapshot/integ.json +1 -1
- package/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.assets.json +6 -6
- package/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.template.json +25 -19
- package/test/integ.lamsec-deployFunction.js.snapshot/lamsecdeployFunctionIntegDefaultTestDeployAssert7322BEEA.assets.json +1 -1
- package/test/integ.lamsec-deployFunction.js.snapshot/manifest.json +171 -3
- package/test/integ.lamsec-deployFunction.js.snapshot/tree.json +1 -342
- package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/cdk.out +1 -1
- package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/integ.json +1 -1
- package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.assets.json +3 -3
- package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.template.json +35 -7
- package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsecdeployFunctionWithExistingVpcIntegDefaultTestDeployAssert647243A7.assets.json +1 -1
- package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/manifest.json +508 -3
- package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/tree.json +1 -1407
- package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/cdk.out +1 -1
- package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/integ.json +1 -1
- package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.assets.json +3 -3
- package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.template.json +33 -7
- package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsecdeployFunctionWithVpcIntegDefaultTestDeployAssert66148FF5.assets.json +1 -1
- package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/manifest.json +436 -3
- package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/tree.json +1 -995
- package/test/integ.lamsec-existingFunction.js.snapshot/asset.a0c6248ec595d3ceec1177aa5ac5b494fdf4c66f1b88aa48086befd44f193d8c/index.js +21 -0
- package/test/integ.lamsec-existingFunction.js.snapshot/cdk.out +1 -1
- package/test/integ.lamsec-existingFunction.js.snapshot/integ.json +1 -1
- package/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.assets.json +6 -6
- package/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.template.json +25 -19
- package/test/integ.lamsec-existingFunction.js.snapshot/lamsecexistingFunctionIntegDefaultTestDeployAssert295B352B.assets.json +1 -1
- package/test/integ.lamsec-existingFunction.js.snapshot/manifest.json +171 -3
- package/test/integ.lamsec-existingFunction.js.snapshot/tree.json +1 -342
- package/test/integ.lamsec-deployFunction.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +0 -8
- package/test/integ.lamsec-existingFunction.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +0 -8
|
@@ -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 function(event) {
|
|
15
|
+
console.log('request:', JSON.stringify(event, undefined, 2));
|
|
16
|
+
return {
|
|
17
|
+
statusCode: 200,
|
|
18
|
+
headers: { 'Content-Type': 'text/plain' },
|
|
19
|
+
body: `Hello, CDK! You've hit ${event.path}\n`
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"40.0.0"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "40.0.0",
|
|
3
3
|
"files": {
|
|
4
|
-
"
|
|
4
|
+
"a0c6248ec595d3ceec1177aa5ac5b494fdf4c66f1b88aa48086befd44f193d8c": {
|
|
5
5
|
"source": {
|
|
6
|
-
"path": "asset.
|
|
6
|
+
"path": "asset.a0c6248ec595d3ceec1177aa5ac5b494fdf4c66f1b88aa48086befd44f193d8c",
|
|
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": "a0c6248ec595d3ceec1177aa5ac5b494fdf4c66f1b88aa48086befd44f193d8c.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
|
+
"13696467e3f33b66f4004b57ee05ec5fd2f9dabb7e4f2227f45773099e9f05b9": {
|
|
18
18
|
"source": {
|
|
19
19
|
"path": "lamsec-existingFunction.template.json",
|
|
20
20
|
"packaging": "file"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"destinations": {
|
|
23
23
|
"current_account-current_region": {
|
|
24
24
|
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
25
|
-
"objectKey": "
|
|
25
|
+
"objectKey": "13696467e3f33b66f4004b57ee05ec5fd2f9dabb7e4f2227f45773099e9f05b9.json",
|
|
26
26
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
27
27
|
}
|
|
28
28
|
}
|
package/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.template.json
CHANGED
|
@@ -68,14 +68,6 @@
|
|
|
68
68
|
"Properties": {
|
|
69
69
|
"PolicyDocument": {
|
|
70
70
|
"Statement": [
|
|
71
|
-
{
|
|
72
|
-
"Action": [
|
|
73
|
-
"xray:PutTelemetryRecords",
|
|
74
|
-
"xray:PutTraceSegments"
|
|
75
|
-
],
|
|
76
|
-
"Effect": "Allow",
|
|
77
|
-
"Resource": "*"
|
|
78
|
-
},
|
|
79
71
|
{
|
|
80
72
|
"Action": [
|
|
81
73
|
"secretsmanager:DescribeSecret",
|
|
@@ -95,16 +87,6 @@
|
|
|
95
87
|
"Ref": "LambdaFunctionServiceRole0C4CDE0B"
|
|
96
88
|
}
|
|
97
89
|
]
|
|
98
|
-
},
|
|
99
|
-
"Metadata": {
|
|
100
|
-
"cfn_nag": {
|
|
101
|
-
"rules_to_suppress": [
|
|
102
|
-
{
|
|
103
|
-
"id": "W12",
|
|
104
|
-
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
90
|
}
|
|
109
91
|
},
|
|
110
92
|
"LambdaFunctionBF21E41F": {
|
|
@@ -114,7 +96,7 @@
|
|
|
114
96
|
"S3Bucket": {
|
|
115
97
|
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
116
98
|
},
|
|
117
|
-
"S3Key": "
|
|
99
|
+
"S3Key": "a0c6248ec595d3ceec1177aa5ac5b494fdf4c66f1b88aa48086befd44f193d8c.zip"
|
|
118
100
|
},
|
|
119
101
|
"Environment": {
|
|
120
102
|
"Variables": {
|
|
@@ -159,6 +141,30 @@
|
|
|
159
141
|
}
|
|
160
142
|
}
|
|
161
143
|
},
|
|
144
|
+
"LambdaFunctioninlinePolicyAddedToExecutionRole007875684": {
|
|
145
|
+
"Type": "AWS::IAM::Policy",
|
|
146
|
+
"Properties": {
|
|
147
|
+
"PolicyDocument": {
|
|
148
|
+
"Statement": [
|
|
149
|
+
{
|
|
150
|
+
"Action": [
|
|
151
|
+
"xray:PutTelemetryRecords",
|
|
152
|
+
"xray:PutTraceSegments"
|
|
153
|
+
],
|
|
154
|
+
"Effect": "Allow",
|
|
155
|
+
"Resource": "*"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"Version": "2012-10-17"
|
|
159
|
+
},
|
|
160
|
+
"PolicyName": "LambdaFunctioninlinePolicyAddedToExecutionRole007875684",
|
|
161
|
+
"Roles": [
|
|
162
|
+
{
|
|
163
|
+
"Ref": "LambdaFunctionServiceRole0C4CDE0B"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
},
|
|
162
168
|
"testlambdasecretsmanagersecret4C99E6BF": {
|
|
163
169
|
"Type": "AWS::SecretsManager::Secret",
|
|
164
170
|
"Properties": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "42.0.0",
|
|
3
3
|
"artifacts": {
|
|
4
4
|
"lamsecexistingFunctionIntegDefaultTestDeployAssert295B352B.assets": {
|
|
5
5
|
"type": "cdk:asset-manifest",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"validateOnSynth": false,
|
|
67
67
|
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
|
|
68
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}/
|
|
69
|
+
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/13696467e3f33b66f4004b57ee05ec5fd2f9dabb7e4f2227f45773099e9f05b9.json",
|
|
70
70
|
"requiresBootstrapStackVersion": 6,
|
|
71
71
|
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
|
|
72
72
|
"additionalDependencies": [
|
|
@@ -82,24 +82,191 @@
|
|
|
82
82
|
"lamsec-existingFunction.assets"
|
|
83
83
|
],
|
|
84
84
|
"metadata": {
|
|
85
|
+
"/lamsec-existingFunction/LambdaFunctionServiceRole": [
|
|
86
|
+
{
|
|
87
|
+
"type": "aws:cdk:analytics:construct",
|
|
88
|
+
"data": {
|
|
89
|
+
"assumedBy": {
|
|
90
|
+
"principalAccount": "*",
|
|
91
|
+
"assumeRoleAction": "*"
|
|
92
|
+
},
|
|
93
|
+
"inlinePolicies": "*"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"type": "aws:cdk:analytics:method",
|
|
98
|
+
"data": {
|
|
99
|
+
"attachInlinePolicy": [
|
|
100
|
+
"*"
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "aws:cdk:analytics:method",
|
|
106
|
+
"data": {
|
|
107
|
+
"attachInlinePolicy": [
|
|
108
|
+
"*"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"type": "aws:cdk:analytics:method",
|
|
114
|
+
"data": {
|
|
115
|
+
"addToPrincipalPolicy": [
|
|
116
|
+
{}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "aws:cdk:analytics:method",
|
|
122
|
+
"data": {
|
|
123
|
+
"attachInlinePolicy": [
|
|
124
|
+
"*"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"type": "aws:cdk:analytics:method",
|
|
130
|
+
"data": {
|
|
131
|
+
"attachInlinePolicy": [
|
|
132
|
+
"*"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"/lamsec-existingFunction/LambdaFunctionServiceRole/ImportLambdaFunctionServiceRole": [
|
|
138
|
+
{
|
|
139
|
+
"type": "aws:cdk:analytics:construct",
|
|
140
|
+
"data": "*"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
85
143
|
"/lamsec-existingFunction/LambdaFunctionServiceRole/Resource": [
|
|
86
144
|
{
|
|
87
145
|
"type": "aws:cdk:logicalId",
|
|
88
146
|
"data": "LambdaFunctionServiceRole0C4CDE0B"
|
|
89
147
|
}
|
|
90
148
|
],
|
|
149
|
+
"/lamsec-existingFunction/LambdaFunctionServiceRole/DefaultPolicy": [
|
|
150
|
+
{
|
|
151
|
+
"type": "aws:cdk:analytics:construct",
|
|
152
|
+
"data": "*"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"type": "aws:cdk:analytics:method",
|
|
156
|
+
"data": {
|
|
157
|
+
"attachToRole": [
|
|
158
|
+
"*"
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "aws:cdk:analytics:method",
|
|
164
|
+
"data": {
|
|
165
|
+
"attachToRole": [
|
|
166
|
+
"*"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"type": "aws:cdk:analytics:method",
|
|
172
|
+
"data": {
|
|
173
|
+
"addStatements": [
|
|
174
|
+
{}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
],
|
|
91
179
|
"/lamsec-existingFunction/LambdaFunctionServiceRole/DefaultPolicy/Resource": [
|
|
92
180
|
{
|
|
93
181
|
"type": "aws:cdk:logicalId",
|
|
94
182
|
"data": "LambdaFunctionServiceRoleDefaultPolicy126C8897"
|
|
95
183
|
}
|
|
96
184
|
],
|
|
185
|
+
"/lamsec-existingFunction/LambdaFunction": [
|
|
186
|
+
{
|
|
187
|
+
"type": "aws:cdk:analytics:construct",
|
|
188
|
+
"data": {
|
|
189
|
+
"role": "*",
|
|
190
|
+
"tracing": "Active",
|
|
191
|
+
"runtime": "*",
|
|
192
|
+
"handler": "*",
|
|
193
|
+
"code": "*"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "aws:cdk:analytics:method",
|
|
198
|
+
"data": {
|
|
199
|
+
"addEnvironment": [
|
|
200
|
+
"*",
|
|
201
|
+
"*",
|
|
202
|
+
{
|
|
203
|
+
"removeInEdge": true
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"type": "aws:cdk:analytics:method",
|
|
210
|
+
"data": {
|
|
211
|
+
"addEnvironment": [
|
|
212
|
+
"*",
|
|
213
|
+
"*"
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
],
|
|
97
218
|
"/lamsec-existingFunction/LambdaFunction/Resource": [
|
|
98
219
|
{
|
|
99
220
|
"type": "aws:cdk:logicalId",
|
|
100
221
|
"data": "LambdaFunctionBF21E41F"
|
|
101
222
|
}
|
|
102
223
|
],
|
|
224
|
+
"/lamsec-existingFunction/LambdaFunction/inlinePolicyAddedToExecutionRole-0": [
|
|
225
|
+
{
|
|
226
|
+
"type": "aws:cdk:analytics:construct",
|
|
227
|
+
"data": {
|
|
228
|
+
"statements": "*"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"type": "aws:cdk:analytics:method",
|
|
233
|
+
"data": {
|
|
234
|
+
"addStatements": [
|
|
235
|
+
{}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"type": "aws:cdk:analytics:method",
|
|
241
|
+
"data": {
|
|
242
|
+
"attachToRole": [
|
|
243
|
+
"*"
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"type": "aws:cdk:analytics:method",
|
|
249
|
+
"data": {
|
|
250
|
+
"attachToRole": [
|
|
251
|
+
"*"
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"/lamsec-existingFunction/LambdaFunction/inlinePolicyAddedToExecutionRole-0/Resource": [
|
|
257
|
+
{
|
|
258
|
+
"type": "aws:cdk:logicalId",
|
|
259
|
+
"data": "LambdaFunctioninlinePolicyAddedToExecutionRole007875684"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"/lamsec-existingFunction/test-lambda-secretsmanager/secret": [
|
|
263
|
+
{
|
|
264
|
+
"type": "aws:cdk:analytics:construct",
|
|
265
|
+
"data": {
|
|
266
|
+
"removalPolicy": "destroy"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
],
|
|
103
270
|
"/lamsec-existingFunction/test-lambda-secretsmanager/secret/Resource": [
|
|
104
271
|
{
|
|
105
272
|
"type": "aws:cdk:logicalId",
|
|
@@ -127,5 +294,6 @@
|
|
|
127
294
|
"file": "tree.json"
|
|
128
295
|
}
|
|
129
296
|
}
|
|
130
|
-
}
|
|
297
|
+
},
|
|
298
|
+
"minimumCliVersion": "2.1006.0"
|
|
131
299
|
}
|