rmoff's random ramblings
about talks

boto / S3 errors

Published Oct 14, 2016 by in Boto, S3, Aws, Python at https://preview.rmoff.net/2016/10/14/boto-/-s3-errors/

Presented without comment, warranty, or context - other than these might help a wandering code hacker.

When using SigV4, you must specify a ‘host’ parameter ðŸ”—

boto.s3.connection.HostRequiredError: BotoClientError: When using SigV4, you must specify a 'host' parameter.

To fix, switch

conn_s3 = boto.connect_s3()

for

conn_s3 = boto.connect_s3(host='s3.amazonaws.com')

You can see a list of endpoints here.

boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request ðŸ”—

Make sure you’re specifying the correct hostname (see above) for the bucket’s region. Determine the bucket’s region from the S3 control panel, and then use the endpoint listed here.


Robin Moffatt

Robin Moffatt works on the DevRel team at Confluent. He likes writing about himself in the third person, eating good breakfasts, and drinking good beer.

Story logo

© 2025