Content-Type
isn’t custom metadata, which is what Metadata
is used for. It has its own property which can be set like this:
bucket.put_object(Key='index.html', Body=data, ContentType="text/html")
Note: .put_object()
can set more than just Content-Type
. Check out the Boto3 documentation for the rest.