You can check in online for your Aer Lingus flight from Amsterdam from 30 hours before departure. This means that you should already be traveling from Riga with your 2nd boarding pass in hand.
KLM are the handling agents for Aer Lingus in Amsterdam, so you will need to check in via
www.klm.com instead of on
www.aerlingus.com for the flight leaving from AMS. (If you want to check-in online for the return DUB-AMS flight, you should do so on
www.aerlingus.com).
If, for whatever reason, you are not able to check-in online and print your boarding pass before leaving, you should be able to obtain your Aer Lingus boarding pass from any of the blue KLM self-service transfer machines at Schiphol, or from a KLM transfer desk. Remain airside - you do NOT need to go landside to check-in. Trust me on this. I'm a frequent flyer on Aer Lingus and AMS is my home airport.
1 hour 40 minutes is LOADS of time - don't worry about a thing.
Aer Lingus nearly always leave from the D26-D31 area at the very end of the right-hand fork of the D piers. I'm not sure where Air Baltic usually arrives, but it is quite likely also in a D-pier gate.
Good luck, and don't worry!!!
By the way... Aer Lingus tickets when purchased via a Travel Agent are typically at least twice the price of the cheapest fare available on the same flight directly from
www.aerlingus.com. I would advise you, before buying this as one ticket from your TA, to compare the price of just the Riga-AMS-Riga ticket separately, and see what your AMS-DUB-AMS flights from
www.aerlingus.com come in at. My guess is that it is cheaper. And there also is the possibility that your TA-generated Air Baltic/Aer Lingus ticket may look unusual to klm.com and you may not be able to check in online (though again, going to a self service machine or transfer desk at Schiphol in the 1h 40 minutes connection time is loads to get your boarding pass). But I think you may be better off booking 2 tickets seperately. Just check the Air Baltic flights separately on their website - they may also be cheaper there than through a TA. But Aer Lingus is definitely cheaper if you buy direct from the airline.