Varlamov was a backup for Russia during the 2005 IIHF World U18 Championships, where they finished fifth. He then earned the backup position over Lokomotiv-2 teammate Ivan Kasutin for Russia at the 2006 World Junior Championships as a 17-year-old. Backing up Anton Khudobin, Varlamov did not see much ice time, playing only in one game against Latvia, allowing one goal in a 3–1 round robin win. He earned a silver medal with Russia as they were defeated 5–0 in the final by Canada.