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.
Anyone knows why port 80 is not working ? How can I access S3 bucket through HTTP?
Thanks
CodePudding user response:
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.