K. Kaiser
K. Kaiser

Reputation: 31

How do I know what version of the AWS PHP SDK I have?

We have updated our web site to PHP 8.2 and now the AWS SDK is throwing errors. I am not sure where to look in the files to figure out what version of the SDK I have installed. And it is very unclear which PHP version I can use with the SDK - does the most recent version work in PHP 8.2 at all?

My development site which is still on PHP 7.4 works but on PHP 8.2 I get

Error thrown Unknown named parameter $instance

$credentials = new Aws\Credentials\Credentials('XXXXXXXXXXXXXXXXXXX', 'YYYYYYYYYYYYYYYYYYYY');

$client = new Aws\S3\S3Client([
'version'     => 'latest',
'region'      => 'us-east-1',
'credentials' => $credentials
]);

and I have opened several of the SDK files to try to find a version or something.

And I don't know if I update to the latest SDK - will it work with 8.2?

Upvotes: 0

Views: 1276

Answers (2)

user3411746
user3411746

Reputation: 165

The latest aws/aws-sdk-php (3.278.1) works well with php 8.2. You will maybe have to update your code according to the latest php and sdk modifications.

Upvotes: 0

DevvyDev
DevvyDev

Reputation: 21

assuming you installed with composer use this

composer show aws/aws-sdk-php

Upvotes: 2

Related Questions