Bring a large saucepan of water to a boil; add salt. Prepare an ice-water bath; set aside. Cook beans until just tender, about 3 minutes. Immediately transfer with tongs to the ice-water bath. Drain well, and transfer to a large bowl.
Bring 3 cups water, the vinegar, 3 tablespoons salt, the garlic, and the cayenne to a boil in a medium saucepan. Reduce heat; simmer 4 minutes. Pour brine over beans. Let cool completely, about 30 minutes. Transfer to airtight containers; refrigerate at least 1 week (pickles will keep 3 weeks more).