checking if S3 alias is defined first