AWS::CloudTrail::TrailCreates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. A maximum of five trails can exist in a region, irrespective of the region in which they were created.
17 configurable properties. 2 required. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
IsLogging | boolean | Required |
S3BucketName | string | Required |
AdvancedEventSelectors | Array<AdvancedEventSelector> | |
AggregationConfigurations | Array<AggregationConfiguration> | |
CloudWatchLogsLogGroupArn | string | |
CloudWatchLogsRoleArn | string | |
EnableLogFileValidation | boolean | |
EventSelectors | Array<EventSelector> | |
IncludeGlobalServiceEvents | boolean | |
InsightSelectors | Array<InsightSelector> | |
IsMultiRegionTrail | boolean | |
IsOrganizationTrail | boolean | |
KMSKeyId | string | |
S3KeyPrefix | string | |
SnsTopicName | string | |
Tags | Array<Tag> | |
TrailName | string | Create-only |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
Arn | string | - |
SnsTopicArn | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::CloudTrail::Trail
Resources:
MyResource:
Type: AWS::CloudTrail::Trail
Properties:
S3BucketName: "my-s3bucketname"
IsLogging: true
Tags:
- Key: Environment
Value: ProductionPermissions CloudFormation needs in your IAM role to manage this resource.
CloudTrail:GetTrailCloudTrail:GetTrailStatusCloudTrail:ListTagsCloudTrail:GetEventSelectorsCloudTrail:GetInsightSelectorsCloudTrail:GetEventConfigurationCloudTrail:DescribeTrailsCloudTrail:CreateTrailCloudTrail:StartLoggingCloudTrail:AddTagsCloudTrail:PutEventSelectorsCloudTrail:PutInsightSelectorsCloudTrail:PutEventConfigurationiam:GetRoleiam:PassRoleCloudTrail:UpdateTrailCloudTrail:StartLoggingCloudTrail:StopLoggingCloudTrail:AddTagsCloudTrail:RemoveTagsCloudTrail:PutEventSelectorsCloudTrail:PutInsightSelectorsCloudTrail:PutEventConfigurationCloudTrail:ListTrailsCloudTrail:GetTrailCloudTrail:GetTrailStatusCloudTrail:ListTagsCloudTrail:GetEventSelectorsCloudTrail:GetInsightSelectorsCloudTrail:DescribeTrailsCloudTrail:DeleteTrailOur bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to NewsletterTrailNameThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
TrailName