Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

374
Views
Is it possible to get objects from S3 bucket and directly use the results in a shell command as string?

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?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!