I currently have a script (written using the PHP SDK) that starts a Windows EC2 instance when certain conditions are met.
I would like my Windows EC2 instance to automatically run a Powershell command as Administrator as soon as it is started.
How would I do this?
This is what my method looks like right now
$result = $client->runInstances(array(
"ImageId" => "ami-43ks9as",
"MinCount" => 1,
"MaxCount" => 1,
"SecurityGroupIds" => array(
"sg-342adj8"
),
"InstanceType" => "c3.medium",
"Placement" => array(
"AvailabilityZone" => "us-east-1a"
),
"Monitoring" => array(
"Enabled" => true
)
));
Aucun commentaire:
Enregistrer un commentaire