*1172Waiving his right to appeal, defendant pleaded guilty to criminal sale of a controlled substance in the second degree. In accordance with the plea agreement, County Court thereafter sentenced defendant as a second felony offender to 10 years in prison and five years of postrelease supervision. Defendant now appeals, challenging his sentence on two separate grounds.
First, defendant asserts that he was improperly sentenced as a second felony offender because County Court failed to comply with the requirements of CPL 400.21. That claim, however, is unpreserved for our review in light of defendant’s failure to raise the appropriate objection at the time of sentencing (see People v Clark, 54 AD3d 1099, 1099-1100 [2008]). As for defendant’s second contention, that the sentence imposed is harsh and excessive, defendant’s appeal waiver precludes him from advancing such a claim (see People v Getter, 52 AD3d 1117, 1118 [2008]). Accordingly, the judgment is affirmed.
Peters, J.P., Spain, Lahtinen, Kane and Stein, JJ., concur. Ordered that the judgment is affirmed.