I agree... have it checked out. It sounds as though you purchased it used. If that's the case, do you know if it's ever had spark plugs replaced?
I have a '13 STS and it had been idling rough at stop lights, lurching forward, and on one instance, stalling. My dealership had done a total maintenance on it as part of the service schedule, which I believe included spark plugs, but it just wasn't running right. After researching I found out that the OEM spark plug wires are very finicky and may misfire if you move them around... say while changing the spark plugs, but not the wires. I recently just changed out my spark plugs and wires (from BajaRon) and it's running awesome now... none of those symptoms exist anymore.
I use a Battery Tender Plus (
http://www.batterytender.com/Chargers/Battery-TenderR-Plus.html) to keep my battery topped off. My machine was also prone to the break light issue mentioned... it would stay on after I get off the bike. Turns out the bump stop underneath the break lever arm (very easy to locate and fix) was too large. I cut it down in half (thickness wise) and no longer have the break light staying on issue. But it was a really easy way to run your battery down without even knowing it.
When it dies... does it choke or just shut down? There is also a tendency for oil to overflow into the Air Filter if it's overfilled, thus, choking the air when at idle. Remember to check oil levels when you're at operating temp, not cold.
This is frustrating, I know, but use your warranty and trouble shoot the logical causes. Best of luck!