'Generating s3 access logs using AWS SDK

Problem Statement:

We have a number of s3 buckets, some of which includes PII. As part of our internal audit procedure, we need to generate a daily report outlining who has accessed these buckets if any.


Constraints:

  • This needs be done through AWS SDK (in whatever language possible)
  • important: All of our staff use AWS SSO to access the buckets

I think one solution could be enabling the access logs for these buckets and parse out the logs but I was wondering if that's a good idea or someone has a better solution in mind. Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source