Lab: Logging GuardDuty Findings to S3
How to export GuardDuty logs to Amazon S3
Last updated
Was this helpful?
How to export GuardDuty logs to Amazon S3
Last updated
Was this helpful?
If you're already familiar with Terraform, feel free to hop over to the to grab and deploy the code. Otherwise, stick around and we'll walk through it together!
As of this writing, AWS GuardDuty keeps a history of findings from the . Most companies will have logging standards to comply with various regulatory and compliance requirements, requiring you to store logs for a designated period, e.g., 1 year. To help comply with this standard, we can export GuardDuty findings to AWS S3 for both long-term storage and for storing more than 90 days' worth of events. Additionally, you may want the findings stored in S3 for ingesting into other platforms such as a SIEM (Security Information and Event Management) platform. Of course, integration specifics will vary by platform.
AWS GuardDuty is a paid service. Enabling related protection plans and features has an additional cost.
AWS S3 is a paid service.
AWS KMS is a paid service.
Once deployed, we can navigate in the AWS Console to GuardDuty > Settings
and under Findings export options
we should see our S3 bucket set up. Unless there are any errors here, the deployment should be successful.
Once you have some findings, head over to your S3 bucket, and you should start to see some findings trickle in. New alerts should pop in within 5 minutes, but you may just want to take a 15-20min break before checking.
Download one of the objects to explore more. Please note that these files will contain sensitive data like IP addresses, so I've redacted some information in the output below.
GuardDuty will automatically detect Kali Linux usage, so I generated some alerts by creating an IAM user, deleting S3 objects, and a bucket from a Kali Linux VM. We may look at this in an upcoming lab, but that can trigger over 100 GuardDuty alerts.