I made a comment on deleting version objects. After entire review, I kind of understand that you are testing s3 access. Are you writing some metrics to s3 bucket? Is there a reason for doing this?
.
Reason being any of sudden loss of connectivity to S3, permissions change, auth update, firewall or network issues, amazon outage, etc...
Not writing the metrics to S3 bucket but to datadog/influxdb for alerts consumption in that context