Create a trail
Create a single-region trail:
The specified S3 bucket must already exist and have the appropriate CloudTrail permissions applied.
$ aws cloudtrail create-trail --name my-trail --s3-bucket-name my-bucket
Create a trail that applies to all regions:
$ aws cloudtrail create-trail --name my-trail --s3-bucket-name my-bucket --is-multi-region-trail Start logging
After the create-trail command completes, run the start-logging command to start logging for that trail.When you create a trail with the CloudTrail console or the create-subscription command, logging is turned on automatically.