File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,12 @@ Parameters:
10
10
ECRRepositoryTag :
11
11
Type : String
12
12
Description : ECR repository URI
13
-
14
13
15
14
Resources :
16
15
KinesisStream :
17
16
Type : AWS::Kinesis::Stream
18
17
Properties :
19
- Name : !Sub " ${AWS::AccountId}-kinesis-stream"
18
+ Name : !Sub ${AWS::AccountId}-kinesis-stream
20
19
ShardCount : 1
21
20
22
21
LambdaExecutionRole :
@@ -43,14 +42,14 @@ Resources:
43
42
- Effect : Allow
44
43
Action :
45
44
- s3:PutObject
46
- Resource : !Sub " arn:aws:s3:::${Region}-${Environment}-fraud-detection-data/processed/*"
45
+ Resource : !Sub arn:aws:s3:::${Region}-${Environment}-fraud-detection-data/processed/*
47
46
48
47
LambdaFunction :
49
48
Type : AWS::Lambda::Function
50
49
Properties :
51
50
Role : !GetAtt LambdaExecutionRole.Arn
52
51
Code :
53
- ImageUri : !Sub " 294331937131.dkr.ecr.ca-central-1.amazonaws.com/fraud-detection/validation-lambda:${ECRRepositoryTag}"
52
+ ImageUri : !Sub 294331937131.dkr.ecr.ca-central-1.amazonaws.com/fraud-detection/validation-lambda:${ECRRepositoryTag}
54
53
PackageType : Image
55
54
56
55
LambdaPermission :
@@ -59,6 +58,16 @@ Resources:
59
58
FunctionName : !Ref LambdaFunction
60
59
Action : lambda:InvokeFunction
61
60
Principal : kinesis.amazonaws.com
61
+ SourceArn : !GetAtt KinesisStream.Arn
62
+
63
+ KinesisEventSourceMapping :
64
+ Type : AWS::Lambda::EventSourceMapping
65
+ Properties :
66
+ EventSourceArn : !GetAtt KinesisStream.Arn
67
+ FunctionName : !Ref LambdaFunction
68
+ StartingPosition : LATEST
69
+ BatchSize : 100
70
+ Enabled : true
62
71
63
72
Outputs :
64
73
KinesisStreamName :
You can’t perform that action at this time.
0 commit comments