Skip to content

Enabling GuardDuty S3 Malware Protection for S3

0

How do I enable GuardDuty Malware Protection for S3 for all S3 buckets?

When I try to configure this setting in GuardDuty it only gives me access to enter each s3 bucket manually, I have multiple accounts running GuardDuty and I believe I'm in the GuardDuty delegated administrator account, why is this not possible?

1 Answer
0

Hello.

As of August 2025, there is no way to target all S3 buckets in an account at once with GuardDuty Malware Protection for S3.
Therefore, you will need to create a shell script using AWS CLI or similar.
There is an AWS CLI command to enable GuardDuty Malware Protection for S3, so try creating a shell script using it.
https://docs.aws.amazon.com/guardduty/latest/ug/enable-malware-protection-s3-bucket.html

aws guardduty create-malware-protection-plan --role "arn:aws:iam::111122223333:role/role-name" --protected-resource "S3Bucket"={"BucketName"="amzn-s3-demo-bucket1"}
EXPERT

answered a year ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.