apache - AWS SDK PHP .aws/credentials configuration -
i have web application have built , using aws sdk php , pull of credentials in external config file located within /etc/aws/creds.php (returns php array of param values). works fine default php.ini settings (being loose , open). begin locking things down struggling error:
php fatal error: uncaught exception 'aws\common\exception instanceprofilecredentialsexception' message 'error retrieving credentials instance profile metadata server. when not running inside of amazon ec2, must provide aws access key id , secret access key in "key" , "secret" options when creating client or provide instantiated aws\common\credentials credentialsinterface object.
this gets picked in /var/log/httpd/error_log. documentation on aws sdk api says have use .aws/credentials file given user. user http (for apache) , home directory /srv/http/. cannot put credentials in file publicly available on site.
the question have how change location credentials file? need change location credentials file can resolve error, can tighten php.ini display_errors = off scripts work , securely. (note: know single php.ini change isn't holy grail security 1 thing hanging ability entirely lock down php.ini config).
Comments
Post a Comment