It is hereby ordered that the judgment so appealed from is unanimously affirmed.
Memorandum: On appeal from a judgment convicting him based upon his plea of guilty of criminal possession of a weapon in the second degree (Penal Law § 265.03 [1] [b]), defendant contends that his waiver of the right to appeal is unenforceable and that his agreed-upon sentence is unduly harsh and severe. We perceive no infirmity in defendant‘s waiver of the right to appeal. County Court adequately advised defendant during the plea colloquy of his right to appeal, and defendant then signed a written waiver of the right to appeal. The record thus establishes that defendant knowingly, voluntarily and intelligently waived the right to appeal (see generallyPeople v Lopez, 6 NY3d 248, 256 [2006]), and that valid waiver forecloses any challenge by defendant to the severity of the sentence (seeid. at 255; see generallyPeople v Lococo, 92 NY2d 825, 827 [1998]; People v Hidalgo, 91 NY2d 733, 737 [1998]).