I'm trying to use Filesystem, the implementation of league/flysystem-aws-s3-v3 with Laravel 5.1. but I can get the files from S3.
So, I coded this:
$s3 = Storage::disk('s3');
$imageName = Employee::filePath() . $employee->id . '.pdf';
if (Storage::disk('s3')->exists($imageName)) {
return response()->download(Storage::disk('s3')->get($imageName));
}
Then I get the follow error:
CredentialsException in InstanceProfileProvider.php line 79: Error retrieving credentials from the instance profile metadata server. (cURL error 28: Connection timed out after 1001 milliseconds (see http://curl.haxx.se/libcurl/c/libcurl-errors.html))
The credential are set on config/filesystems.php, I know are good because I can put files there.
Do you have any idea?
Thanks in advance.