- Newest
- Most votes
- Most comments
To my knowledge there is no limitation, while creating cloudtrail via cloudformation. I'd suggest you to use the cloufromation template as sample from here and adjust it based on your requirement. This does have almost all the options included.
As far as eventbridge and event rules are talked about, yes for all data events, if you want to use event rules then cloudtrail needs to be setup since cloudtrail doesn't log data events by default. If there is a requirement to monitor or have a trigger based on management event only, then creating a trail in cloudtrail is not needed since those management event are logged by default and can be captured in event rules just by creating rules and specifying pattern in it.
Hope you find this helpful.
Reference:
Amazon EventBridge setup and prerequisites
========>>Edit
Anything that's related to configuration, eg: modify IAM role, create lambda function, RDS cluster, create log group etc. are management event. Common example for data events is accessing files from Amazon s3.
Here are the options, that you can exclude to reduce cloudtrail over all cost:
- Exclude CloudWatch Logs in cloudtrail (keep Enabled check box unchecked)
- If requirement is only for data events, then keep data events in it, cloudtrail by default logs management event and keeps it for 90 days, which can be used by event rules. You should include management event while creating trail only if you want to keep history of management events beyond 90 days(cloudtrail default retention period, which can't be adjusted)
- Record management event in the new trail, only when it's truly required to keep history beyond 90 days as first delivery of each management event for an account is free and you wouldn't want to pay for that if retention is not required.
- Avoid any possibility of duplicate trails, as it goes high in cost
- Keep "Exclude AWS KMS events", "Exclude Amazon RDS Data API events" unchecked if really not required as those API calls would be a lot if s3 buckets in your account are KMS key encrypted and same for RDS data API as well.
- Setup budget, which would alert you if your cost goes above the defined threshold
Refer Managing CloudTrail costs for more information and details.
If you have any additional questions, feel free to comment. Happy to help.
Relevant content
- asked a year ago
- asked 6 months ago
- asked 3 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
@Abhishek_At_AWS Thanks for your input. How can I know which events are "management events"?
Also, my main question was about the minimal part of the Trail setup? How can I get a Trail, with least number of events possible, to reduce billing? Given that I don't need to trail anything, but I want to get all of the events in EB.
Anything that's related to configuration, eg: modify IAM role, create lambda function, RDS cluster, create log group etc. are management event. Common example for data events is accessing files from Amazon s3.
Here are the options, that you can exclude to reduce cloudtrail over all cost:
If you have any additional questions, feel free to comment. Happy to help.
I've updated my answer in EDIT section.
Hi,
Do you have any additional questions, happy to help.