Closed johnnybenson closed 1 year ago
@johnnybenson, the CRT is needed for very specific operations within the SDK. What are you trying to do with S3?
Very basic stuff, read / write binary objects to a bucket. Creds are in the environment. I was surprised too that it was asking for the CRT.
$client = new S3Client([
'region' => env('AWS_BUCKET_REGION'),
'version' => 'latest',
]);
$result = $client->getObject([
'Bucket' => env('AWS_BUCKET'),
'Key' => $key
]);
Here's the stack from my getObject call
Aws\Exception\CommonRuntimeException: AWS Common Runtime for PHP is required to use Signature V4A and multi-region access points. Please install it using the instructions found at https://github.com/aws/aws-sdk-php/blob/master/CRT_INSTRUCTIONS.md in file /var/www/html/vendor/aws/aws-sdk-php/src/Signature/S3SignatureV4.php on line 105
#0 /var/www/html/vendor/aws/aws-sdk-php/src/Signature/S3SignatureV4.php(48): Aws\Signature\S3SignatureV4->signWithV4a()
#1 /var/www/html/vendor/aws/aws-sdk-php/src/Middleware.php(126): Aws\Signature\S3SignatureV4->signRequest()
#2 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(204): Aws\Middleware::Aws\{closure}()
#3 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\Promise\Promise::callHandler()
#4 /var/www/html/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}()
#5 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(248): GuzzleHttp\Promise\TaskQueue->run()
#6 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn()
#7 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending()
#8 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList()
#9 /var/www/html/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()
#10 /var/www/html/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(58): GuzzleHttp\Promise\Promise->wait()
#11 /var/www/html/vendor/aws/aws-sdk-php/src/AwsClientTrait.php(86): Aws\AwsClient->execute()
#12 /var/www/html/app/Services/CreateS3Client.php(44): Aws\AwsClient->__call()
#13 /var/www/html/app/Services/GetChunkFromS3.php(22): App\Services\CreateS3Client->get()
Ah yes, you do need it if you're using multi region access points. Since region-less access points are a newer feature, they need to be signed with our latest signing algorithm which uses a hashing algorithm not available in PHP. If you don't want to use a multi-region access point, (you can still use an access point), you can continue without the CRT.
Either way, I'll see if I can reproduce this error and figure out what went wrong. Thanks for bringing this to our attention
Awesome thanks for the feedback and for taking a closer look!
FWIW, creating and using an access point for the bucket removed the multi-region requirement and the need to install CRT. So I'm on my way, reading and writing objects in us-east-2
😎 .
The bug report for installing CRT still stands, could not get it to progress beyond the make
step.
make: cmake: No such file or directory
Do you have cmake installed?
Cmake is required to install the package. It looks like it's missing in your environment. Please install cmake and try again.
closing due to inactivity.
Confirm by changing [ ] to [x] below to ensure that it's a bug:
Describe the bug Following the Unix instructions in the README does not work on Mac M1.
After executing
./configure
the make command failsSDK version number Checkout of
main
branch @ 3942776a8c99209908ee0b287746263725685732Platform/OS/Hardware/Device
To Reproduce (observed behavior)
Expected behavior I expected the instructions in the README to work
Logs/output See Above
REMEMBER TO SANITIZE YOUR PERSONAL INFO
Additional context I'm just trying to use the AWS PHP SDK and it appears that I can't connect to S3 without the CRT. The SDK prerequisites do not mention needing the CRT at all. It's most likely something I'm doing incorrectly, but not a lot of information for how to proceed without CRT.