How to decide which one to use lamda or ec2
Cost optimization, Tasks that can be sceduled one time a day.Security/Compliance
What is Aws Lamba
Serverless compute, No need to specify AMi,RAm,CPU etc. Aws takes care of update and upgrades. Once the task ins performed aws tears down the application. We need not take care of Autoscaling,ipaddress. Infact we does not know here its hosted.
Lambda function is event driven . Some one need to call to run.
How cost optimisation can be configured in lambda
Cloud watch with lambda to send notifications to users about un used compute