Closed rileysea closed 2 years ago
Hi @rileysea,
Good afternoon.
Thanks for reporting the issue. On looking further, here are my findings:
IncludeAllInstances
which has a default value of false
.Based on above reference from service API pages, only the running instances would be returned when you use Get-EC2InstanceStatus
CmdLet. You could change the default behavior by using -IncludeAllInstance
parameter with value $true
to have it return status of all instances. I'm assuming this is true even if you specify -InstanceId
parameter.
Kindly note that the above PowerShell CmdLets are autogenerated and the behavior is controlled by the EC2 service API. The behavior could not be changed by service team since it would be a breaking change for existing customers.
Please review the results of your call to Get-EC2Instance -Region eu-west-1
to see if it includes other instances (apart from running). If yes, please try the following:
-IncludeAllInstance
parameter with value $true
in you Get-EC2Instancestatus
call and see if it resolves the issue.-InstanceId
parameter is an array of strings. Hence you should be able $instances
directly as value for -InstanceId
parameter. Kindly check if this works, with or without -IncludeAllInstanceparameter (with value
$true`).Thanks, Ashish
That seemed to work - thanks Ashish
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Description
Using Get-EC2Instancestatus without a parameter and with the
InstanceId
parameter does not return any objects in theeu-west-1
region for me.However, using Get-EC2Instance does.
Reproduction Steps
I also noticed you can't pipe the two functions together
Logs
Environment
Resolution
This is a :bug: bug-report