Skip to content

Commit e62b9ae

Browse files
committed
update filter criteria for dynamo delete triggers
1 parent fff88b9 commit e62b9ae

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

infrastructure/lambda-delete-doc-object.tf

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ resource "aws_lambda_event_source_mapping" "lloyd_george_dynamodb_stream" {
9595
pattern = jsonencode({
9696
"eventName" : [
9797
"REMOVE"
98-
]
98+
],
99+
userIdentity = {
100+
type = ["Service"],
101+
principalId = ["dynamodb.amazonaws.com"]
102+
}
99103
})
100104
}
101105
}
@@ -112,7 +116,11 @@ resource "aws_lambda_event_source_mapping" "document_reference_dynamodb_stream"
112116
pattern = jsonencode({
113117
"eventName" : [
114118
"REMOVE"
115-
]
119+
],
120+
userIdentity = {
121+
type = ["Service"],
122+
principalId = ["dynamodb.amazonaws.com"]
123+
}
116124
})
117125
}
118126
}

0 commit comments

Comments
 (0)