AWS CloudTrail is a web service that records activity made on your account and delivers log files to your Amazon S3 bucket. CloudTrail provides visibility into user activity by recording actions taken on your account .
CloudTrail records important information about each action, including who made the request, the services used, the actions performed, parameters for the actions, and the response elements returned by the AWS service. This information helps you to track changes made to your AWS resources and to troubleshoot operational issues.
Normally Account activity for the past 90 days will be collected and visible within the CloudTrail console and through the AWS CLI.
Management events :
Management events are logs of actions that are performed on or within resources in your AWS account. These are also known as control plane operations .
Data events :
Data events are logs of resource operations performed on or within a resource. These are also known as data plane operations. Additional charges apply .
You can view, filter, and download the most recent 90 days of your account activity for all management events in supported AWS services free of charge.
You can set up a trail that delivers a single copy of management events in each region free of charge. Once a CloudTrail trail is set up, Amazon S3 charges apply based on your usage. You will be charged for any data events or additional copies of management events recorded in that region.
How to configure S3 bucket for trails:
Now lets see how to configure s3 bucket to store any type of events . So you can have logs of more than 90 days when you save it in s3 bucket.
Dashboard will show like below
You can see the below the folders and logs automatically created within s3 bucket with data wise. this will be permanent logs , you can keep as long ass you want.
Your logs are ready . So simple.Good luck!