AWS Security ChangesHomeSearch

AWS guardduty: GuardDuty: expected S3 bucket owner verification for findings export

Service: guardduty · 2026-10-20 · Documentation medium

File: guardduty/latest/ug/guardduty_exportfindings.md · Type: authz

Summary

Adds a new section and console/CLI steps documenting the optional 'Expected bucket owner' setting for GuardDuty publishing destinations, which verifies that the specified AWS account owns the destination S3 bucket before findings are exported. Includes the new 'Verifying the Amazon S3 bucket owner' section, a note that omitting the value skips verification, and an AWS CLI example using update-publishing-destination with ExpectedBucketOwner.

Security assessment

The added text documents a confused-deputy/bucket-squatting protection: if a destination bucket is deleted, another account could recreate the same name and receive exported findings. The new ExpectedBucketOwner property makes GuardDuty verify bucket ownership before export, preventing findings from being delivered to an attacker-controlled bucket. This is preventive security guidance rather than a fix for a specific disclosed vulnerability or incident, so it is security documentation with medium severity.

Evidence

+To protect against this, you can optionally specify the expected bucket owner – the 12-digit AWS account ID of the account that owns the destination Amazon S3 bucket.

Diff

diff --git a/guardduty/latest/ug/guardduty_exportfindings.md b/guardduty/latest/ug/guardduty_exportfindings.md
index 16c6b06..5c3502e 100644
--- a//guardduty/latest/ug/guardduty_exportfindings.md
+++ b//guardduty/latest/ug/guardduty_exportfindings.md
@@ -7 +7 @@
-ConsiderationsStep 1 – Permissions required to export findingsStep 2 – Attaching policy to your KMS keyStep 3 – Attaching policy to Amazon S3 bucketStep 4 - Exporting findings to an S3 bucket (Console)Step 5 – Frequency for exporting findings
+ConsiderationsStep 1 – Permissions required to export findingsStep 2 – Attaching policy to your KMS keyStep 3 – Attaching policy to Amazon S3 bucketStep 4 - Exporting findings to an S3 bucket (Console)Verifying the Amazon S3 bucket ownerStep 5 – Frequency for exporting findings
@@ -28,0 +29,2 @@ When you configure settings to export findings to an Amazon S3 bucket, GuardDuty
+  * Verifying the Amazon S3 bucket owner
+
@@ -49,0 +52,2 @@ Before proceeding with the prerequisites and steps to export findings, consider
+  * **(Optional) Amazon S3 bucket owner verification** – You can specify the AWS account ID that you expect to own the destination Amazon S3 bucket, so that your findings aren't exported to a bucket that another account owns. We strongly recommend that you provide the expected bucket owner when possible. For more information, see Verifying the Amazon S3 bucket owner.
+
@@ -304 +308,5 @@ Before completing these steps, make sure you have attached the respective polici
-  6. ###### Attach policies
+  6. (Optional) For **Expected bucket owner** , enter the ID of the AWS account that owns the Amazon S3 bucket that you specified.
+
+We recommend that you provide this value. If you don't provide a value, GuardDuty doesn't verify the bucket owner. For more information, see Verifying the Amazon S3 bucket owner.
+
+  7. ###### Attach policies
@@ -310 +318,20 @@ Before completing these steps, make sure you have attached the respective polici
-  7. Choose **Save**.
+  8. Choose **Save**.
+
+
+
+
+## Verifying the Amazon S3 bucket owner
+
+When you configure settings to export findings, you identify the destination Amazon S3 bucket by its Amazon Resource Name (ARN). If the bucket is later deleted, another AWS account can create a new bucket that uses the same name. Your findings then continue to go to a bucket that a different account now owns.
+
+To protect against this, you can optionally specify the expected bucket owner – the 12-digit AWS account ID of the account that owns the destination Amazon S3 bucket. When you provide this value, GuardDuty verifies that the specified account owns the bucket before it exports findings. If the account ID doesn't match the actual owner of the bucket, GuardDuty doesn't export findings to that bucket and the publishing destination status changes to indicate that you need to fix the destination property. GuardDuty enforces this verification consistently, regardless of the AWS Region where your findings are generated.
+
+###### Note
+
+Providing the expected bucket owner is optional. If you don't specify the expected bucket owner, GuardDuty doesn't perform this verification and continues to export findings to the bucket that matches the destination ARN. We strongly recommend that you provide the expected bucket owner when possible.
+
+You set the expected bucket owner through the **Expected bucket owner** field on the GuardDuty console (see Step 4 - Exporting findings to an S3 bucket (Console)), or through the `ExpectedBucketOwner` property of `DestinationProperties` when you call the [CreatePublishingDestination](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_CreatePublishingDestination.html) or [UpdatePublishingDestination](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_UpdatePublishingDestination.html) API. The same property is returned by the [DescribePublishingDestination](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_DescribePublishingDestination.html) API.
+
+### Adding the expected bucket owner to an existing publishing destination
+
+If you already export findings to an Amazon S3 bucket, we recommend that you add the expected bucket owner to your existing publishing destination, so that your findings aren't exported to a bucket that another account creates with the same name if your bucket is ever deleted. Adding this value doesn't change where GuardDuty exports your findings; it only adds the ownership verification described earlier.
@@ -311,0 +339 @@ Before completing these steps, make sure you have attached the respective polici
+Before you begin, make sure that the AWS CLI is installed and configured, and that you know your detector ID and the ID of the publishing destination.
@@ -312,0 +341,32 @@ Before completing these steps, make sure you have attached the respective polici
+To add the expected bucket owner by using the AWS CLI, run the `update-publishing-destination` command. Provide the current bucket ARN and AWS KMS key ARN along with the account ID that owns the bucket in `ExpectedBucketOwner`. Replace each `user input placeholder` with your own values.
+
+The following AWS CLI command adds the expected bucket owner to an existing publishing destination:
+    
+    
+    aws guardduty update-publishing-destination \
+        --detector-id 12abc34d567e8fa901bc2d34EXAMPLE \
+        --destination-id destination-id \
+        --destination-properties '{
+            "DestinationArn": "arn:aws:s3:::amzn-s3-demo-bucket",
+            "KmsKeyArn": "arn:aws:kms:us-east-1:123456789012:key/key-id",
+            "ExpectedBucketOwner": "123456789012"
+        }'
+
+In this command, replace the following values:
+
+  * `detector-id` – The ID of your GuardDuty detector.
+
+  * `destination-id` – The ID of the publishing destination.
+
+  * `DestinationArn` – The ARN of your current destination Amazon S3 bucket.
+
+  * `KmsKeyArn` – The ARN of the KMS key that GuardDuty uses to encrypt findings.
+
+  * `ExpectedBucketOwner` – The ID of the AWS account that owns the bucket.
+
+
+
+
+To find the `detectorId` for your account and current Region, see the **Settings** page in the [https://console.aws.amazon.com/guardduty/](https://console.aws.amazon.com/guardduty/) console, or run the [ListDetectors](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListDetectors.html) API. To find the `destination-id`, run the [ListPublishingDestinations](https://docs.aws.amazon.com/guardduty/latest/APIReference/API_ListPublishingDestinations.html) API.
+
+###### Note
@@ -313,0 +374 @@ Before completing these steps, make sure you have attached the respective polici
+If you omit `ExpectedBucketOwner` (or pass an empty value) in an `UpdatePublishingDestination` request, GuardDuty keeps the previously configured value. To change it, provide the new 12-digit AWS account ID.