Netsmart interview question

Difference between lambda and ecs services? Why should we use lambda?