aws ec2; ubuntu 18.04; apache2
使用aws php sdk 3.* 的SES API发邮件,出现:
Fatal error: Uncaught Aws\Exception\CredentialsException: Cannot read credentials from /.aws/credentials in /var/www/html/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php:682
找了很久发现"/.aws/credentials" 的根目录位于整个服务器的"/",而且组和用户必须都为www-data?
需要输入:
$ sudo cp -a ~/.aws /
$ sudo chown -R www-data:www-data /.aws