I have EC2 instances tagged with key environment
and value production
. I am trying to return them using the following:
$result = $ec2_client->describeInstances(array(
"Filters" => array(
array(
"Name" => "tag",
"Value" => array(
"environment=production"
)
)
)
));
The above errors out.
How do I specify this method call in the correct manner?
Correct format is:
$result = $ec2_client->describeInstances(array(
"Filters" => array(
array(
"Name" => "tag:environment",
"Value" => array(
"production"
)
)
)
));