Mercure, J. Appeal from a judgment of the County Court of Saratoga County (Scarano, J.), rendered March 9, 2009, convicting defendant upon his plea of guilty of the crimes of rape in the first degree,, sexual, abuse in the first degree and unlawful imprisonment in the second degree.
Defendant pleaded guilty to the crimes of rape in the first degree, sexual abuse in the first degree and unlawful imprisonment in the second degree and waived his right to appeal. He was thereafter sentenced to an aggregate prison term of 15 years to be followed by 10 years of postrelease supervision, and now appeals.
We affirm. Defendant argues that the waiver of his right to appeal was not valid. However, as part of the negotiated plea agreement, County Court explained that defendant was waiving his right to appeal, and defendant confirmed that he understood the waiver and had discussed the matter with counsel. In addition, defendant executed a written waiver in which he acknowledged the right and that he had discussed the consequences of the waiver with counsel and that he was waiving the right voluntarily. As a result, we conclude that defendant validly waived his right to appeal (see People v Ramos, 7 NY3d 737, 738 [2006]; People v Motz, 52 AD3d 1029, 1031 [2008], lv denied 11 NY3d 791 [2008]; People v Mosher, 45 AD3d 970, 970 [2007], lv denied 10 NY3d 814 [2008]). Insofar as defendant validly waived his right to appeal, he is precluded from challenging his sentence as harsh and excessive (see People v Platero, 63 AD3d 1446, 1446 [2009], lv denied 13 NY3d 861 [2009]; People v Robles, 53 AD3d 686, 688 [2008], lv denied 11 NY3d 794 [2008]).
Cardona, P.J., Malone Jr., Kavanagh and McCarthy, JJ., concur. Ordered that the judgment is affirmed.