You won’t get charged for bandwidth to S3, but you’ll still get charged for API calls. Consider running Cloudfront in front of S3 with an appropriate CNAME instead.
Also consider that S3’s ip address can change and many tools don’t re-resolve the IP address during runtime.
Well the IP can change, and tools like varnish / haproxy (and probably nginx) do a one-time resolution and hold on to it. Then your app fails when the IP changes.
HAProxy and Nginx can each do run time resolving. HAProxy gained this ability in 1.6 and requires certain params on the server line. Nginx will do it if you use params in the proxy_pass.
Kind of. As long as you’re in the same region the traffic stays within the AWS network even though you’re using publicly reputable IPs. The real advantage of an S3 endpoint is that you can access the service from private subnets. In this case the instance will need a route to an IGW anyway so there’s not really any benefit.
Valid. I guess where I was struggling was in a semi-private subnet, where instances were accessing the internet through a NAT instance, and when there as a ton of S3 activity, it would get totally crushed.
I’ve had trouble getting the HAProxy mode to work properly, but assuming thats something else wrong with my environment I just want to raise awareness of the IP changing behavior (and DNS permacaching) and make sure people check their tools work properly against it.