Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

375
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda