Using a stand mixer with paddle attached, beat the butter, sugar and vanilla until light and smooth, approximately 3 minutes. Scrape the sides of the bowl occasionally. If you do not have a stand mixer, use a large bowl and electric beater on medium speed.
In a bowl, whisk together the flour, rosemary, salt and ground pepper.
Slowly add the flour to the butter mixture, while mixer is on low speed.
Divide the dough in half and shape halves into rounds. Wrap each round in plastic wrap and refrigerate for at least 1 hour or overnight.
Preheat the oven to 350° F. Line three baking sheets with parchment paper.
Lightly flour a rolling pin and board, then roll one of the rounds to ¼" thickness. Using a 2 1/2" round cookie cutter (3" will work as well), cut dough into as many cookies as possible.
Reroll any scraps carefully without adding too much additional flour.
Place 12 cookies on the first sheet about 1" apart. Repeat this process with the remaining round of dough. Use a 1" cookie cutter and proceed to cut centers from the second batch of cookies.
Place these cookies on the second sheet.
Place the cut-out centers onto the third baking sheet.
Bake until edges are lightly browned, approximately 10 to 12 minutes. Remove cookies from oven and let cool for 15 minutes. Do not turn oven off.
Spread ½ teaspoon of pepper jelly (or more if you like it hotter) onto the flat side of the 2 ½" round solid cookies.
Place the cut-out cookies flat side down on top of the jelly. Bake for 2 additional minutes.
Remove from oven and let cool to room temperature. Store in an airtight container.