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

demandé il y a 2 ans394 vues
1 réponse
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.

répondu il y a 2 ans
  • 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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions