def get_vpc_id(conn, name):
    """Return the first VPC ID given its name and region"""
    vpcs = conn.get_all_vpcs(filters={'tag:Name': name})
    conn.close()
    if len(vpcs) == 1:
        return vpcs[0].id
    else:
        raise RuntimeError('{} VPC not found'.format(name))