@aws-solutions-constructs/aws-lambda-secretsmanager 2.51.0 → 2.52.1

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 (53) hide show
  1. package/.eslintignore +2 -0
  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.lamsec-deployFunction.js +5 -2
  7. package/test/integ.lamsec-deployFunction.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  8. package/test/integ.lamsec-deployFunction.js.snapshot/cdk.out +1 -0
  9. package/test/integ.lamsec-deployFunction.js.snapshot/integ.json +12 -0
  10. package/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.assets.json +32 -0
  11. package/test/integ.lamsec-deployFunction.js.snapshot/lamsec-deployFunction.template.json +208 -0
  12. package/test/integ.lamsec-deployFunction.js.snapshot/lamsecdeployFunctionIntegDefaultTestDeployAssert7322BEEA.assets.json +19 -0
  13. package/test/integ.lamsec-deployFunction.js.snapshot/lamsecdeployFunctionIntegDefaultTestDeployAssert7322BEEA.template.json +36 -0
  14. package/test/integ.lamsec-deployFunction.js.snapshot/manifest.json +131 -0
  15. package/test/integ.lamsec-deployFunction.js.snapshot/tree.json +342 -0
  16. package/test/integ.lamsec-deployFunctionWithExistingVpc.js +6 -2
  17. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  18. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
  19. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
  20. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/cdk.out +1 -0
  21. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/integ.json +12 -0
  22. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.assets.json +45 -0
  23. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsec-deployFunctionWithExistingVpc.template.json +1019 -0
  24. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsecdeployFunctionWithExistingVpcIntegDefaultTestDeployAssert647243A7.assets.json +19 -0
  25. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/lamsecdeployFunctionWithExistingVpcIntegDefaultTestDeployAssert647243A7.template.json +36 -0
  26. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/manifest.json +329 -0
  27. package/test/integ.lamsec-deployFunctionWithExistingVpc.js.snapshot/tree.json +1393 -0
  28. package/test/integ.lamsec-deployFunctionWithVpc.js +6 -2
  29. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  30. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
  31. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
  32. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/cdk.out +1 -0
  33. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/integ.json +12 -0
  34. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.assets.json +45 -0
  35. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsec-deployFunctionWithVpc.template.json +735 -0
  36. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsecdeployFunctionWithVpcIntegDefaultTestDeployAssert66148FF5.assets.json +19 -0
  37. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/lamsecdeployFunctionWithVpcIntegDefaultTestDeployAssert66148FF5.template.json +36 -0
  38. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/manifest.json +233 -0
  39. package/test/integ.lamsec-deployFunctionWithVpc.js.snapshot/tree.json +981 -0
  40. package/test/integ.lamsec-existingFunction.js +5 -2
  41. package/test/integ.lamsec-existingFunction.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
  42. package/test/integ.lamsec-existingFunction.js.snapshot/cdk.out +1 -0
  43. package/test/integ.lamsec-existingFunction.js.snapshot/integ.json +12 -0
  44. package/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.assets.json +32 -0
  45. package/test/integ.lamsec-existingFunction.js.snapshot/lamsec-existingFunction.template.json +208 -0
  46. package/test/integ.lamsec-existingFunction.js.snapshot/lamsecexistingFunctionIntegDefaultTestDeployAssert295B352B.assets.json +19 -0
  47. package/test/integ.lamsec-existingFunction.js.snapshot/lamsecexistingFunctionIntegDefaultTestDeployAssert295B352B.template.json +36 -0
  48. package/test/integ.lamsec-existingFunction.js.snapshot/manifest.json +131 -0
  49. package/test/integ.lamsec-existingFunction.js.snapshot/tree.json +342 -0
  50. package/test/integ.lamsec-deployFunction.expected.json +0 -208
  51. package/test/integ.lamsec-deployFunctionWithExistingVpc.expected.json +0 -1044
  52. package/test/integ.lamsec-deployFunctionWithVpc.expected.json +0 -650
  53. package/test/integ.lamsec-existingFunction.expected.json +0 -208
