Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter on a vpc.instances causes instances from all VPCs to be returned #166

Closed
russellballestrini opened this issue Jul 3, 2015 · 1 comment

Comments

@russellballestrini
Copy link

Not sure if this is a defect.

Filter on a vpc.instances causes instances from all VPCs to be returned

>>> len(list(evpc.instances.all()))
8
>>> len(list(evpc.instances.filter(Filters=[{'Name':'tag:Name', 'Values':['*vpn*']}])))
17
>>> len(list(evpc.instances.all().filter(Filters=[{'Name':'tag:Name', 'Values':['*vpn*']}])))
17

I expected only 1 vpn box in the related VPC to be returned, I got back 17 vpn boxes, one from each VPC in the AWS account.

In this case evpc is an object of class ec2.Vpc(boto3.resources.base.ServiceResource)

@kyleknap
Copy link
Contributor

kyleknap commented Jul 6, 2015

This is caused by the same reason as in this issue: #148

It was fixed by this merged PR: #154

This fix will be in the next release of boto3. Or you can just pull down the HEAD of the develop branch.

Closing issue as a duplicate. Let me know if you have anymore questions or issues persist after pulling in the fix.

@kyleknap kyleknap closed this as completed Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants