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

AWS Lambda

24K
18.6K
+ 1
432
Kubernetes

59.9K
51.8K
+ 1
681
Add tool

AWS Lambda vs Kubernetes: What are the differences?

Key Differences between AWS Lambda and Kubernetes

AWS Lambda and Kubernetes are both popular tools used in modern software development, but they serve different purposes and have distinct features. Here are the key differences between AWS Lambda and Kubernetes:

  1. Scaling: In AWS Lambda, scaling is automatic and managed by AWS based on the incoming request volume. Each Lambda function runs in isolation and scales independently. On the other hand, Kubernetes allows manual scaling by increasing or decreasing the number of pods depending on the workload. Kubernetes provides more fine-grained control over scaling compared to AWS Lambda.

  2. Execution Environment: AWS Lambda enables developers to run code without provisioning or managing servers. It supports multiple programming languages and allows running small units of code, known as functions, in response to events. In contrast, Kubernetes is a container orchestration platform that manages the deployment, scaling, and management of containerized applications. It provides a runtime environment for containers, allowing complex applications with multiple containers to run.

  3. Infrastructure Management: With AWS Lambda, developers do not need to worry about infrastructure management as AWS handles it. Developers only focus on writing code and defining triggers for Lambda functions. On the other hand, Kubernetes requires manual or automated management of infrastructure resources. Developers need to provision and manage the underlying infrastructure and ensure the availability and scalability of the Kubernetes cluster.

  4. Service Discovery: AWS Lambda functions are typically accessed through triggers, and they do not have built-in service discovery mechanisms. In contrast, Kubernetes provides a robust service discovery mechanism using DNS or environment variables. It allows services and containers within the Kubernetes cluster to discover and communicate with each other easily.

  5. Fault Tolerance: AWS Lambda automatically handles fault tolerance by managing the execution environment and scaling based on the incoming requests. If a Lambda function fails, AWS re-executes it to ensure reliable and fault-tolerant execution. Kubernetes also provides fault tolerance mechanisms, but it requires more manual configuration and setup to achieve the desired level of fault tolerance.

  6. Cost Model: AWS Lambda follows a pay-per-use pricing model, where you only pay for the actual usage of the Lambda functions. It is suitable for event-driven applications with sporadic usage. On the other hand, Kubernetes requires provisioning and managing infrastructure resources, so the cost model is based on the infrastructure resources utilized. It may be more cost-effective for long-running or high-traffic applications where resource utilization is more predictable.

In Summary, AWS Lambda and Kubernetes differ in terms of scaling, execution environment, infrastructure management, service discovery, fault tolerance, and cost model. AWS Lambda is focused on running individual functions in a serverless environment, while Kubernetes provides a platform for managing and orchestrating containerized applications at scale.

Decisions about AWS Lambda and Kubernetes
Simon Reymann
Senior Fullstack Developer at QUANTUSflow Software GmbH · | 30 upvotes · 11.2M views

Our whole DevOps stack consists of the following tools:

  • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
  • Respectively Git as revision control system
  • SourceTree as Git GUI
  • Visual Studio Code as IDE
  • CircleCI for continuous integration (automatize development process)
  • Prettier / TSLint / ESLint as code linter
  • SonarQube as quality gate
  • Docker as container management (incl. Docker Compose for multi-container application management)
  • VirtualBox for operating system simulation tests
  • Kubernetes as cluster management for docker containers
  • Heroku for deploying in test environments
  • nginx as web server (preferably used as facade server in production environment)
  • SSLMate (using OpenSSL) for certificate management
  • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
  • PostgreSQL as preferred database system
  • Redis as preferred in-memory database/store (great for caching)

The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

  • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
  • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
  • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
  • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
  • Scalability: All-in-one framework for distributed systems.
  • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
See more

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
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of AWS Lambda
Pros of Kubernetes
  • 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
  • 166
    Leading docker container management solution
  • 129
    Simple and powerful
  • 107
    Open source
  • 76
    Backed by google
  • 58
    The right abstractions
  • 25
    Scale services
  • 20
    Replication controller
  • 11
    Permission managment
  • 9
    Supports autoscaling
  • 8
    Simple
  • 8
    Cheap
  • 6
    Self-healing
  • 5
    Open, powerful, stable
  • 5
    Reliable
  • 5
    No cloud platform lock-in
  • 5
    Promotes modern/good infrascture practice
  • 4
    Scalable
  • 4
    Quick cloud setup
  • 3
    Custom and extensibility
  • 3
    Captain of Container Ship
  • 3
    Cloud Agnostic
  • 3
    Backed by Red Hat
  • 3
    Runs on azure
  • 3
    A self healing environment with rich metadata
  • 2
    Everything of CaaS
  • 2
    Gke
  • 2
    Golang
  • 2
    Easy setup
  • 2
    Expandable
  • 2
    Sfg

Sign up to add or upvote prosMake informed product decisions

Cons of AWS Lambda
Cons of Kubernetes
  • 7
    Cant execute ruby or go
  • 3
    Compute time limited
  • 1
    Can't execute PHP w/o significant effort
  • 16
    Steep learning curve
  • 15
    Poor workflow for development
  • 8
    Orchestrates only infrastructure
  • 4
    High resource requirements for on-prem clusters
  • 2
    Too heavy for simple systems
  • 1
    Additional vendor lock-in (Docker)
  • 1
    More moving parts to secure
  • 1
    Additional Technology Overhead

Sign up to add or upvote consMake informed product decisions

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.

What is Kubernetes?

Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions.

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

What companies use AWS Lambda?
What companies use Kubernetes?
Manage your open source components, licenses, and vulnerabilities
Learn More

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

What tools integrate with AWS Lambda?
What tools integrate with Kubernetes?

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

Blog Posts

Kubernetesetcd+2
3
1194
Dec 8 2020 at 5:50PM

DigitalOcean

GitHubMySQLPostgreSQL+11
3
2443
PythonDockerKubernetes+7
5
1156
May 21 2020 at 12:02AM

Rancher Labs

KubernetesAmazon EC2Grafana+12
6
1533
Apr 16 2020 at 5:34AM

Rancher Labs

KubernetesRancher+2
3
973
What are some alternatives to AWS Lambda and Kubernetes?
Serverless
Build applications comprised of microservices that run in response to events, auto-scale for you, and only charge you when they run. This lowers the total cost of maintaining your apps, enabling you to build more logic, faster. The Framework uses new event-driven compute services, like AWS Lambda, Google CloudFunctions, and more.
Azure Functions
Azure Functions is an event driven, compute-on-demand experience that extends the existing Azure application platform with capabilities to implement code triggered by events occurring in virtually any Azure or 3rd party service as well as on-premises systems.
AWS Elastic Beanstalk
Once you upload your application, Elastic Beanstalk automatically handles the deployment details of capacity provisioning, load balancing, auto-scaling, and application health monitoring.
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.
Google App Engine
Google has a reputation for highly reliable, high performance infrastructure. With App Engine you can take advantage of the 10 years of knowledge Google has in running massively scalable, performance driven systems. App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow.
See all alternatives