(To be completely clear for the OP, in your specific case: LGA-ATL-LIM will all be operated by Delta - or possibly by a regional airline that is treated like a Delta flight for baggage purposes. On the outbound, your baggage will be checked through all the way to Lima - you don't have to do anything in Atlanta. On the return, though, you'll have to reclaim it in Atlanta, walk it through customs, then check it back in immediately afterwards for your last flight home to New York.)