-1

We have migrated our Drupal 7 site to AWS with S3 bucket. Integrated s3 bucket with the site using s3fs module. We have made all the necessary configurations. We are having issue uploading files to private file system

We tried with each of the following as Default download method. - Amazon Simple Storage Service - Public files served from Amazon S3.
- Private files served from Amazon S3

We are receiving error the following error

Guzzle\Common\Exception\RuntimeException: Error creating resource. [message] fopen(https://xxxx.xxx.s3bucketpath/s3fs-private/XXXX.docx): failed to open stream: "DrupalRemoteStreamWrapper::stream_open" call failed [file] /var/app/current/sites/all/libraries/awssdk2/Guzzle/Stream/PhpStreamRequestFactory.php [line] 217 in Guzzle\Stream\PhpStreamRequestFactory->createResource() (line 279 of /var/app/current/sites/all/libraries/awssdk2/Guzzle/Stream/PhpStreamRequestFactory.php)

Just to add a note on this we are using file field path module for the field. This patch (https://www.drupal.org/node/2527768) seems to be for older version of File field path module

0

Check on PHP's setting for allow_url_fopen ... it's generally turned off by security-aware system administrators, which will block fopen's ability to access to resources over http(s).

0

I had an exact problem and turned out it was a firewall issue. Everytime I requested /admin/config and /admin/reports/status I always got the same error.

This error happened around the time when our company implemented our own firewall. So after pulling out all the hair, I found out that our company's firewall had its own certificate (.pem) file for in out requests. Guzzle has its own pem certificate in its resource so in the guzzlehttp/src/Guzzle/Http/Resources/cacert.pem, I appended our own certificate. and the error was gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.