Use settings for AWS credentials when connecting to S3, if provided

@feanil