in detection-ml-wksp/aws_lambda/cloudtrail_ingest.py [0:0]
def print_short_record(record):
"""
Prints out an abbreviated, one-line representation of a CloudTrail record.
:param record: a CloudTrail record
"""
print('[{timestamp}] {region}\t{ip}\t{service}:{action}'.format(
timestamp=record['eventTime'],
region=record['awsRegion'],
ip=record['sourceIPAddress'],
service=record['eventSource'].split('.')[0],
action=record['eventName']
))