AWS SDK for PHPを使ってS3にファイルをアップロードしようとした際に下記のようなエラーが出ました。
AWS Error Message: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint: "sub.domain.com.s3.amazonaws.com".
結論から言うとRegionを使用しているものに変更することで解決できました。
(デフォルトではUS Regionらしいです。)
以下のように設定します。
$s3 = S3Client::factory(array(
'region' => 'ap-northeast-1'
));