Lazily establish S3 connections

See comments.  This fixes a corner case with some AWS configurations
using S3.