in filter_aws.py [0:0]
def execute(self, listing, response):
"""Apply filter.
Args:
listing: data returned from aws api.
response: relevant data returned to caller.
"""
if listing.service == 'ec2' and listing.operation == 'DescribeRouteTables':
response['RouteTables'] = [
rt for rt in response['RouteTables']
if not any(x['Main'] for x in rt['Associations'])
]