I have been using AWS for a few years but have not gotten into automation much, everything so far I have doing by hand. Being a python guy I thought I would try boto so I picked up a book Python and AWS Cookbook and started working some of the recipes. On the receipt "Keeping Track of Instances with Tags" I am trying to find my instance which has a tag of "tvr" with empty value, so I use this code:
python ec2_openCmdShellForInstanceWithSpecificTags.py
Traceback (most recent call last):
File "ec2_openCmdShellForInstanceWithSpecificTags.py", line 6, in <module>
reservations = ec2.get_all_instances(filters={'tvr' : None}) # doesn't work
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/boto-2.5.2-py2.7.egg/boto/ec2/connection.py", line 478, in get_all_instances
[('item', Reservation)], verb='POST')
File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/boto-2.5.2-py2.7.egg/boto/connection.py", line 980, in get_list
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidParameterValue</Code><Message>The filter 'tvr' is invalid</Message></Error></Errors><RequestID>21611511-97ad-44b7-874b-da7deda41ac1</RequestID></Response>
With the built in Amazon tags (instance-id) it works great like if I use this code:
Any ideas? I may be doing something stupid. Thanks for the help.