in source/CRRMonitorTrailAlarm/CRRMonitorTrailAlarm.py [0:0]
def create_trail(trail_name, trail_log_bucket):
print('Create Trail: ')
try:
response = client['cloudtrail']['handle'].create_trail(
Name=trail_name,
S3BucketName=trail_log_bucket,
IncludeGlobalServiceEvents=True,
IsMultiRegionTrail=True,
EnableLogFileValidation=True
)
## Start Logging
client['cloudtrail']['handle'].start_logging(
Name=response['TrailARN']
)
except Exception as e:
print(e)
print('Create Trail')
raise e