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년 전414회 조회
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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