@@ -1,208 +0,0 @@
1
- {
2
- "Description": "Integration Test for aws-lambda-secretsmanager",
3
- "Resources": {
4
- "LambdaFunctionServiceRole0C4CDE0B": {
5
- "Type": "AWS::IAM::Role",
6
- "Properties": {
7
- "AssumeRolePolicyDocument": {
8
- "Statement": [
9
- {
10
- "Action": "sts:AssumeRole",
11
- "Effect": "Allow",
12
- "Principal": {
13
- "Service": "lambda.amazonaws.com"
14
- }
15
- }
16
- ],
17
- "Version": "2012-10-17"
18
- },
19
- "Policies": [
20
- {
21
- "PolicyDocument": {
22
- "Statement": [
23
- {
24
- "Action": [
25
- "logs:CreateLogGroup",
26
- "logs:CreateLogStream",
27
- "logs:PutLogEvents"
28
- ],
29
- "Effect": "Allow",
30
- "Resource": {
31
- "Fn::Join": [
32
- "",
33
- [
34
- "arn:",
35
- {
36
- "Ref": "AWS::Partition"
37
- },
38
- ":logs:",
39
- {
40
- "Ref": "AWS::Region"
41
- },
42
- ":",
43
- {
44
- "Ref": "AWS::AccountId"
45
- },
46
- ":log-group:/aws/lambda/*"
47
- ]
48
- ]
49
- }
50
- }
51
- ],
52
- "Version": "2012-10-17"
53
- },
54
- "PolicyName": "LambdaFunctionServiceRolePolicy"
55
- }
56
- ]
57
- }
58
- },
59
- "LambdaFunctionServiceRoleDefaultPolicy126C8897": {
60
- "Type": "AWS::IAM::Policy",
61
- "Properties": {
62
- "PolicyDocument": {
63
- "Statement": [
64
- {
65
- "Action": [
66
- "xray:PutTraceSegments",
67
- "xray:PutTelemetryRecords"
68
- ],
69
- "Effect": "Allow",
70
- "Resource": "*"
71
- },
72
- {
73
- "Action": [
74
- "secretsmanager:GetSecretValue",
75
- "secretsmanager:DescribeSecret"
76
- ],
77
- "Effect": "Allow",
78
- "Resource": {
79
- "Ref": "testlambdasecretsmanagersecret4C99E6BF"
80
- }
81
- }
82
- ],
83
- "Version": "2012-10-17"
84
- },
85
- "PolicyName": "LambdaFunctionServiceRoleDefaultPolicy126C8897",
86
- "Roles": [
87
- {
88
- "Ref": "LambdaFunctionServiceRole0C4CDE0B"
89
- }
90
- ]
91
- },
92
- "Metadata": {
93
- "cfn_nag": {
94
- "rules_to_suppress": [
95
- {
96
- "id": "W12",
97
- "reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
98
- }
99
- ]
100
- }
101
- }
102
- },
103
- "LambdaFunctionBF21E41F": {
104
- "Type": "AWS::Lambda::Function",
105
- "Properties": {
106
- "Code": {
107
- "S3Bucket": {
108
- "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
109
- },
110
- "S3Key": "0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8.zip"
111
- },
112
- "Environment": {
113
- "Variables": {
114
- "AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
115
- "SECRET_ARN": {
116
- "Ref": "testlambdasecretsmanagersecret4C99E6BF"
117
- }
118
- }
119
- },
120
- "Handler": "index.handler",
121
- "Role": {
122
- "Fn::GetAtt": [
123
- "LambdaFunctionServiceRole0C4CDE0B",
124
- "Arn"
125
- ]
126
- },
127
- "Runtime": "nodejs16.x",
128
- "TracingConfig": {
129
- "Mode": "Active"
130
- }
131
- },
132
- "DependsOn": [
133
- "LambdaFunctionServiceRoleDefaultPolicy126C8897",
134
- "LambdaFunctionServiceRole0C4CDE0B"
135
- ],
136
- "Metadata": {
137
- "cfn_nag": {
138
- "rules_to_suppress": [
139
- {
140
- "id": "W58",
141
- "reason": "Lambda functions has the required permission to write CloudWatch Logs. It uses custom policy instead of arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole with tighter permissions."
142
- },
143
- {
144
- "id": "W89",
145
- "reason": "This is not a rule for the general case, just for specific use cases/industries"
146
- },
147
- {
148
- "id": "W92",
149
- "reason": "Impossible for us to define the correct concurrency for clients"
150
- }
151
- ]
152
- }
153
- }
154
- },
155
- "testlambdasecretsmanagersecret4C99E6BF": {
156
- "Type": "AWS::SecretsManager::Secret",
157
- "Properties": {
158
- "GenerateSecretString": {}
159
- },
160
- "UpdateReplacePolicy": "Delete",
161
- "DeletionPolicy": "Delete",
162
- "Metadata": {
163
- "cfn_nag": {
164
- "rules_to_suppress": [
165
- {
166
- "id": "W77",
167
- "reason": "We allow the use of the AWS account default key aws/secretsmanager for secret encryption."
168
- }
169
- ]
170
- }
171
- }
172
- }
173
- },
174
- "Parameters": {
175
- "BootstrapVersion": {
176
- "Type": "AWS::SSM::Parameter::Value<String>",
177
- "Default": "/cdk-bootstrap/hnb659fds/version",
178
- "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
179
- }
180
- },
181
- "Rules": {
182
- "CheckBootstrapVersion": {
183
- "Assertions": [
184
- {
185
- "Assert": {
186
- "Fn::Not": [
187
- {
188
- "Fn::Contains": [
189
- [
190
- "1",
191
- "2",
192
- "3",
193
- "4",
194
- "5"
195
- ],
196
- {
197
- "Ref": "BootstrapVersion"
198
- }
199
- ]
200
- }
201
- ]
202
- },
203
- "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
204
- }
205
- ]
206
- }
207
- }
208
- }