Skip to content

Commit cf03ae3

Browse files
author
Nils
authored
Update lambda_function.py
1 parent 92e20a3 commit cf03ae3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Log/lambda_function.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ def parse_event_source(event, key):
219219
return "kinesis"
220220
if "awslog" in event:
221221
return "cloudwatch"
222-
if "s3" in event:
223-
return "s3"
222+
if "Records" in event and len(event["Records"]) > 0:
223+
if "s3" in event["Records"][0]:
224+
return "s3"
224225
return "aws"

0 commit comments

Comments
 (0)