As a companion solution, there's also S3Empty https://pypi.org/project/s3empty/ which is a tiny CLI I wrote to handle more scenarios:
- emptying buckets with versioning enabled/disabled
- defining bucket names in a configuration file
- the configuration file can be a Jinja template with environment variables available as template variables
- allowing idempotence of multiple runs when the bucket might already be deleted
- logging progress as the objects and versions are being deleted
After the S3 bucket is emptied, the bucket can then be deleted accordingly.
Hopefully that's handy for someone.