- Newest
- Most votes
- Most comments
To successfully export GuardDuty findings to an S3 bucket in an AWS Organization setup, there are a few key points to consider and adjust in your configuration:
-
Ensure that the S3 bucket and KMS key are in the same region as the GuardDuty detector you're configuring for export.
-
The KMS key policy needs to grant GuardDuty permission to use the key for encryption. Your current policy only allows the GenerateDataKey action, which may not be sufficient. Add the following actions to the KMS key policy:
"kms:Encrypt", "kms:Decrypt", "kms:ReEncrypt*", "kms:GenerateDataKey*", "kms:DescribeKey"
-
In the S3 bucket policy, make sure you're granting permissions to the GuardDuty service principal from all relevant AWS regions. You can do this by using a wildcard in the Principal section:
"Principal": { "Service": "guardduty.*.amazonaws.com" }
-
When setting up the publishing destination, ensure you're using the correct ARNs for both the S3 bucket and the KMS key. These should be from Account B (the delegated administrator account) if that's where you've created these resources.
-
If you're setting up the publishing destination from Account A (the organization's management account), make sure it has the necessary permissions to access the S3 bucket and KMS key in Account B. You might need to add cross-account permissions to both the S3 bucket and KMS key policies.
-
Double-check that the org ID used in the condition statements of both policies is correct and matches your AWS Organization ID.
-
Ensure that the GuardDuty service-linked role has been created in all relevant accounts. This role is usually created automatically when GuardDuty is enabled, but it's worth verifying.
If you've implemented these changes and are still encountering issues, you may need to review the IAM permissions of the entity (user or role) that's attempting to create the publishing destination. Ensure it has the necessary permissions to perform this action across accounts in your organization.
Remember, when working with cross-account setups, it can sometimes take a few minutes for permission changes to propagate. If you've made changes, wait a short while and try the operation again.
Sources
Exporting generated GuardDuty findings to Amazon S3 buckets - Amazon GuardDuty
Exporting findings to Amazon S3 - access error - Amazon GuardDuty
How to Integrate Amazon GuardDuty Findings with On-Premises Splunk | AWS re:Post
Code repository for AWS SRA examples - AWS Prescriptive Guidance
Relevant content
- AWS OFFICIALUpdated 3 years ago
