Need advice about which tool to choose?Ask the StackShare community!

Airflow

1.6K
2.7K
+ 1
126
AWS Lambda

23.6K
18.3K
+ 1
432
Add tool

AWS Lambda vs Airflow: What are the differences?

AWS Lambda and Airflow are both popular tools for managing and executing workflows in the cloud. Let's explore the key differences between them.

  1. Deployment Model: AWS Lambda is a serverless computing service provided by Amazon Web Services. It allows you to upload your code and automatically run it in response to events. On the other hand, Apache Airflow is an open-source platform that allows you to programmatically author, schedule, and monitor workflows. It provides a more flexible and scalable deployment model compared to Lambda.

  2. Language Support: AWS Lambda supports a variety of programming languages such as Node.js, Python, Java, and C#. It provides built-in runtime environments for each supported language. In contrast, Apache Airflow is primarily written in Python and supports Python-based workflows. While it can execute code written in other languages, it requires additional configuration and dependencies.

  3. Event-Based vs Time-Based Triggers: AWS Lambda is designed to respond to events such as changes to data in an S3 bucket or a new message in an Amazon SQS queue. It allows you to set up event-based triggers to execute your code when specific events occur. On the other hand, Apache Airflow provides time-based triggers that allow you to schedule your workflows to run at specific times or intervals. It provides more control over when your workflows are executed.

  4. Execution Environment: AWS Lambda manages the execution environment for your code. It provisions the necessary computing resources and scales automatically based on the incoming workload. This allows you to focus on writing your code without worrying about infrastructure. In contrast, Apache Airflow requires you to set up and manage your own execution environment, whether it's on-premises or in the cloud. This gives you more control over the resources and configuration of your environment.

  5. Data Processing and Transformation: AWS Lambda is well-suited for small, event-driven tasks such as data processing and transformation. It allows you to write short-lived functions that can process a single event at a time. On the other hand, Apache Airflow is designed to handle complex, data-intensive workflows. It provides a rich set of operators and tools for data processing, transformation, and orchestration. It is more suitable for workflows that involve multiple steps and dependencies.

  6. Scalability and Cost: AWS Lambda automatically scales your functions based on incoming workload, allowing you to handle high traffic efficiently. You only pay for the compute time that your functions consume, which can be cost-effective for sporadic workloads. In contrast, Apache Airflow requires you to provision and manage the necessary computing resources, which can be more expensive and less scalable for large workloads.

In summary, AWS Lambda is a serverless compute service ideal for executing event-driven tasks at scale, while Airflow is a workflow management platform designed for orchestrating complex workflows as directed acyclic graphs (DAGs). Lambda excels at event-driven, serverless computing, while Airflow provides more flexibility and control for managing and orchestrating complex workflows.

Advice on Airflow and AWS Lambda

Need advice on what platform, systems and tools to use.

Evaluating whether to start a new digital business for which we will need to build a website that handles all traffic. Website only right now. May add smartphone apps later. No desktop app will ever be added. Website to serve various countries and languages. B2B and B2C type customers. Need to handle heavy traffic, be low cost, and scale well.

We are open to either build it on AWS or on Microsoft Azure.

Apologies if I'm leaving out some info. My first post. :) Thanks in advance!

See more
Replies (2)
Anis Zehani

I recommend this : -Spring reactive for back end : the fact it's reactive (async) it consumes half of the resources that a sync platform needs (so less CPU -> less money). -Angular : Web Front end ; it's gives you the possibility to use PWA which is a cheap replacement for a mobile app (but more less popular). -Docker images. -Kubernetes to orchestrate all the containers. -I Use Jenkins / blueocean, ansible for my CI/CD (with Github of course) -AWS of course : u can run a K8S cluster there, make it multi AZ (availability zones) to be highly available, use a load balancer and an auto scaler and ur good to go. -You can store data by taking any managed DB or u can deploy ur own (cheap but risky).

You pay less money, but u need some technical 2 - 3 guys to make that done.

Good luck

See more

My advice will be Front end: React Backend: Language: Java, Kotlin. Database: SQL: Postgres, MySQL, Aurora NOSQL: Mongo db. Caching: Redis. Public : Spring Webflux for async public facing operation. Admin api: Spring boot, Hibrernate, Rest API. Build Container image. Kuberenetes: AWS EKS, AWS ECS, Google GKE. Use Jenkins for CI/CD pipeline. Buddy works is good for AWS. Static content: Host on AWS S3 bucket, Use Cloudfront or Cloudflare as CDN.

Serverless Solution: Api gateway Lambda, Serveless Aurora (SQL). AWS S3 bucket.

See more
Needs advice
on
AirflowAirflowLuigiLuigi
and
Apache SparkApache Spark

I am so confused. I need a tool that will allow me to go to about 10 different URLs to get a list of objects. Those object lists will be hundreds or thousands in length. I then need to get detailed data lists about each object. Those detailed data lists can have hundreds of elements that could be map/reduced somehow. My batch process dies sometimes halfway through which means hours of processing gone, i.e. time wasted. I need something like a directed graph that will keep results of successful data collection and allow me either pragmatically or manually to retry the failed ones some way (0 - forever) times. I want it to then process all the ones that have succeeded or been effectively ignored and load the data store with the aggregation of some couple thousand data-points. I know hitting this many endpoints is not a good practice but I can't put collectors on all the endpoints or anything like that. It is pretty much the only way to get the data.

