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年前413ビュー
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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