changed code to read S3 bucket name from env