See more
Replies (1)
Gilroy Gordon
Solution Architect at IGonics Limited · | 2 upvotes · 262.7K views
Recommends
on
CassandraCassandra

For a non-streaming approach:

You could consider using more checkpoints throughout your spark jobs. Furthermore, you could consider separating your workload into multiple jobs with an intermittent data store (suggesting cassandra or you may choose based on your choice and availability) to store results , perform aggregations and store results of those.

Spark Job 1 - Fetch Data From 10 URLs and store data and metadata in a data store (cassandra) Spark Job 2..n - Check data store for unprocessed items and continue the aggregation

Alternatively for a streaming approach: Treating your data as stream might be useful also. Spark Streaming allows you to utilize a checkpoint interval - https://spark.apache.org/docs/latest/streaming-programming-guide.html#checkpointing

See more
Decisions about Airflow and AWS Lambda

When adding a new feature to Checkly rearchitecting some older piece, I tend to pick Heroku for rolling it out. But not always, because sometimes I pick AWS Lambda . The short story:

  • Developer Experience trumps everything.
  • AWS Lambda is cheap. Up to a limit though. This impact not only your wallet.
  • If you need geographic spread, AWS is lonely at the top.
The setup

Recently, I was doing a brainstorm at a startup here in Berlin on the future of their infrastructure. They were ready to move on from their initial, almost 100% Ec2 + Chef based setup. Everything was on the table. But we crossed out a lot quite quickly:

  • Pure, uncut, self hosted Kubernetes — way too much complexity
  • Managed Kubernetes in various flavors — still too much complexity
  • Zeit — Maybe, but no Docker support
  • Elastic Beanstalk — Maybe, bit old but does the job
  • Heroku
  • Lambda

It became clear a mix of PaaS and FaaS was the way to go. What a surprise! That is exactly what I use for Checkly! But when do you pick which model?

I chopped that question up into the following categories:

  • Developer Experience / DX 🤓
  • Ops Experience / OX 🐂 (?)
  • Cost 💵
  • Lock in 🔐

Read the full post linked below for all details

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Airflow
Pros of AWS Lambda
  • 51
    Features
  • 14
    Task Dependency Management
  • 12
    Beautiful UI
  • 12
    Cluster of workers
  • 10
    Extensibility
  • 6
    Open source
  • 5
    Complex workflows
  • 5
    Python
  • 3
    Good api
  • 3
    Apache project
  • 3
    Custom operators
  • 2
    Dashboard
  • 129
    No infrastructure
  • 83
    Cheap
  • 70
    Quick
  • 59
    Stateless
  • 47
    No deploy, no server, great sleep
  • 12
    AWS Lambda went down taking many sites with it
  • 6
    Event Driven Governance
  • 6
    Extensive API
  • 6
    Auto scale and cost effective
  • 6
    Easy to deploy
  • 5
    VPC Support
  • 3
    Integrated with various AWS services

Sign up to add or upvote prosMake informed product decisions

Cons of Airflow
Cons of AWS Lambda
  • 2
    Observability is not great when the DAGs exceed 250
  • 2
    Running it on kubernetes cluster relatively complex
  • 2
    Open source - provides minimum or no support
  • 1
    Logical separation of DAGs is not straight forward
  • 7
    Cant execute ruby or go
  • 3
    Compute time limited
  • 1
    Can't execute PHP w/o significant effort

Sign up to add or upvote consMake informed product decisions

What is Airflow?

Use Airflow to author workflows as directed acyclic graphs (DAGs) of tasks. The Airflow scheduler executes your tasks on an array of workers while following the specified dependencies. Rich command lines utilities makes performing complex surgeries on DAGs a snap. The rich user interface makes it easy to visualize pipelines running in production, monitor progress and troubleshoot issues when needed.

What is AWS Lambda?

AWS Lambda is a compute service that runs your code in response to events and automatically manages the underlying compute resources for you. You can use AWS Lambda to extend other AWS services with custom logic, or create your own back-end services that operate at AWS scale, performance, and security.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention Airflow and AWS Lambda as a desired skillset
What companies use Airflow?
What companies use AWS Lambda?
See which teams inside your own company are using Airflow or AWS Lambda.
Sign up for StackShare EnterpriseLearn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Airflow?
What tools integrate with AWS Lambda?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

GitHubPythonNode.js+47
54
72300
GitHubDockerAmazon EC2+23
12
6566
JavaScriptGitHubPython+42
53
21838
What are some alternatives to Airflow and AWS Lambda?
Luigi
It is a Python module that helps you build complex pipelines of batch jobs. It handles dependency resolution, workflow management, visualization etc. It also comes with Hadoop support built in.
Apache NiFi
An easy to use, powerful, and reliable system to process and distribute data. It supports powerful and scalable directed graphs of data routing, transformation, and system mediation logic.
Jenkins
In a nutshell Jenkins CI is the leading open-source continuous integration server. Built with Java, it provides over 300 plugins to support building and testing virtually any project.
AWS Step Functions
AWS Step Functions makes it easy to coordinate the components of distributed applications and microservices using visual workflows. Building applications from individual components that each perform a discrete function lets you scale and change applications quickly.
Pachyderm
Pachyderm is an open source MapReduce engine that uses Docker containers for distributed computations.
See all alternatives