require 'vendor/autoload.php'; use Aws\S3\S3Client; $client = new S3Client([ 'region' => 'us-west-2', 'version' => 'latest', 'credentials' => [ 'key' => 'your_access_key', 'secret' => 'your_secret_key', ], ]); $objects = $client->listObjects([ 'Bucket' => 'your_bucket_name', ]); foreach ($objects['Contents'] as $object) { echo $object['Key'] . "\n"; }In this example, we first load the AWS SDK for PHP library using the `require` statement. Then, we create a new S3Client object and pass in the necessary configuration options. We use the `listObjects` function to fetch the list of objects from the specified bucket, and then iterate over them to print out their keys. The AWS SDK for PHP library provides a convenient way to work with AWS services in PHP. Other package libraries that can be used to work with Amazon S3 in PHP include `flysystem-aws-s3-v3`, `league/flysystem-aws-s3-v3`, and `aws/aws-sdk-php`.