Choosing an AWS compute service
Taking the first step
|
Purpose |
Help determine which AWS compute service is the best fit for your organization. |
|
Last updated |
November 13, 2026 |
|
Covered services |
|
Introduction
AWS compute services are designed to meet the varied demands of modern applications, from small-scale projects to enterprise-grade solutions. These services provide scalable computing power that helps you to build, deploy, and manage applications.
To get the most from your investment in these services, it's important to choose the right services for the right task or use case, whether it involves processing basic web app requests or running complex, data-intensive algorithms.
You can, for example, use:
-
Amazon Elastic Compute Cloud (Amazon EC2) to launch and manage virtual servers
-
AWS Elastic Beanstalk to quickly deploy and manage web applications with minimal management of the infrastructure that runs those applications
-
AWS Lambda to run code without provisioning or managing servers. Lambda offers three form factors:
-
Lambda Event Functions for event-driven processing
-
Lambda Web Functions for HTTP web applications and APIs
-
Lambda MicroVMs for isolated, stateful sandboxes that run user-generated or AI-generated code
-
-
Amazon Elastic Container Service (Amazon ECS) or Amazon Elastic Kubernetes Service (Amazon EKS) to run and manage containers
-
AWS Fargate to run containers on AWS managed compute, or AWS Batch to process large volumes of data in parallel
You can also use multiple types of compute solutions in a single workload, as each one has its own advantages.
This guide helps you select the AWS compute services and tools that are the best fit for your needs and your organization.
This two-minute excerpt is from a presentation at re:Invent 2023 by Lorenzo Winfrey, an AWS Senior Business Development Specialist. He provides an overview of AWS compute application use cases.
Understand
AWS compute services provide secure and resizable compute capacity in the cloud. AWS offers a range of compute services to meet various application requirements. These include Amazon EC2 for resizable virtual servers, Elastic Beanstalk for deploying web applications on your choice of a number of popular platforms, AWS Lambda for serverless compute (offered as Event Functions, Web Functions, and MicroVMs), Amazon ECS and Amazon EKS for container orchestration, and AWS Fargate for serverless containers.
Furthermore, AWS Batch facilitates batch computing. AWS hybrid and edge services such as AWS Local Zones and AWS Outposts bring AWS infrastructure and services to metropolitan areas, on-premises locations, and edge sites, addressing requirements for low latency, digital sovereignty, and local data processing. Additionally, Amazon EC2 Auto Scaling automatically adjusts capacity. These services cater to different workload needs, from basic virtual machines (VMs) to fully managed serverless and container solutions.
Expand each of the following categories to learn more:
Amazon EC2 offers a wide range of instance types tailored to different workloads and applications. You can choose from a range of configurations, including different combinations of CPU, memory, storage, and networking capacity. EC2 provides a large variety of compute capacity options optimized for various workloads: general purpose, compute optimized, memory optimized, storage optimized, accelerated computing, and high-performance computing.
-
Amazon EC2: Amazon EC2 provides on-demand, scalable computing capacity in the Amazon Web Services (AWS) Cloud. Amazon EC2 includes AWS Graviton-based instances for price-performance on general purpose and compute-intensive applications, with Graviton5-based families such as C9g and M9g and Graviton4-based families such as the 8g generation. For AI/ML and accelerated workloads, Amazon EC2 offers Trn3 UltraServers powered by AWS Trainium3 and Trn2 instances powered by AWS Trainium2 for training and inference, P6-B200 instances powered by NVIDIA Blackwell GPUs for large-scale GPU training and inference, and G6f instances with fractional GPUs for cost-optimized inference and graphics workloads.
-
Amazon EC2 Auto Scaling: Amazon EC2 Auto Scaling helps you maintain application availability and lets you automatically add or remove Amazon EC2 instances by using scaling policies that you define.
-
EC2 Image Builder: EC2 Image Builder is a fully managed AWS service that helps you automate the creation, management, and deployment of customized, secure, and up-to-date server images.
-
AWS Elastic Beanstalk: AWS Elastic Beanstalk supports applications developed in Python, Node.js, Java, .NET, PHP, Ruby, and Go. Elastic Beanstalk also supports Docker platforms. With Docker containers you can choose your own programming language and application dependencies that may not be supported by the other Elastic Beanstalk platforms. Elastic Beanstalk platform branches run on Amazon Linux 2023. Elastic Beanstalk set all platform branches based on Amazon Linux 2 to retired on August 6, 2026, so you must migrate existing Amazon Linux 2 environments to Amazon Linux 2023. Elastic Beanstalk offers two deployment modes:
-
Standard Mode: The existing experience. Each application gets its own dedicated environment on Amazon EC2 instances, and all current platforms are supported.
-
Cluster Mode: Runs multiple applications on shared infrastructure in your account, powered by Amazon EKS. You provide source code, a Dockerfile, or a container image in Amazon ECR, and Elastic Beanstalk handles containerization, provisioning, and operations. Cluster Mode can lower the compute cost per application as the number of applications grows. It supports event-driven autoscaling, OpenTelemetry-based observability, AWS Secrets Manager integration, and HTTPS by default. There's no extra charge for Cluster Mode; you pay for the resources it uses, including the Amazon EKS cluster and EKS Auto Mode charges.
-
-
Amazon Lightsail: Amazon Lightsail provides an easy way to build web applications providing instances, container services, managed databases, content delivery network distributions, load balancers, SSD-based storage, and DNS management.
We offer Amazon EC2 instances with hardware accelerators for machine learning and high-performance computing. These instances support model training, inference, and other compute-intensive workloads.
-
Choose Trn3 UltraServers
, powered by AWS Trainium3 chips, when you need to train and serve frontier-scale generative AI models. Trn3 UltraServers scale up to 144 Trainium3 chips. Compared with Trainium2, each chip delivers up to 2x MXFP8 compute and 1.7x memory bandwidth. -
Choose Trn2 instances
, powered by AWS Trainium2 chips, when you need to train and run inference for large machine learning and generative AI models. -
Choose P6-B200 instances
, powered by NVIDIA Blackwell GPUs, when you need GPU-based compute for medium-to-large scale training and inference. -
Choose G6f instances
, which provide fractional GPU allocations, when you need cost-optimized GPU compute for inference and graphics workloads.
AWS container compute options are designed to help you deploy, manage, and scale containerized applications efficiently. Amazon ECS, for example, allows you to run and manage Docker containers at scale, handling cluster management and orchestration of containers. Amazon EKS provides a fully managed Kubernetes service, simplifying the deployment, management, and scaling of containerized applications using Kubernetes.
You have the option of running containers on EC2 instances that you manage, or you can run them on Fargate on AWS managed compute. Additionally, AWS offers Amazon Elastic Container Registry (Amazon ECR), a fully managed Docker container registry.
-
Amazon ECS: Amazon ECS is a fully managed container orchestration service that helps you deploy, manage, and scale containerized applications.
-
Amazon ECS Anywhere: Amazon ECS Anywhere provides support for registering an external instance such as an on-premises server or VM, to your Amazon ECS cluster.
-
Amazon ECS Express Mode: Amazon ECS Express Mode helps you deploy a web application and its supporting infrastructure, including a Fargate-based service, a load balancer, and auto scaling, from a container image.
-
Amazon ECS Managed Instances: Amazon ECS Managed Instances is a fully managed compute option that runs your containers on Amazon EC2 instances that AWS provisions, patches, and scales for you. It provides a compute tier between Fargate and self-managed Amazon EC2, giving you access to specific Amazon EC2 instance types, including GPU instances, while AWS manages the underlying infrastructure.
-
Amazon EKS: Amazon EKS is a managed service that helps you deploy, manage, and scale containerized applications using Kubernetes on AWS infrastructure. Amazon EKS removes the need to install, operate, and maintain your own Kubernetes control plane on AWS. You can run the Amazon EKS data plane with EKS Auto Mode, with managed node groups or self-managed nodes (commonly scaled with Karpenter), on Fargate, or on your own infrastructure with EKS Hybrid Nodes.
-
EKS Auto Mode: EKS Auto Mode extends AWS management beyond the Kubernetes control plane to the cluster infrastructure that runs your workloads. We set up, scale, patch, and upgrade nodes, and run compute autoscaling, pod and service networking, application load balancing, cluster DNS, block storage, and GPU support as built-in components rather than add-ons. Nodes use immutable, locked-down AMIs and are replaced automatically after a maximum lifetime of 21 days. You keep using standard Kubernetes tools, and you can customize behavior with NodePools and NodeClasses.
-
EKS Hybrid Nodes: EKS Hybrid Nodes let you use your on-premises and edge servers or virtual machines as nodes in an Amazon EKS cluster. We manage the Kubernetes control plane in the AWS Region, and you manage the hybrid nodes. A single cluster can combine hybrid nodes with nodes in AWS Regions, AWS Local Zones, or AWS Outposts. You pay per hour for the vCPUs of attached hybrid nodes.
-
Amazon EKS Anywhere
: Amazon EKS Anywhere is a container management software built by AWS that helps you run and manage Kubernetes clusters on-premises and at the edge. -
Amazon ECR: Amazon ECR is an AWS managed container image registry service that is secure, scalable, and reliable.
-
AWS Batch: AWS Batch is a fully managed batch computing service that plans, schedules, and runs your containerized batch machine learning, simulation, and analytics workloads across the full range of AWS compute offerings, such as Amazon ECS, Amazon EKS, Fargate, and Spot or On-Demand Instances. AWS Batch also supports Amazon ECS Managed Instances compute environments, and you can use AWS Batch to schedule Amazon SageMaker AI training jobs through job queues.
AWS offers serverless compute options, including AWS Lambda and AWS Fargate. With these options, you can run workloads without provisioning or managing servers. We take on as much of the underlying infrastructure management as possible, so developers can focus on writing code.
-
AWS Fargate: AWS Fargate is a serverless compute engine for containers. You can use it with Amazon ECS, Amazon EKS, and AWS Batch to run containers without managing servers or clusters of Amazon EC2 instances. Each task or pod runs in its own isolated environment. For Linux workloads, Fargate supports task sizes up to 32 vCPU for compute-intensive containerized workloads.
-
AWS Lambda: Lambda is a serverless compute service. It handles all administration of the compute resources, including server and operating system maintenance, capacity provisioning, automatic scaling, and logging. Lambda offers three form factors. All three are built on Firecracker virtualization technology, and each is designed for a different programming model:
-
Lambda Event Functions: Lambda Event Functions are the new name for what were previously called Lambda functions. They use an event-driven handler model: the function receives an event, processes it, and returns a response. Each execution environment processes one request at a time, and you're billed for the duration your code runs. Event Functions suit event processing, queue and stream consumers, scheduled jobs, and invocations triggered by other AWS services. To reduce cold-start latency, you can enable Lambda SnapStart, which supports Java, Python, and .NET functions and container image functions.
-
Lambda Web Functions: Lambda Web Functions use an HTTP-native programming model. Your code is a standard web server that listens on a port. You can use Node.js web frameworks such as Express, Hono, Fastify, or Next.js without Lambda-specific adapters or wrappers.
-
Concurrency: Each execution environment handles multiple concurrent requests (up to 128), so traffic bursts can share warm environments.
-
Billing: You pay for requests, the CPU time your code actively uses, memory for the lifetime of each execution environment, and data transfer. Time spent waiting on a database or downstream API uses little CPU. This makes Web Functions cost-effective for I/O-heavy workloads such as API backends, server-side rendering, and streaming AI responses.
-
Multi-Region deployment: You can deploy one Web Function to multiple AWS Regions behind a single global endpoint. Lambda routes each request to the lowest-latency Region.
-
Deployment and traffic controls: Web Functions support immutable revisions, weighted traffic shifting between revisions for canary releases, response streaming, and scaling to zero.
-
Launch scope: At launch, Web Functions support Node.js runtimes on Arm64 in a subset of AWS Regions. For the current runtimes and Regions, see the Lambda Web Functions documentation.
-
-
Lambda MicroVMs: Lambda MicroVMs are isolated, stateful sandbox environments whose lifecycle you manage. They provide VM-level isolation, near-instant launch and resume, and the ability to suspend and resume execution for up to 8 hours. You can give each user, session, or job its own MicroVM.
-
Images and access: You build a MicroVM image from a Dockerfile. Each MicroVM gets a dedicated HTTPS URL that supports HTTP/2, gRPC, and WebSockets.
-
Use cases: MicroVMs fit multi-tenant applications that run code supplied by end users or generated by AI. Examples include interactive coding environments, coding assistants and agentic workflows, data analytics notebooks, and vulnerability scanning.
-
Billing: You pay for baseline compute resources while a MicroVM runs. You also pay for the active duration of any additional resources your workload uses above that baseline.
-
The three form factors complement each other and share the same operational model. For example, a single application might use:
-
Event Functions for asynchronous backend processing
-
Web Functions for its user-facing API and server-side rendering
-
MicroVMs for an interactive code-execution feature
Capacity option: Lambda Managed Instances: Lambda Managed Instances run Lambda Event Functions on current-generation Amazon EC2 instances in your account, including AWS Graviton4 and network-optimized instance types. Lambda still manages instance lifecycle, OS and runtime patching, routing, load balancing, and scaling.
-
Concurrency and scaling: Each execution environment handles multiple concurrent invocations. Scaling is based on CPU utilization, without cold starts. Managed Instances don't scale to zero: they maintain a configured minimum number of execution environments.
-
Isolation: Isolation comes from containers on Amazon EC2 Nitro instances rather than from Firecracker microVMs.
-
Pricing: You pay the Amazon EC2 instance price plus a management fee. Amazon EC2 Savings Plans, Reserved Instances, and other Amazon EC2 discounts apply to the instance portion. Managed Instances currently support Event Functions only. For containerized workloads on managed Amazon EC2 capacity, see Amazon ECS Managed Instances in Container services.
-
AWS provides hybrid and edge compute options that allow you to extend AWS infrastructure and services to your premises and the edge. These edge and hybrid compute options provide flexibility and scalability for a wide range of use cases across different network environments.
-
AWS Local Zones: AWS Local Zones places compute, storage, database, and other select AWS resources close to large population and industry centers. You can use Local Zones to provide your users with low-latency access to your applications.
-
AWS Dedicated Local Zones
: AWS Dedicated Local Zones are a type of AWS Infrastructure that is fully managed by AWS, built for exclusive use by a customer or community, and placed in a customer-specified location or data center to comply with regulatory requirements. -
AWS Outposts: AWS Outposts is a fully managed service that extends AWS infrastructure, services, APIs, and tools to customer premises. AWS Outposts is available as multi-rack deployments or as a self-contained single rack. The single-rack option fits locations with limited space and power and supports current x86-based Amazon EC2 instance families.
-
AWS Wavelength: AWS Wavelength helps developers to build applications that deliver ultra-low latencies to mobile devices and end users. Wavelength deploys standard AWS compute and storage services to the edge of communications service providers' (CSPs') 5G networks.
AWS provides cost optimization services that allow you to reduce your AWS costs by committing to a usage level and generating recommendations to reduce the cost of your workloads.
-
Savings Plans: Savings Plans is a flexible pricing model that can help you reduce your bill compared to On-Demand prices, in exchange for a one- or three-year hourly spend commitment.
-
AWS Compute Optimizer: AWS Compute Optimizer provides artificial intelligence and machine learning-based analytics to help you right size your workloads, reduce costs, and improve the performance of your workloads.
-
Amazon EC2 Spot Instances: Amazon EC2 Spot Instances let you use unused Amazon EC2 capacity at a lower price than On-Demand pricing.
Elastic Load Balancing (ELB) automatically distributes your incoming traffic across multiple targets, such as EC2 instances, containers, and IP addresses, in one or more Availability Zones.
-
Application Load Balancer: An Application Load Balancer functions at the application layer, the seventh layer of the Open Systems Interconnection (OSI) model. After the load balancer receives a request, it evaluates the listener rules in priority order to determine which rule to apply, and then selects a target from the target group for the rule action.
-
Network Load Balancer: A Network Load Balancer functions at the fourth layer of the OSI model. It can handle millions of requests per second. After the load balancer receives a connection request, it selects a target from the target group for the default rule.
-
Gateway Load Balancers: Gateway Load Balancers help you to deploy, scale, and manage virtual appliances, such as firewalls, intrusion detection and prevention systems, and deep packet inspection systems.
Consider
Consider the following key factors when choosing an AWS compute service. Balancing these factors against your workload needs, technical requirements, and business objectives helps you optimize for performance, cost, and ease of management.
Choose
Now that you know the criteria by which you're evaluating your compute options, you're ready to choose which AWS compute services might be a good fit for your organizational requirements.
Start by choosing the compute model that fits how you want to build and operate your workload. Then use the category table and, for Lambda, the form-factor table to narrow your choice.
| Your goal | Compute model | Start with |
|---|---|---|
| Control the operating system, instance type, and full software stack | Virtual machines | Amazon EC2 (with Amazon EC2 Auto Scaling), or Elastic Beanstalk or Amazon Lightsail for a managed platform |
| Package applications as containers and choose your orchestrator | Containers | Amazon ECS or Amazon EKS; then choose capacity such as Fargate, Amazon ECS Managed Instances, EKS Auto Mode, or Amazon EC2 instances you manage. See Choosing an AWS container service. |
| Run code without managing servers or containers | Serverless functions and sandboxes | AWS Lambda; then choose a form factor in the Choosing a Lambda form factor table |
| Run large-scale batch or high performance computing (HPC) jobs | Batch | AWS Batch (on Amazon EC2, Fargate, Amazon ECS Managed Instances, or Amazon EKS) |
| Run on premises, at the edge, or close to end users | Hybrid and edge | AWS Outposts, AWS Local Zones, AWS Dedicated Local Zones, AWS Wavelength, Amazon ECS Anywhere, Amazon EKS Anywhere, or EKS Hybrid Nodes |
The following table highlights which services are optimized for which circumstances.
| Compute category | What is it optimized for? | Compute services |
|---|---|---|
| Amazon EC2 | Providing scalable high-performance computing resources for CPU-intensive workloads. | |
| Container services | Helping your teams focus on building applications rather than the runtime environment or managing a control plane. |
AWS Elastic Beanstalk (Cluster Mode) |
| Serverless compute | Minimizing your AWS management overhead, allowing you to focus on implementing your business logic. |
AWS Lambda Event Functions (optionally on Lambda Managed Instances) |
| On-premises and edge compute | Allowing you to run familiar AWS interfaces to your premises and the edge, providing lower latency and local data processing needs. | |
| Cost and savings optimization | Helping you reduce your AWS costs for your workloads. | |
| Elastic Load Balancing | Increasing the availability and fault tolerance of your applications. |
If you've decided that Lambda fits your workload, use the following table to choose a form factor. The Event Functions row also notes when to run Event Functions on Lambda Managed Instances.
| Your goal | Choose | Why |
|---|---|---|
| Process events from queues, streams, Amazon S3, schedules, or other AWS services | Lambda Event Functions | Event-driven handler model; scales to zero. For steady, high-volume traffic or specific Amazon EC2 hardware or pricing, run Event Functions on Lambda Managed Instances. |
| Serve web applications, REST or GraphQL APIs, server-side rendering, or streaming HTTP responses using Node.js web frameworks | Lambda Web Functions | HTTP-native and multi-concurrent, with a multi-Region endpoint. Active CPU billing can lower cost for I/O-heavy workloads. Node.js only at launch. |
| Run user-generated or AI-generated code in a dedicated, isolated, stateful environment per user, session, or job | Lambda MicroVMs | VM-level isolation, fast launch and resume, suspend for up to 8 hours |
| Run HTTP services in other languages, long-running processes, or workloads that need more runtime control | Containers (for example, Amazon ECS Express Mode, or AWS Fargate with Amazon ECS or Amazon EKS) | Any language and runtime. Amazon ECS Express Mode provisions the service, load balancer, HTTPS, and auto scaling from a container image. For help choosing, see AWS Fargate or AWS Lambda?. |
Use
You should now have a clear understanding of each AWS compute service (and the supporting AWS tools and services) and which one might be the best fit for your organization and use case.
To explore how to use and learn more about each of the available AWS compute services, we have provided a pathway to learn how each of the services work. The following section provides links to in-depth documentation, hands-on tutorials, and resources to get you started.
Amazon EC2
Container services
Serverless
On-premises and hybrid
Cost and savings optimization
Elastic Load Balancing
Explore
-
Architecture diagrams
Explore reference architecture diagrams for compute on AWS.
-
Whitepapers
Explore whitepapers to help you get started and learn best practices for compute services and use cases.
-
AWS Solutions
Explore vetted solutions and architectural guidance for common use cases for compute.