根据环境将文件上载到没有Access Key的AWS S3 PHP SDK

How to upload files to S3 using php sdk without access key based on environment( Sandbox or Live )