When I access the HTML uploaded by boto3, which is a library for playing with aws, it becomes a file download.
import boto3
s3 = boto3.resource('s3')
s3.Bucket(<<bucket_name>>).upload_file(
'file name',
'file name',
ExtraArgs={'ContentType': 'text/html', 'ACL': 'public-read'})
Specify ContentType text / html with ExtraArgs.