@aws-solutions-constructs/aws-lambda-kinesisstreams 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.lamkin-existingLambda.js +5 -2
- package/test/integ.lamkin-existingLambda.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.assets.json +32 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/lamkin-existingLambda.template.json +229 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/lamkinexistingLambdaIntegDefaultTestDeployAssertD62E9419.assets.json +19 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/lamkinexistingLambdaIntegDefaultTestDeployAssertD62E9419.template.json +36 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/manifest.json +143 -0
- package/test/integ.lamkin-existingLambda.js.snapshot/tree.json +412 -0
- package/test/integ.lamkin-existingStream.js +5 -2
- package/test/integ.lamkin-existingStream.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-existingStream.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-existingStream.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.assets.json +32 -0
- package/test/integ.lamkin-existingStream.js.snapshot/lamkin-existingStream.template.json +231 -0
- package/test/integ.lamkin-existingStream.js.snapshot/lamkinexistingStreamIntegDefaultTestDeployAssert2681B9A2.assets.json +19 -0
- package/test/integ.lamkin-existingStream.js.snapshot/lamkinexistingStreamIntegDefaultTestDeployAssert2681B9A2.template.json +36 -0
- package/test/integ.lamkin-existingStream.js.snapshot/manifest.json +143 -0
- package/test/integ.lamkin-existingStream.js.snapshot/tree.json +414 -0
- package/test/integ.lamkin-existingStreamWithCmk.js +5 -2
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.assets.json +32 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkin-existingStreamWithCmk.template.json +285 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkinexistingStreamWithCmkIntegDefaultTestDeployAssert6EDF4045.assets.json +19 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/lamkinexistingStreamWithCmkIntegDefaultTestDeployAssert6EDF4045.template.json +36 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/manifest.json +149 -0
- package/test/integ.lamkin-existingStreamWithCmk.js.snapshot/tree.json +484 -0
- package/test/integ.lamkin-existingVpc.js +6 -2
- package/test/integ.lamkin-existingVpc.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.assets.json +45 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/lamkin-existingVpc.template.json +1040 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/lamkinexistingVpcIntegDefaultTestDeployAssertB97E47BA.assets.json +19 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/lamkinexistingVpcIntegDefaultTestDeployAssertB97E47BA.template.json +36 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/manifest.json +341 -0
- package/test/integ.lamkin-existingVpc.js.snapshot/tree.json +1463 -0
- package/test/integ.lamkin-newStreamFromProps.js +5 -2
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.assets.json +32 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.template.json +231 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.assets.json +19 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.template.json +36 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/manifest.json +143 -0
- package/test/integ.lamkin-newStreamFromProps.js.snapshot/tree.json +414 -0
- package/test/integ.lamkin-newVpc.js +6 -2
- package/test/integ.lamkin-newVpc.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-newVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
- package/test/integ.lamkin-newVpc.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
- package/test/integ.lamkin-newVpc.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-newVpc.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.assets.json +45 -0
- package/test/integ.lamkin-newVpc.js.snapshot/lamkin-newVpc.template.json +756 -0
- package/test/integ.lamkin-newVpc.js.snapshot/lamkinnewVpcIntegDefaultTestDeployAssert16AC3D59.assets.json +19 -0
- package/test/integ.lamkin-newVpc.js.snapshot/lamkinnewVpcIntegDefaultTestDeployAssert16AC3D59.template.json +36 -0
- package/test/integ.lamkin-newVpc.js.snapshot/manifest.json +245 -0
- package/test/integ.lamkin-newVpc.js.snapshot/tree.json +1051 -0
- package/test/integ.lamkin-newVpcFromProps.js +6 -2
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/__entrypoint__.js +1 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/asset.dd5711540f04e06aa955d7f4862fc04e8cdea464cb590dae91ed2976bb78098e/index.js +1 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.assets.json +45 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkin-newVpcFromProps.template.json +692 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkinnewVpcFromPropsIntegDefaultTestDeployAssert95FE0487.assets.json +19 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/lamkinnewVpcFromPropsIntegDefaultTestDeployAssert95FE0487.template.json +36 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/manifest.json +227 -0
- package/test/integ.lamkin-newVpcFromProps.js.snapshot/tree.json +946 -0
- package/test/integ.lamkin-noArguments.js +5 -2
- package/test/integ.lamkin-noArguments.js.snapshot/asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf/index.mjs +15 -0
- package/test/integ.lamkin-noArguments.js.snapshot/cdk.out +1 -0
- package/test/integ.lamkin-noArguments.js.snapshot/integ.json +12 -0
- package/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.assets.json +32 -0
- package/test/integ.lamkin-noArguments.js.snapshot/lamkin-noArguments.template.json +229 -0
- package/test/integ.lamkin-noArguments.js.snapshot/lamkinnoArgumentsIntegDefaultTestDeployAssertC0CED4B2.assets.json +19 -0
- package/test/integ.lamkin-noArguments.js.snapshot/lamkinnoArgumentsIntegDefaultTestDeployAssertC0CED4B2.template.json +36 -0
- package/test/integ.lamkin-noArguments.js.snapshot/manifest.json +143 -0
- package/test/integ.lamkin-noArguments.js.snapshot/tree.json +412 -0
- package/test/integ.lamkin-existingLambda.expected.json +0 -229
- package/test/integ.lamkin-existingStream.expected.json +0 -231
- package/test/integ.lamkin-existingStreamWithCmk.expected.json +0 -297
- package/test/integ.lamkin-existingVpc.expected.json +0 -1065
- package/test/integ.lamkin-newStreamFromProps.expected.json +0 -231
- package/test/integ.lamkin-newVpc.expected.json +0 -671
- package/test/integ.lamkin-newVpcFromProps.expected.json +0 -557
- package/test/integ.lamkin-noArguments.expected.json +0 -229
|
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
const aws_cdk_lib_1 = require("aws-cdk-lib");
|
|
17
17
|
const lib_1 = require("../lib");
|
|
18
18
|
const core_1 = require("@aws-solutions-constructs/core");
|
|
19
|
+
const integ_tests_alpha_1 = require("@aws-cdk/integ-tests-alpha");
|
|
19
20
|
const lambda = require("aws-cdk-lib/aws-lambda");
|
|
20
21
|
const aws_kinesis_1 = require("aws-cdk-lib/aws-kinesis");
|
|
21
22
|
const app = new aws_cdk_lib_1.App();
|
|
@@ -30,5 +31,7 @@ new lib_1.LambdaToKinesisStreams(stack, 'test-lambda-kinesisstreams', {
|
|
|
30
31
|
streamMode: aws_kinesis_1.StreamMode.ON_DEMAND
|
|
31
32
|
}
|
|
32
33
|
});
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
new integ_tests_alpha_1.IntegTest(stack, 'Integ', { testCases: [
|
|
35
|
+
stack
|
|
36
|
+
] });
|
|
37
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWcubGFta2luLW5ld1N0cmVhbUZyb21Qcm9wcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImludGVnLmxhbWtpbi1uZXdTdHJlYW1Gcm9tUHJvcHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOzs7Ozs7Ozs7OztHQVdHOztBQUVILGdCQUFnQjtBQUNoQiw2Q0FBeUM7QUFDekMsZ0NBQWdEO0FBQ2hELHlEQUF3RTtBQUN4RSxrRUFBdUQ7QUFDdkQsaURBQWlEO0FBQ2pELHlEQUFxRDtBQUVyRCxNQUFNLEdBQUcsR0FBRyxJQUFJLGlCQUFHLEVBQUUsQ0FBQztBQUN0QixNQUFNLEtBQUssR0FBRyxJQUFJLG1CQUFLLENBQUMsR0FBRyxFQUFFLDZCQUFzQixDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUM7QUFFakUsSUFBSSw0QkFBc0IsQ0FBQyxLQUFLLEVBQUUsNEJBQTRCLEVBQUU7SUFDOUQsbUJBQW1CLEVBQUU7UUFDbkIsSUFBSSxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLEdBQUcsU0FBUyxTQUFTLENBQUM7UUFDbEQsT0FBTyxFQUFFLE1BQU0sQ0FBQyxPQUFPL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ycsIHsgdGVzdENhc2VzOiBbXG4gIHN0YWNrXG5dIH0pO1xuIl19
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { KinesisClient, PutRecordCommand } from "@aws-sdk/client-kinesis";
|
|
2
|
+
|
|
3
|
+
const kinesis = new KinesisClient({ region: process.env.REGION });
|
|
4
|
+
const streamName = process.env.KINESIS_DATASTREAM_NAME;
|
|
5
|
+
|
|
6
|
+
export const handler = async(event) => {
|
|
7
|
+
|
|
8
|
+
const result = await kinesis.send(new PutRecordCommand({
|
|
9
|
+
StreamName: streamName,
|
|
10
|
+
Data: Buffer.from('hello from solutions constructs'),
|
|
11
|
+
PartitionKey: '1'
|
|
12
|
+
}));
|
|
13
|
+
|
|
14
|
+
console.log(JSON.stringify(result));
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"36.0.0"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"testCases": {
|
|
4
|
+
"lamkin-newStreamFromProps/Integ/DefaultTest": {
|
|
5
|
+
"stacks": [
|
|
6
|
+
"lamkin-newStreamFromProps"
|
|
7
|
+
],
|
|
8
|
+
"assertionStack": "lamkin-newStreamFromProps/Integ/DefaultTest/DeployAssert",
|
|
9
|
+
"assertionStackName": "lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.assets.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"files": {
|
|
4
|
+
"c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf": {
|
|
5
|
+
"source": {
|
|
6
|
+
"path": "asset.c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf",
|
|
7
|
+
"packaging": "zip"
|
|
8
|
+
},
|
|
9
|
+
"destinations": {
|
|
10
|
+
"current_account-current_region": {
|
|
11
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
12
|
+
"objectKey": "c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf.zip",
|
|
13
|
+
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"4a6cb8f6791436c58f355359b4d88b8d06c2e9e157daffcbb057e1cb10663dd6": {
|
|
18
|
+
"source": {
|
|
19
|
+
"path": "lamkin-newStreamFromProps.template.json",
|
|
20
|
+
"packaging": "file"
|
|
21
|
+
},
|
|
22
|
+
"destinations": {
|
|
23
|
+
"current_account-current_region": {
|
|
24
|
+
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
|
|
25
|
+
"objectKey": "4a6cb8f6791436c58f355359b4d88b8d06c2e9e157daffcbb057e1cb10663dd6.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
|
+
}
|
package/test/integ.lamkin-newStreamFromProps.js.snapshot/lamkin-newStreamFromProps.template.json
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Resources": {
|
|
3
|
+
"testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3": {
|
|
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
|
+
"testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043": {
|
|
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
|
+
"kinesis:ListShards",
|
|
74
|
+
"kinesis:PutRecord",
|
|
75
|
+
"kinesis:PutRecords"
|
|
76
|
+
],
|
|
77
|
+
"Effect": "Allow",
|
|
78
|
+
"Resource": {
|
|
79
|
+
"Fn::GetAtt": [
|
|
80
|
+
"testlambdakinesisstreamsKinesisStream11A82116",
|
|
81
|
+
"Arn"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"Version": "2012-10-17"
|
|
87
|
+
},
|
|
88
|
+
"PolicyName": "testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043",
|
|
89
|
+
"Roles": [
|
|
90
|
+
{
|
|
91
|
+
"Ref": "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"Metadata": {
|
|
96
|
+
"cfn_nag": {
|
|
97
|
+
"rules_to_suppress": [
|
|
98
|
+
{
|
|
99
|
+
"id": "W12",
|
|
100
|
+
"reason": "Lambda needs the following minimum required permissions to send trace data to X-Ray and access ENIs in a VPC."
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"testlambdakinesisstreamsLambdaFunction4348B6E4": {
|
|
107
|
+
"Type": "AWS::Lambda::Function",
|
|
108
|
+
"Properties": {
|
|
109
|
+
"Code": {
|
|
110
|
+
"S3Bucket": {
|
|
111
|
+
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
|
|
112
|
+
},
|
|
113
|
+
"S3Key": "c7dc0cc1b24bda1d2a5345f61897eee32184906649fdb1de93853c512e129dbf.zip"
|
|
114
|
+
},
|
|
115
|
+
"Environment": {
|
|
116
|
+
"Variables": {
|
|
117
|
+
"KINESIS_DATASTREAM_NAME": {
|
|
118
|
+
"Ref": "testlambdakinesisstreamsKinesisStream11A82116"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"Handler": "index.handler",
|
|
123
|
+
"Role": {
|
|
124
|
+
"Fn::GetAtt": [
|
|
125
|
+
"testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3",
|
|
126
|
+
"Arn"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
"Runtime": "nodejs18.x",
|
|
130
|
+
"TracingConfig": {
|
|
131
|
+
"Mode": "Active"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"DependsOn": [
|
|
135
|
+
"testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043",
|
|
136
|
+
"testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3"
|
|
137
|
+
],
|
|
138
|
+
"Metadata": {
|
|
139
|
+
"cfn_nag": {
|
|
140
|
+
"rules_to_suppress": [
|
|
141
|
+
{
|
|
142
|
+
"id": "W58",
|
|
143
|
+
"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."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "W89",
|
|
147
|
+
"reason": "This is not a rule for the general case, just for specific use cases/industries"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "W92",
|
|
151
|
+
"reason": "Impossible for us to define the correct concurrency for clients"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"testlambdakinesisstreamsKinesisStream11A82116": {
|
|
158
|
+
"Type": "AWS::Kinesis::Stream",
|
|
159
|
+
"Properties": {
|
|
160
|
+
"RetentionPeriodHours": 24,
|
|
161
|
+
"StreamEncryption": {
|
|
162
|
+
"EncryptionType": "KMS",
|
|
163
|
+
"KeyId": "alias/aws/kinesis"
|
|
164
|
+
},
|
|
165
|
+
"StreamModeDetails": {
|
|
166
|
+
"StreamMode": "ON_DEMAND"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"testlambdakinesisstreamsKinesisStreamGetRecordsIteratorAgeAlarmC4A0FF00": {
|
|
171
|
+
"Type": "AWS::CloudWatch::Alarm",
|
|
172
|
+
"Properties": {
|
|
173
|
+
"AlarmDescription": "Consumer Record Processing Falling Behind, there is risk for data loss due to record expiration.",
|
|
174
|
+
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
|
|
175
|
+
"EvaluationPeriods": 1,
|
|
176
|
+
"MetricName": "GetRecords.IteratorAgeMilliseconds",
|
|
177
|
+
"Namespace": "AWS/Kinesis",
|
|
178
|
+
"Period": 300,
|
|
179
|
+
"Statistic": "Maximum",
|
|
180
|
+
"Threshold": 43200000
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"testlambdakinesisstreamsKinesisStreamReadProvisionedThroughputExceededAlarm9732E188": {
|
|
184
|
+
"Type": "AWS::CloudWatch::Alarm",
|
|
185
|
+
"Properties": {
|
|
186
|
+
"AlarmDescription": "Consumer Application is Reading at a Slower Rate Than Expected.",
|
|
187
|
+
"ComparisonOperator": "GreaterThanThreshold",
|
|
188
|
+
"EvaluationPeriods": 1,
|
|
189
|
+
"MetricName": "ReadProvisionedThroughputExceeded",
|
|
190
|
+
"Namespace": "AWS/Kinesis",
|
|
191
|
+
"Period": 300,
|
|
192
|
+
"Statistic": "Average",
|
|
193
|
+
"Threshold": 0
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"Parameters": {
|
|
198
|
+
"BootstrapVersion": {
|
|
199
|
+
"Type": "AWS::SSM::Parameter::Value<String>",
|
|
200
|
+
"Default": "/cdk-bootstrap/hnb659fds/version",
|
|
201
|
+
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"Rules": {
|
|
205
|
+
"CheckBootstrapVersion": {
|
|
206
|
+
"Assertions": [
|
|
207
|
+
{
|
|
208
|
+
"Assert": {
|
|
209
|
+
"Fn::Not": [
|
|
210
|
+
{
|
|
211
|
+
"Fn::Contains": [
|
|
212
|
+
[
|
|
213
|
+
"1",
|
|
214
|
+
"2",
|
|
215
|
+
"3",
|
|
216
|
+
"4",
|
|
217
|
+
"5"
|
|
218
|
+
],
|
|
219
|
+
{
|
|
220
|
+
"Ref": "BootstrapVersion"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"files": {
|
|
4
|
+
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
|
|
5
|
+
"source": {
|
|
6
|
+
"path": "lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.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,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "36.0.0",
|
|
3
|
+
"artifacts": {
|
|
4
|
+
"lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.assets": {
|
|
5
|
+
"type": "cdk:asset-manifest",
|
|
6
|
+
"properties": {
|
|
7
|
+
"file": "lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.assets.json",
|
|
8
|
+
"requiresBootstrapStackVersion": 6,
|
|
9
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34": {
|
|
13
|
+
"type": "aws:cloudformation:stack",
|
|
14
|
+
"environment": "aws://unknown-account/unknown-region",
|
|
15
|
+
"properties": {
|
|
16
|
+
"templateFile": "lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.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
|
+
"lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.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
|
+
"lamkinnewStreamFromPropsIntegDefaultTestDeployAssertC2946F34.assets"
|
|
35
|
+
],
|
|
36
|
+
"metadata": {
|
|
37
|
+
"/lamkin-newStreamFromProps/Integ/DefaultTest/DeployAssert/BootstrapVersion": [
|
|
38
|
+
{
|
|
39
|
+
"type": "aws:cdk:logicalId",
|
|
40
|
+
"data": "BootstrapVersion"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"/lamkin-newStreamFromProps/Integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
|
|
44
|
+
{
|
|
45
|
+
"type": "aws:cdk:logicalId",
|
|
46
|
+
"data": "CheckBootstrapVersion"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"displayName": "lamkin-newStreamFromProps/Integ/DefaultTest/DeployAssert"
|
|
51
|
+
},
|
|
52
|
+
"lamkin-newStreamFromProps.assets": {
|
|
53
|
+
"type": "cdk:asset-manifest",
|
|
54
|
+
"properties": {
|
|
55
|
+
"file": "lamkin-newStreamFromProps.assets.json",
|
|
56
|
+
"requiresBootstrapStackVersion": 6,
|
|
57
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"lamkin-newStreamFromProps": {
|
|
61
|
+
"type": "aws:cloudformation:stack",
|
|
62
|
+
"environment": "aws://unknown-account/unknown-region",
|
|
63
|
+
"properties": {
|
|
64
|
+
"templateFile": "lamkin-newStreamFromProps.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}/4a6cb8f6791436c58f355359b4d88b8d06c2e9e157daffcbb057e1cb10663dd6.json",
|
|
70
|
+
"requiresBootstrapStackVersion": 6,
|
|
71
|
+
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
|
|
72
|
+
"additionalDependencies": [
|
|
73
|
+
"lamkin-newStreamFromProps.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
|
+
"lamkin-newStreamFromProps.assets"
|
|
83
|
+
],
|
|
84
|
+
"metadata": {
|
|
85
|
+
"/lamkin-newStreamFromProps/test-lambda-kinesisstreams/LambdaFunctionServiceRole/Resource": [
|
|
86
|
+
{
|
|
87
|
+
"type": "aws:cdk:logicalId",
|
|
88
|
+
"data": "testlambdakinesisstreamsLambdaFunctionServiceRole95206CF3"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"/lamkin-newStreamFromProps/test-lambda-kinesisstreams/LambdaFunctionServiceRole/DefaultPolicy/Resource": [
|
|
92
|
+
{
|
|
93
|
+
"type": "aws:cdk:logicalId",
|
|
94
|
+
"data": "testlambdakinesisstreamsLambdaFunctionServiceRoleDefaultPolicyED972043"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"/lamkin-newStreamFromProps/test-lambda-kinesisstreams/LambdaFunction/Resource": [
|
|
98
|
+
{
|
|
99
|
+
"type": "aws:cdk:logicalId",
|
|
100
|
+
"data": "testlambdakinesisstreamsLambdaFunction4348B6E4"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"/lamkin-newStreamFromProps/test-lambda-kinesisstreams/KinesisStream/Resource": [
|
|
104
|
+
{
|
|
105
|
+
"type": "aws:cdk:logicalId",
|
|
106
|
+
"data": "testlambdakinesisstreamsKinesisStream11A82116"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"/lamkin-newStreamFromProps/test-lambda-kinesisstreams/KinesisStreamGetRecordsIteratorAgeAlarm/Resource": [
|
|
110
|
+
{
|
|
111
|
+
"type": "aws:cdk:logicalId",
|
|
112
|
+
"data": "testlambdakinesisstreamsKinesisStreamGetRecordsIteratorAgeAlarmC4A0FF00"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"/lamkin-newStreamFromProps/test-lambda-kinesisstreams/KinesisStreamReadProvisionedThroughputExceededAlarm/Resource": [
|
|
116
|
+
{
|
|
117
|
+
"type": "aws:cdk:logicalId",
|
|
118
|
+
"data": "testlambdakinesisstreamsKinesisStreamReadProvisionedThroughputExceededAlarm9732E188"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"/lamkin-newStreamFromProps/BootstrapVersion": [
|
|
122
|
+
{
|
|
123
|
+
"type": "aws:cdk:logicalId",
|
|
124
|
+
"data": "BootstrapVersion"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"/lamkin-newStreamFromProps/CheckBootstrapVersion": [
|
|
128
|
+
{
|
|
129
|
+
"type": "aws:cdk:logicalId",
|
|
130
|
+
"data": "CheckBootstrapVersion"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"displayName": "lamkin-newStreamFromProps"
|
|
135
|
+
},
|
|
136
|
+
"Tree": {
|
|
137
|
+
"type": "cdk:tree",
|
|
138
|
+
"properties": {
|
|
139
|
+
"file": "tree.json"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|