Getting higher number of aws snapshot than the snapshots I've in my AWS account

58 views Asked by At

When I try to do :

conn = boto.connect_ec2(access_key = "xxxxxxx", access_secret = "yyyyyy")
snapshots = conn.get_all_snapshots()

I get different number of snapshots(more than snapshots I see on console)

but when try to execute

snapshots = conn.get_all_snapshots(owner="xxxxxyyyyyyy")

I get real number of snapshot that I see on console.

Why is that behaviour in boto. Where I can find those extra snaphots.

1

There are 1 answers

0
Sumit Murari On BEST ANSWER
snapshots = conn.get_all_snapshots()

^ Returns all the snapshot that you've access to. It may be many public accessible snapshots.

snapshots = conn.get_all_snapshots(owner="xxxxxyyyyyyy")  OR snapshots = conn.get_all_snapshots(owner="self") 

xxxxxyyyyyy > AWS_Account_ID

^^ Returns the the snapshots you own.


Thnx to: @BMW

Reference : https://github.com/boto/boto/issues/2031