fix for s3 using env vars