---
title: "Scale distributed AI workloads with Ray and Anyscale on Amazon EC2"
description: "Ray, run as the managed Anyscale service inside your own AWS account, can carry a multimodal AI/ML pipeline from a single instance to multi-node clusters without code changes."
url: "https://swe.quest/articles/scale-distributed-ai-workloads-with-ray-and-anyscale-on-amazon-ec2-0c6441d44d076c17"
canonical: "https://aws.amazon.com/blogs/architecture/scale-distributed-ai-workloads-with-ray-and-anyscale-on-amazon-ec2/"
source: "AWS Architecture Blog"
published: "2026-11-12"
difficulty: "easy"
kind: "How-to"
reading_minutes: 8
tags: ["ml-platform","cloud","cost-optimization","model-training","inference"]
---

# Scale distributed AI workloads with Ray and Anyscale on Amazon EC2

A post on [AWS Architecture Blog](https://swe.quest/sources/aws-architecture.md), published 2026-11-12, 8 min read, How-to. Original: [https://aws.amazon.com/blogs/architecture/scale-distributed-ai-workloads-with-ray-and-anyscale-on-amazon-ec2/](https://aws.amazon.com/blogs/architecture/scale-distributed-ai-workloads-with-ray-and-anyscale-on-amazon-ec2/)

## Summary

Ray, run as the managed Anyscale service inside your own AWS account, can carry a multimodal AI/ML pipeline from a single instance to multi-node clusters without code changes. There are three deployment paths: plain EC2 with EFA as the default, EKS with Karpenter for Kubernetes shops, and SageMaker HyperPod for long, failure-sensitive training runs. Each Ray library is mapped to suitable hardware: Graviton and Spot for Ray Data preprocessing, GPUs and Trainium for Ray Train, and Inferentia or Graviton for Ray Serve. Costs are layered as Savings Plans plus Spot (with head nodes kept On-Demand and checkpoint-based recovery), Capacity Blocks for scheduled training, and On-Demand for bursts.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [ML platforms](https://swe.quest/tags/ml-platform.md) (AI & ML)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)

## Prerequisites

- distributed ML training basics ([easy posts on Machine learning](https://swe.quest/tags/machine-learning.md?difficulty=easy))
- AWS EC2 instance types ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- Kubernetes basics ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))

## Keywords

Ray, Anyscale, Amazon EC2, Amazon EKS, SageMaker HyperPod, AWS Trainium, AWS Graviton, Elastic Fabric Adapter

## Related posts

- [Building Blocks for Foundation Model Training and Inference on AWS](https://swe.quest/articles/building-blocks-for-foundation-model-training-and-inference-on-aws-788daf28b6ff2749.md): Hugging Face · 2026-05-11 · Hard · 20 min read · Model training, Hardware, Cloud platforms, Scheduling, Networking
  Foundation-model pre-training, post-training and test-time inference now converge on the same infrastructure needs: tightly coupled accelerators, high-bandwidth low-latency networking, tiered distributed storage, orchestration and observability.
- [Why we’re switching to Hugging Face Inference Endpoints, and maybe you should too](https://swe.quest/articles/why-we-re-switching-to-hugging-face-inference-endpoints-and-maybe-you-should-too-bfdcddeceab350fa.md): Hugging Face · 2023-02-15 · Medium · 6 min read · Inference & serving, ML platforms, Cost optimization, Cloud platforms
  A team moved CPU-based transformer inference off a self-built FastAPI + Docker + AWS ECS/Fargate stack onto Hugging Face Inference Endpoints, collapsing deployment to train, push to Hub, deploy.
- [Run AI workloads on any cloud, store on Hugging Face: zero-egress storage with SkyPilot](https://swe.quest/articles/run-ai-workloads-on-any-cloud-store-on-hugging-face-zero-egress-storage-with-595c5291113e315b.md): Hugging Face · 2026-07-07 · Medium · 8 min read · Storage systems, Cloud platforms, Model training, Cost optimization, ML platforms
  SkyPilot now supports Hugging Face Storage as a first-class backend (\`store: hf\`), so jobs on any of 20+ clouds, Kubernetes or on-prem can mount Hub buckets (read-write) or model/dataset repos (read-only) via an \`hf://\` URL and an existing \`HF\_TOKEN\`.
- [Autoscaling Autoresearch: Give your agents elastic GPUs on Modal](https://swe.quest/articles/autoscaling-autoresearch-give-your-agents-elastic-gpus-on-modal-149826d2e84207c1.md): Modal · 2026-04-14 · Medium · 8 min read · AI agents, ML platforms, Serverless, Model training, Capacity planning
  A Claude Code agent equipped with Modal Skills ran OpenAI's Parameter Golf challenge overnight, executing 113 experiments over 238 GPU-hours and dropping bits-per-byte from 1.42 to 1.12.
- [Slack AI: The Path to Multi-Cloud](https://swe.quest/articles/slack-ai-the-path-to-multi-cloud-ce2850c85b697c97.md): Slack Engineering · 2026-05-28 · Medium · 14 min read · Inference & serving, Cloud platforms, Resilience, LLMs, Capacity planning
  Slack AI's LLM serving evolved over three years through four phases: self-managed AWS SageMaker endpoints in an escrow VPC, Amazon Bedrock Provisioned Throughput, a hybrid of Provisioned Throughput and On-Demand with spillover routing, and finally a multi-cloud setup adding GCP Vertex AI.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
