Add S3 bucket utilities

Utilities for uploading files to S3 buckets. Part of #868.
Do we test this exception handling anywhere?