@aws-solutions-constructs/aws-lambda-dynamodb 2.50.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.
- package/.eslintignore +2 -0
- package/.jsii +50 -5
- package/integ.config.json +7 -0
- package/lib/index.js +1 -1
- package/package.json +12 -11
- package/test/integ.lamddb-add-secondary-index.js +5 -2
- package/test/integ.lamddb-add-secondary-index.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
- package/test/integ.lamddb-add-secondary-index.js.snapshot/cdk.out +1 -0
- package/test/integ.lamddb-add-secondary-index.js.snapshot/integ.json +12 -0
- package/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.assets.json +32 -0
- package/test/integ.lamddb-add-secondary-index.js.snapshot/lamddb-add-secondary-index.template.json +262 -0
- package/test/integ.lamddb-add-secondary-index.js.snapshot/lamddbaddsecondaryindexIntegDefaultTestDeployAssert3193B4D9.assets.json +19 -0
- package/test/integ.lamddb-add-secondary-index.js.snapshot/lamddbaddsecondaryindexIntegDefaultTestDeployAssert3193B4D9.template.json +36 -0
- package/test/integ.lamddb-add-secondary-index.js.snapshot/manifest.json +131 -0
- package/test/integ.lamddb-add-secondary-index.js.snapshot/tree.json +415 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js +6 -2
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/cdk.out +1 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/integ.json +12 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.assets.json +45 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddb-deployFunctionWithExistingVpc.template.json +984 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddbdeployFunctionWithExistingVpcIntegDefaultTestDeployAssertEE08E38E.assets.json +19 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/lamddbdeployFunctionWithExistingVpcIntegDefaultTestDeployAssertEE08E38E.template.json +36 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/manifest.json +323 -0
- package/test/integ.lamddb-deployFunctionWithExistingVpc.js.snapshot/tree.json +1372 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js +6 -2
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/cdk.out +1 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/integ.json +12 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.assets.json +45 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddb-deployFunctionWithVpc.template.json +694 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddbdeployFunctionWithVpcIntegDefaultTestDeployAssert0AB8275C.assets.json +19 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/lamddbdeployFunctionWithVpcIntegDefaultTestDeployAssert0AB8275C.template.json +36 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/manifest.json +227 -0
- package/test/integ.lamddb-deployFunctionWithVpc.js.snapshot/tree.json +954 -0
- package/test/integ.lamddb-no-arguments.js +5 -2
- package/test/integ.lamddb-no-arguments.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
- package/test/integ.lamddb-no-arguments.js.snapshot/cdk.out +1 -0
- package/test/integ.lamddb-no-arguments.js.snapshot/integ.json +12 -0
- package/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.assets.json +32 -0
- package/test/integ.lamddb-no-arguments.js.snapshot/lamddb-no-arguments.template.json +233 -0
- package/test/integ.lamddb-no-arguments.js.snapshot/lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.assets.json +19 -0
- package/test/integ.lamddb-no-arguments.js.snapshot/lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.template.json +36 -0
- package/test/integ.lamddb-no-arguments.js.snapshot/manifest.json +131 -0
- package/test/integ.lamddb-no-arguments.js.snapshot/tree.json +386 -0
- package/test/integ.lamddb-set-billing-mode.js +5 -2
- package/test/integ.lamddb-set-billing-mode.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
- package/test/integ.lamddb-set-billing-mode.js.snapshot/cdk.out +1 -0
- package/test/integ.lamddb-set-billing-mode.js.snapshot/integ.json +12 -0
- package/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.assets.json +32 -0
- package/test/integ.lamddb-set-billing-mode.js.snapshot/lamddb-set-billing-mode.template.json +246 -0
- package/test/integ.lamddb-set-billing-mode.js.snapshot/lamddbsetbillingmodeIntegDefaultTestDeployAssertDAE32272.assets.json +19 -0
- package/test/integ.lamddb-set-billing-mode.js.snapshot/lamddbsetbillingmodeIntegDefaultTestDeployAssertDAE32272.template.json +36 -0
- package/test/integ.lamddb-set-billing-mode.js.snapshot/manifest.json +131 -0
- package/test/integ.lamddb-set-billing-mode.js.snapshot/tree.json +389 -0
- package/test/integ.lamddb-use-existing-func.js +5 -2
- package/test/integ.lamddb-use-existing-func.js.snapshot/asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8/index.js +8 -0
- package/test/integ.lamddb-use-existing-func.js.snapshot/cdk.out +1 -0
- package/test/integ.lamddb-use-existing-func.js.snapshot/integ.json +12 -0
- package/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.assets.json +32 -0
- package/test/integ.lamddb-use-existing-func.js.snapshot/lamddb-use-existing-func.template.json +233 -0
- package/test/integ.lamddb-use-existing-func.js.snapshot/lamddbuseexistingfuncIntegDefaultTestDeployAssert48D284DD.assets.json +19 -0
- package/test/integ.lamddb-use-existing-func.js.snapshot/lamddbuseexistingfuncIntegDefaultTestDeployAssert48D284DD.template.json +36 -0
- package/test/integ.lamddb-use-existing-func.js.snapshot/manifest.json +131 -0
- package/test/integ.lamddb-use-existing-func.js.snapshot/tree.json +386 -0
- package/test/integ.lamddb-add-secondary-index.expected.json +0 -262
- package/test/integ.lamddb-deployFunctionWithExistingVpc.expected.json +0 -1012
- package/test/integ.lamddb-deployFunctionWithVpc.expected.json +0 -609
- package/test/integ.lamddb-no-arguments.expected.json +0 -233
- package/test/integ.lamddb-set-billing-mode.expected.json +0 -246
- package/test/integ.lamddb-use-existing-func.expected.json +0 -233
|
@@ -17,6 +17,7 @@ const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
|
17
17
|
const lib_1 = require("../lib");
|
|
18
18
|
const lambda = require("aws-cdk-lib/aws-lambda");
|
|
19
19
|
const core_1 = require("@aws-solutions-constructs/core");
|
|
20
|
+
const integ_tests_alpha_1 = require("@aws-cdk/integ-tests-alpha");
|
|
20
21
|
const app = new aws_cdk_lib_1.App();
|
|
21
22
|
// Empty arguments
|
|
22
23
|
const stack = new aws_cdk_lib_1.Stack(app, core_1.generateIntegStackName(__filename));
|
|
@@ -28,5 +29,7 @@ const props = {
|
|
|
28
29
|
},
|
|
29
30
|
};
|
|
30
31
|
new lib_1.LambdaToDynamoDB(stack, 'test-lambda-dynamodb-stack', props);
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
new integ_tests_alpha_1.IntegTest(stack, 'Integ', { testCases: [
|
|
33
|
+
stack
|
|
34
|
+
] });
|
|
35
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWcubGFtZGRiLW5vLWFyZ3VtZW50cy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImludGVnLmxhbWRkYi1uby1hcmd1bWVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7OztHQVdHOztBQUVILGdCQUFnQjtBQUNoQiw2Q0FBeUM7QUFDekMsZ0NBQWlFO0FBQ2pFLGlEQUFpRDtBQUNqRCx5REFBd0U7QUFDeEUsa0VBQXVEO0FBRXZELE1BQU0sR0FBRyxHQUFHLElBQUksaUJBQUcsRUFBRSxDQUFDO0FBRXRCLGtCQUFrQjtBQUNsQixNQUFNLEtBQUssR0FBRyxJQUFJLG1CQUFLLENBQUMsR0FBRyxFQUFFLDZCQUFzQixDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7QUFFakUsTUFBTSxLQUFLLEdBQTBCO0lBQ25DLG1CQUFtQixFQUFFO1FBQ25CLElBQUksRUFBRSxNQUFNLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxHQUFHLFNBQVMsU0FBUyxDQUFDO1FBQ2xELE9BQU8sRUFBRSxNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVc7UUFDbkMsT0FBTyxFQUFFLG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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"testCases": {
|
|
4
|
+
"lamddb-no-arguments/Integ/DefaultTest": {
|
|
5
|
+
"stacks": [
|
|
6
|
+
"lamddb-no-arguments"
|
|
7
|
+
],
|
|
8
|
+
"assertionStack": "lamddb-no-arguments/Integ/DefaultTest/DeployAssert",
|
|
9
|
+
"assertionStackName": "lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"files": {
|
|
4
|
+
"0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8": {
|
|
5
|
+
"source": {
|
|
6
|
+
"path": "asset.0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8",
|
|
7
|
+
"packaging": "zip"
|
|
8
|
+
},
|
|
9
|
+
"destinations": {
|
|
10
|
+
"current_account-current_region": {
|
|
11
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
12
|
+
"objectKey": "0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8.zip",
|
|
13
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"c942db4210ee522f351f152cc931b7834fee74d11cb98a88d9cf77c4e73ea9dd": {
|
|
18
|
+
"source": {
|
|
19
|
+
"path": "lamddb-no-arguments.template.json",
|
|
20
|
+
"packaging": "file"
|
|
21
|
+
},
|
|
22
|
+
"destinations": {
|
|
23
|
+
"current_account-current_region": {
|
|
24
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
25
|
+
"objectKey": "c942db4210ee522f351f152cc931b7834fee74d11cb98a88d9cf77c4e73ea9dd.json",
|
|
26
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"dockerImages": {}
|
|
32
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Resources": {
|
|
3
|
+
"testlambdadynamodbstackLambdaFunctionServiceRole758347A1": {
|
|
4
|
+
"Type": "AWS::IAM::Role",
|
|
5
|
+
"Properties": {
|
|
6
|
+
"AssumeRolePolicyDocument": {
|
|
7
|
+
"Statement": [
|
|
8
|
+
{
|
|
9
|
+
"Action": "sts:AssumeRole",
|
|
10
|
+
"Effect": "Allow",
|
|
11
|
+
"Principal": {
|
|
12
|
+
"Service": "lambda.amazonaws.com"
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"Version": "2012-10-17"
|
|
17
|
+
},
|
|
18
|
+
"Policies": [
|
|
19
|
+
{
|
|
20
|
+
"PolicyDocument": {
|
|
21
|
+
"Statement": [
|
|
22
|
+
{
|
|
23
|
+
"Action": [
|
|
24
|
+
"logs:CreateLogGroup",
|
|
25
|
+
"logs:CreateLogStream",
|
|
26
|
+
"logs:PutLogEvents"
|
|
27
|
+
],
|
|
28
|
+
"Effect": "Allow",
|
|
29
|
+
"Resource": {
|
|
30
|
+
"Fn::Join": [
|
|
31
|
+
"",
|
|
32
|
+
[
|
|
33
|
+
"arn:",
|
|
34
|
+
{
|
|
35
|
+
"Ref": "AWS::Partition"
|
|
36
|
+
},
|
|
37
|
+
":logs:",
|
|
38
|
+
{
|
|
39
|
+
"Ref": "AWS::Region"
|
|
40
|
+
},
|
|
41
|
+
":",
|
|
42
|
+
{
|
|
43
|
+
"Ref": "AWS::AccountId"
|
|
44
|
+
},
|
|
45
|
+
":log-group:/aws/lambda/*"
|
|
46
|
+
]
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"Version": "2012-10-17"
|
|
52
|
+
},
|
|
53
|
+
"PolicyName": "LambdaFunctionServiceRolePolicy"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4": {
|
|
59
|
+
"Type": "AWS::IAM::Policy",
|
|
60
|
+
"Properties": {
|
|
61
|
+
"PolicyDocument": {
|
|
62
|
+
"Statement": [
|
|
63
|
+
{
|
|
64
|
+
"Action": [
|
|
65
|
+
"xray:PutTelemetryRecords",
|
|
66
|
+
"xray:PutTraceSegments"
|
|
67
|
+
],
|
|
68
|
+
"Effect": "Allow",
|
|
69
|
+
"Resource": "*"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"Action": [
|
|
73
|
+
"dynamodb:BatchGetItem",
|
|
74
|
+
"dynamodb:BatchWriteItem",
|
|
75
|
+
"dynamodb:ConditionCheckItem",
|
|
76
|
+
"dynamodb:DeleteItem",
|
|
77
|
+
"dynamodb:DescribeTable",
|
|
78
|
+
"dynamodb:GetItem",
|
|
79
|
+
"dynamodb:GetRecords",
|
|
80
|
+
"dynamodb:GetShardIterator",
|
|
81
|
+
"dynamodb:PutItem",
|
|
82
|
+
"dynamodb:Query",
|
|
83
|
+
"dynamodb:Scan",
|
|
84
|
+
"dynamodb:UpdateItem"
|
|
85
|
+
],
|
|
86
|
+
"Effect": "Allow",
|
|
87
|
+
"Resource": [
|
|
88
|
+
{
|
|
89
|
+
"Fn::GetAtt": [
|
|
90
|
+
"testlambdadynamodbstackDynamoTable8138E93B",
|
|
91
|
+
"Arn"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"Ref": "AWS::NoValue"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"Version": "2012-10-17"
|
|
101
|
+
},
|
|
102
|
+
"PolicyName": "testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4",
|
|
103
|
+
"Roles": [
|
|
104
|
+
{
|
|
105
|
+
"Ref": "testlambdadynamodbstackLambdaFunctionServiceRole758347A1"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"Metadata": {
|
|
110
|
+
"cfn_nag": {
|
|
111
|
+
"rules_to_suppress": [
|
|
112
|
+
{
|
|
113
|
+
"id": "W12",
|
|
114
|
+
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"testlambdadynamodbstackLambdaFunction5DDB3E8D": {
|
|
121
|
+
"Type": "AWS::Lambda::Function",
|
|
122
|
+
"Properties": {
|
|
123
|
+
"Code": {
|
|
124
|
+
"S3Bucket": {
|
|
125
|
+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
126
|
+
},
|
|
127
|
+
"S3Key": "0c3255e93ffe7a906c7422e9f0e9cc4c7fd86ee996ee3bb302e2f134b38463c8.zip"
|
|
128
|
+
},
|
|
129
|
+
"Environment": {
|
|
130
|
+
"Variables": {
|
|
131
|
+
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1",
|
|
132
|
+
"DDB_TABLE_NAME": {
|
|
133
|
+
"Ref": "testlambdadynamodbstackDynamoTable8138E93B"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"Handler": "index.handler",
|
|
138
|
+
"Role": {
|
|
139
|
+
"Fn::GetAtt": [
|
|
140
|
+
"testlambdadynamodbstackLambdaFunctionServiceRole758347A1",
|
|
141
|
+
"Arn"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"Runtime": "nodejs16.x",
|
|
145
|
+
"TracingConfig": {
|
|
146
|
+
"Mode": "Active"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"DependsOn": [
|
|
150
|
+
"testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4",
|
|
151
|
+
"testlambdadynamodbstackLambdaFunctionServiceRole758347A1"
|
|
152
|
+
],
|
|
153
|
+
"Metadata": {
|
|
154
|
+
"cfn_nag": {
|
|
155
|
+
"rules_to_suppress": [
|
|
156
|
+
{
|
|
157
|
+
"id": "W58",
|
|
158
|
+
"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."
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"id": "W89",
|
|
162
|
+
"reason": "This is not a rule for the general case, just for specific use cases/industries"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"id": "W92",
|
|
166
|
+
"reason": "Impossible for us to define the correct concurrency for clients"
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"testlambdadynamodbstackDynamoTable8138E93B": {
|
|
173
|
+
"Type": "AWS::DynamoDB::Table",
|
|
174
|
+
"Properties": {
|
|
175
|
+
"AttributeDefinitions": [
|
|
176
|
+
{
|
|
177
|
+
"AttributeName": "id",
|
|
178
|
+
"AttributeType": "S"
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"BillingMode": "PAY_PER_REQUEST",
|
|
182
|
+
"KeySchema": [
|
|
183
|
+
{
|
|
184
|
+
"AttributeName": "id",
|
|
185
|
+
"KeyType": "HASH"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"PointInTimeRecoverySpecification": {
|
|
189
|
+
"PointInTimeRecoveryEnabled": true
|
|
190
|
+
},
|
|
191
|
+
"SSESpecification": {
|
|
192
|
+
"SSEEnabled": true
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"UpdateReplacePolicy": "Retain",
|
|
196
|
+
"DeletionPolicy": "Retain"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"Parameters": {
|
|
200
|
+
"BootstrapVersion": {
|
|
201
|
+
"Type": "AWS::SSM::Parameter::Value<String>",
|
|
202
|
+
"Default": "/cdk-bootstrap/hnb659fds/version",
|
|
203
|
+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"Rules": {
|
|
207
|
+
"CheckBootstrapVersion": {
|
|
208
|
+
"Assertions": [
|
|
209
|
+
{
|
|
210
|
+
"Assert": {
|
|
211
|
+
"Fn::Not": [
|
|
212
|
+
{
|
|
213
|
+
"Fn::Contains": [
|
|
214
|
+
[
|
|
215
|
+
"1",
|
|
216
|
+
"2",
|
|
217
|
+
"3",
|
|
218
|
+
"4",
|
|
219
|
+
"5"
|
|
220
|
+
],
|
|
221
|
+
{
|
|
222
|
+
"Ref": "BootstrapVersion"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"files": {
|
|
4
|
+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
|
|
5
|
+
"source": {
|
|
6
|
+
"path": "lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.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,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"artifacts": {
|
|
4
|
+
"lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.assets": {
|
|
5
|
+
"type": "cdk:asset-manifest",
|
|
6
|
+
"properties": {
|
|
7
|
+
"file": "lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.assets.json",
|
|
8
|
+
"requiresBootstrapStackVersion": 6,
|
|
9
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0": {
|
|
13
|
+
"type": "aws:cloudformation:stack",
|
|
14
|
+
"environment": "aws://unknown-account/unknown-region",
|
|
15
|
+
"properties": {
|
|
16
|
+
"templateFile": "lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.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
|
+
"lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.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
|
+
"lamddbnoargumentsIntegDefaultTestDeployAssert248B75D0.assets"
|
|
35
|
+
],
|
|
36
|
+
"metadata": {
|
|
37
|
+
"/lamddb-no-arguments/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
|
|
38
|
+
{
|
|
39
|
+
"type": "aws:cdk:logicalId",
|
|
40
|
+
"data": "BootstrapVersion"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"/lamddb-no-arguments/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
|
|
44
|
+
{
|
|
45
|
+
"type": "aws:cdk:logicalId",
|
|
46
|
+
"data": "CheckBootstrapVersion"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"displayName": "lamddb-no-arguments/Integ/DefaultTest/DeployAssert"
|
|
51
|
+
},
|
|
52
|
+
"lamddb-no-arguments.assets": {
|
|
53
|
+
"type": "cdk:asset-manifest",
|
|
54
|
+
"properties": {
|
|
55
|
+
"file": "lamddb-no-arguments.assets.json",
|
|
56
|
+
"requiresBootstrapStackVersion": 6,
|
|
57
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"lamddb-no-arguments": {
|
|
61
|
+
"type": "aws:cloudformation:stack",
|
|
62
|
+
"environment": "aws://unknown-account/unknown-region",
|
|
63
|
+
"properties": {
|
|
64
|
+
"templateFile": "lamddb-no-arguments.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}/c942db4210ee522f351f152cc931b7834fee74d11cb98a88d9cf77c4e73ea9dd.json",
|
|
70
|
+
"requiresBootstrapStackVersion": 6,
|
|
71
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
|
|
72
|
+
"additionalDependencies": [
|
|
73
|
+
"lamddb-no-arguments.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
|
+
"lamddb-no-arguments.assets"
|
|
83
|
+
],
|
|
84
|
+
"metadata": {
|
|
85
|
+
"/lamddb-no-arguments/test-lambda-dynamodb-stack/LambdaFunctionServiceRole/Resource": [
|
|
86
|
+
{
|
|
87
|
+
"type": "aws:cdk:logicalId",
|
|
88
|
+
"data": "testlambdadynamodbstackLambdaFunctionServiceRole758347A1"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"/lamddb-no-arguments/test-lambda-dynamodb-stack/LambdaFunctionServiceRole/DefaultPolicy/Resource": [
|
|
92
|
+
{
|
|
93
|
+
"type": "aws:cdk:logicalId",
|
|
94
|
+
"data": "testlambdadynamodbstackLambdaFunctionServiceRoleDefaultPolicy547FB7F4"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"/lamddb-no-arguments/test-lambda-dynamodb-stack/LambdaFunction/Resource": [
|
|
98
|
+
{
|
|
99
|
+
"type": "aws:cdk:logicalId",
|
|
100
|
+
"data": "testlambdadynamodbstackLambdaFunction5DDB3E8D"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"/lamddb-no-arguments/test-lambda-dynamodb-stack/DynamoTable/Resource": [
|
|
104
|
+
{
|
|
105
|
+
"type": "aws:cdk:logicalId",
|
|
106
|
+
"data": "testlambdadynamodbstackDynamoTable8138E93B"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"/lamddb-no-arguments/BootstrapVersion": [
|
|
110
|
+
{
|
|
111
|
+
"type": "aws:cdk:logicalId",
|
|
112
|
+
"data": "BootstrapVersion"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"/lamddb-no-arguments/CheckBootstrapVersion": [
|
|
116
|
+
{
|
|
117
|
+
"type": "aws:cdk:logicalId",
|
|
118
|
+
"data": "CheckBootstrapVersion"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"displayName": "lamddb-no-arguments"
|
|
123
|
+
},
|
|
124
|
+
"Tree": {
|
|
125
|
+
"type": "cdk:tree",
|
|
126
|
+
"properties": {
|
|
127
|
+
"file": "tree.json"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|