Since you do not have to go through customs at JFK I'd say at least one hour between flights if Aer Lingus can issue you both boarding passes and check your bags from Dublin through to your final destination on AA. If not you'll need to collect your bags and take Airtrain from T4 to T8 and check-in at American which will require additional time between flights.
Since you do not have to go