- with AWS Lambda
of a running script
- Python / NodeJS / Java8 runtime
- 🕒 Cron like execution
- Can access VPC Finally
- Auto Scalling
- Latency: so far so good
When to use 💚
👍 Short Job
👍 Event-driven stuff, e.g. Time-based / webhook
👍 Spike Patterns of usage
👍 Simple program with less dependency
👍 ad-hoc scripts with need to modify and version
👍 Need Real quick set up, quicker than Knubertes
When NOT to use 💔
🙅 Stateful e.g. Session servers
🙅 Long running (=>$$)
🙅 Cache is important -> can use external elasticCache
🙅 High CPU/Memory Usage (Max 1.5GB per process)
🙅 Complex gcc / machine drivers etc
🙅 High frequency self-trigger (max @1min event now) -> Use SNS/Celery!
🙅 Need DAG Job dependencies -> Use airflow!
🙅 Strong fault tolerance /monitor req -> Use Celery / Gearman!
🙅 Layman stuff -> Use Zappier / IFTTT!
Point to point Data Sync among 3rd part services/ platform
E.g. App -> Salesforce
Daily Logentries, GA -> ReportingDB
Pagination with external state
Integrate with Amazon Kinesis for data analytics
As simple as marshalling / aggregating & send reporting db
Simple API, Slackbot etc..
yet some other pain points
- Overhead to setup proper VPC subnet
- Tedious to package
- Libraries like Pg8000 (Postgres driver) tested well on local/ec2 but failed
- hard to reproduce the environment
- Just give up and switch lib
Old school Cloudwatch events and loggings
- AWS UI is just...well
to the rescue
(memory type * exe time,
roughly 3M * 1s call <$20 USD)
API Gateway, another Lambda...
Kinesis, Redshift, S3...
your own dockerized arch
Non tech oriented Data integrations
By Chun Yin Vincent Lau