マガジンのカバー画像

SEのメモ

6
運営しているクリエイター

#仕事

【AWS CLI】PHPのexec();を使うとAWS CLIのcredentialsがnot foundになるときの対処方法

状況PHPの関数exec();で --profile を使用したACLコマンドを実行すると
The config profile (profile_name) could not be found
つまり、credentials がないよ!って怒られる。
さらに、第三引数のコマンドのステータスは255が出力される(エラー)

<?php// コマンドを変数に格納$cmd = 'aws s3 ls

もっとみる