Last year’s speaker was secured by a former Social Security Administration commissioner, Michael Astrue, who lives on the island a third of the year. In January, he agreed to search for another notable name. The stakes were high, he said.

Image Gwen Lynch, the only graduating eighth grader on Cuttyhunk Island in Massachusetts.

“I’ve sort of become the speaker-getter,” Mr. Astrue said Tuesday. “It’s hard because they don’t pay anything. It’s hard to get to, and there’s only one student.” The island can be reached only by boat or plane.

After some reflection, Mr. Astrue remembered he knew Ms. Slate’s father, Ron Slate, a poet, and sent him an email.

Ms. Slate feels honored to be chosen. “I felt some pressure here,” she said Wednesday. “For some reason I just felt like, ‘Oh my God. This is really intense. This is really important. Are you sure they want me?’”

The actress grew up in Massachusetts and shares a connection to the island. Her boyfriend, Ben Shattuck, runs the Cuttyhunk Island Writers’ Residency.

In the last few days, she and the graduate have bonded over email and in person.

“It was really important to me to try to get to know her a little bit,” Ms. Slate said of Gwen, “so I could say something to her that’s more than a cliché” or a “directive coming from an adult who’s a stranger.” She added, “I wanted to try to at least be her companion a little bit in this.”

The comedian has given commencement speeches before. “You want to say something worthwhile to these very, very young adults who are going into the world,” she said. “But to give a full graduation speech to one girl, one young woman, it’s an honor and something I take really seriously.”