I was recently using the metrics under the management tab in the aws s3 console and notices that for a few of my buckets the NumberOfObjects (count / day) graph seemed to be way off. I had roughly 50 objects in each of these buckets and it was displaying over 100.
After some cli commands, I was able to get close to determining this number. Adding number of objects currently displayed + versions + deleted objects + parts of multipart uploads I was able to get consistently to the number displayed - 2.
For example, for two of my buckets: Bucket #1 displayed 186 objects in the cloudwatch metrics, however the console only showed 44 objects. There were 9 delete markers, 8 previous versions, and one multi-part 123 part upload. 44 + 9 + 8 + 123 = 184. Bucket #2 displayed 78 objects in the cloudwatch metrics. Console showed 8, with 22 previous versions, 8 delete markers, and one 38 part upload. 8 + 22 + 8 + 38 = 76.
This is the case for more than just these two buckets. What counts as an object in the s3 cloudwatch metrics? Am I on to something with my initial calculations or is this just a very unlikely coincidence?