Fix the S3 endpoint, as Amazon now issues a 301 if you use
s3.amazonaws.com/foobucket instead of foobucket.s3.amazonaws.com.