I'm using the official PHP SDK repository for AWS https://github.com/aws/aws-sdk-php
Everything works fine but I would like to know if I can access my objects directly, I would like to use it in this way:
require './start.php';
$bucket = 'cdn';
$query = $this->db->query("SELECT 'art' FROM ...");
while($row = $query->fetch_assoc()) {
$rows[] = $row;
}
foreach($rows as $row) {
$result = $s3->getObject(array(
'Bucket' => $bucket,
'Key' => 'uploads/media'. '/' .$row['art']
));
}
shell_exec('montage '.$result.' /var/www/html/out.jpg');
So basically the query select some images, it gets from S3, and those images are assembled together with Image Magick in a single JPEG (out.jpg).
Is it possible or simply I did it wrong?