Let say some S3 bucket are shared across different website environment (QA / STAGE / PROD) or different Drupal Web sites, and these Bucket may contain files with different permission (Some web site instance doesn't have access to same buckets / files), when clear the cache via CLI drush command an exception is flagged, and the cache is not cleared, also the ../admin/config as well as some other admin pages may not be accessible with error : (The website encountered an unexpected error. Please try again later.)
In the Recent log messages we can see :
Aws\Exception\CredentialsException: Error retrieving credentials from the instance profile metadata service. (cURL error 28: Connection timed out after 1001 milliseconds (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)) in Aws\Credentials\InstanceProfileProvider->handleRetryableException() (line 242 of /var/www/html/drupals3/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php).
It's clear that the Exception is not correctly escalated via the vendor Aws\S3\Exception\S3Exception class
This happen especially on Drupal\flysystem_s3\Flysystem\S3->ensure()
Once installed and credential S3 set :
1 - go to your s3 Storage and make the some folder / files pivate
2 - try to clear cache with drush
3- or navigate to the /admin/config
The drush command bring an exception, and in the /admin/config will see an error message
Seems that the vendor Aws\S3\Exception\S3Exception is not correctly implemented, Use default PHP Exception instead, also once default exception used we have to exit the execution with an empty array
Will find a patch attached to this feed
Closed: outdated
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.