Using Console
YOUR_BUCKET_NAME
with the name of your S3 bucket.Using CLI
YOUR_BUCKET_NAME
with the name of your S3 bucket.Using Python
YOUR_BUCKET_NAME
, YOUR_ACCESS_KEY
, YOUR_SECRET_KEY
, and update the region
with your desired region in the Python script. Run the script, and it will enforce the use of HTTPS for the specified S3 bucket. Make sure to install the boto3
library if you haven’t already: