From Latin ambi- (“both”) + duo (“two”), via due. Compare Old Italian amendue and Old French ambedeus.
ambedue (invariable)