I have the exact same issue as Executing AWS CLI command from php results in Unable to locate credentials
I did:
cd ~/.aws
mv config credentials
But it didn't help.
So what I did is, both config and credentials have the same content:
[default]
aws_access_key_id = AKIAJIPLT472C32RD6AQ
aws_secret_access_key = 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
output = json
region = ap-southeast-1
The code I'm using in my PHP file is:
$s3 = system("aws s3 cp /var/www/html/v2/upload/__rmx4hqf.png s3://<bucket>/somefolder 2>&1");
2>&1
from the end to get the error. – Jigar$s3
sovar_dump($s3)
– Jigar