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

285
Vistas
Is there any php function that wait untill aws lightsail instance state is running?

I have used this code to create aws lightsail instance using php code.

$client->createInstances([
        'addOns' => [
            [
                'addOnType' => 'AutoSnapshot',
                'autoSnapshotAddOnRequest' => [
                    'snapshotTimeOfDay' => config('aws.snapshotTime'),
                ],
            ],
        ],
        'availabilityZone' => config('aws.instanceAvailabilityZone'),
        'blueprintId' => config('aws.os'),
        'bundleId' => config('aws.instanceType'),
        'instanceNames' => ['testinstance],
        'userData' => config('aws.afterInstallScript'),
    ]);
   return $result = $client->getInstanceState([
        'instanceName' => $instanceName
    ]);

The code is executed with instance state pending. But my requirement is that it should return when the instance state is running. Aws SDK has waitUntil() function but I don't know how to use this in lightsail.

Can anyone help me with this?

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