Not able to get the resources attached with route table
<p>I am  using python for AWS  infrastructure automation.
I need to get the resources attached with the Route Table for which API given is </p>

<pre><code>ec2  = boto3.resource('ec2')
route_table_association = ec2.RouteTableAssociation('rtb-**********')
response=route_table_association.get_available_subresources()
</code></pre>

<p>Here the return type of response is giving me the empty list all the time. and <code>response=route_table_association.delete()</code> gives the exception</p>

<pre><code>An error occurred (InvalidAssociationID.NotFound) when calling the `DisassociateRouteTable operation: The association ID 'rtb-*********' does not exist.`
</code></pre>

<p>But the route tebale exist and is attached to a subnet explicitly</p>

<p>Thanks this worked for me.</p>

<pre><code>response = client.describe_route_tables(
    RouteTableIds=[
        routetable,
    ],
    Filters=[
        {
            'Name': 'route-table-id',
            'Values': [
                routetable
            ]
        }
    ]
)
</code></pre>

python amazon-web-services amazon-ec2 boto3 botocore