Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access S3 bucket through HTTP?

I have an EC2 instance in public subnet with default NACL and try to connect to S3 bucket through internet. My EC2 has a IAM role that allows access to this S3 bucket. S3 bucket has no bucket policies.

I want to connect to this S3 through HTTP, not HTTPS (for testing purposes). To do that, I changed outbound rule for security group to accept only 80 port.

When I try to access this S3, the request gets stuck.

When I change outbound rule for security group to accept only 443 port, the connection works.

enter image description here

Anyone knows why port 80 is not working ? How can I access S3 bucket through HTTP?

like image 474
jtcnw Avatar asked Sep 16 '25 17:09

jtcnw


1 Answers

If I understand your question, you'll want something like:

aws --endpoint-url http://s3.us-west-1.amazonaws.com s3 ls s3://your-bucket

Where the endpoint URL comes from the Amazon S3 endpoints on this page. All AWS cli commands default to HTTPS. You must specify the endpoint to switch to HTTP.

like image 132
stdunbar Avatar answered Sep 18 '25 08:09

stdunbar