The blog post AWS S3 Denial of Wallet amplification attack | by Ben Liesfeld | Feb, 2024 | Limbus News mentions:
You could monitor HTTP API requests to your S3 buckets which is
possible with a delay of a few hours. If you see an unusually high
amount of API requests, you could prohibit access to the resource.
How do I monitor HTTP API requests to S3?
2
Answers
You can achieve this using server access logging of AWS S3 service following below steps.
enable access logging.
properties and click "Edit"
Then, specify the target bucket where you want to store the access
logs. You can choose an existing bucket or create a new one.
role that has write access to the target bucket.
format is commonly used, but you can customize it if necessary.
The format of the logs will be as per below by default. Its a typical access log which any webserver captures.
Hope this helps.
As mentioned in a previous answer, S3 Server Access Logging will allow this data to be captured. To add to this, if your bucket is public the best practice would be to front the S3 bucket with Cloudfront, create a OAI to only allow access to this bucket via Cloudfront and put a WAF infront of your cloudfront distribution. The WAF is more real-time and has intelligent rules that can help thwart a Denial of Wallet attack.