Changed code to use properties for Amazon S3, andt to switch target folder based on environment