php 7.4 sdk - is_readable(): open_basedir .aws/config

0

Hello we upgraded our php sdk and now we are getting the following messages. We are using IAm roles on our ec2 instances and not credentials, so we do not even have a config file setup. Why is the SDK wanting access to a config file? Is there another way to resolve these messages? I have searched around and the only thing I find is to create a config file.

php 7.4

PHP SDK 3.209

Warning: is_readable(): open_basedir restriction in effect. File(/usr/share/httpd/.aws/config) is not within the allowed path(s): (/var/www/vhosts/mysites.com:/tmp/) in /httpdocs/apps/vendor/aws/aws-sdk-php/src/Endpoint/UseFipsEndpoint/ConfigurationProvider.php on line 133

Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/httpd/.aws/config) is not within the allowed path(s): (/var/www/vhosts/mysites.com:/tmp/) in /httpdocs/apps/vendor/aws/aws-sdk-php/src/Credentials/CredentialProvider.php on line 816

已提問 2 年前檢視次數 415 次
1 個回答
0

Hello,

from which version of SDK did you update?

PHP SDK uses default credential provider chain where credentials from file (default is ~/.aws/config) are checked before credentials from role attached to instance.

Since you have open_basedir restriction and you want to get rid of that warning - you can either specify a custom (eve non-existing) config file within your allowed open_basedir path or customize credential provider.

已回答 2 年前
  • Hello, we are updating from 3.179. I failed to mention are also setting up a new instance on linux 2, and this warning started showing up.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南