If the S3 bucket contains a long history of logs and its directory structure is organized by dates, it’s possible to filter which logs will be read by Wazuh. There are multiple configuration options to do so:
only_logs_after: Allows filtering logs produced after a given date. The date format must be YYYY-MMM-DD, for example, 2018-AUG-21 would filter logs produced after the 21th of August 2018 (that day included).
aws_account_id: This option will only work on CloudTrail, VPC and Config buckets. If you have logs from multiple accounts, you can filter which ones will be read by Wazuh. You can specify multiple ids separating them by commas.
regions: This option will only work on CloudTrail, VPC and Config buckets and Inspector service. If you have logs from multiple regions, you can filter which ones will be read by Wazuh. You can specify multiple regions separating them by commas.
path: If you have your logs stored in a given path, it can be specified using this option. For example, to read logs stored in directory
vpclogsneed to be specified. It can also be specified with
aws_organization_id: This option will only work on CloudTrail buckets. If you have configured an organization, you need to specify the name of the
AWSorganization by using this parameter.
aws-s3 Wazuh module only looks for new logs based upon the key for last processed log object, which includes the datetime stamp. If older logs are loaded into the S3 bucket or the
only_logs_after option date is set to a datetime earlier than previous executions of the module, the older log files will be ignored and not ingested into Wazuh.