According to the AWS Solutions Architect labs that I am currently following, AWS Lambdas are ideal for IoT applications.
I'm unclear on why this is.
Is it because the compute capacity of such devices are typically very limited so it makes sense to offload processing to the cloud?
If this is the case, why is Lambda more effective for the purpose than a more typical server running on EC2 or EKS?
Is this assessment based purely on the costing model?
CodePudding user response:
AWS Lambda are event driven. They don't "exist" until an event comes in for them to process, then they process the event and go away. You're only paying for the time they had to run to process that event. IoT devices communicate with the cloud by sending events, which makes Lambda a very good fit.
Once you get further into working with the AWS IOT service and wiring it up to to send messages to other services, it is quickly apparent how much easier it is to send those messages to Lambda or DynamoDB than it is more traditional services like EC2 or RDS.
CodePudding user response:
Largely yes - IoT devices will not particularly be running heavy data intensive workloads which may need their own customised server.
Lambdas seamlessly integrate with Amazon’s API Gateway, allowing any IoT developer to get up and running with an API in a matter of minutes.
Lambas are also particularly wonderful in the aspect that they are stupidly cheap if you just need quick processing to be done; most of the time, IoT devices do not run long polling applications etc.
EC2 servers are an overkill for anything which can run on Lambda’s max specs - if it needs less than 10GB memory & runs in under 15 minutes, go with Lambda 100% of the time where language, runtime etc. permits.
Lambdas are just perfect in this case for IoT applications :)