AWS GPU Instances for AI: Which One to Pick and What It Costs

A single g6.xlarge with one NVIDIA L4 costs about $0.80 an hour in us-east-1. Leave it running all month and that’s roughly $588, for one small GPU most people only needed during work hours.

That’s the theme of picking AWS GPU instances: the right family matters, but how long it runs matters more.

This guide maps each family to a job, shows real hourly prices, and points out where Trainium, Inferentia or no instance at all is the cheaper answer.

For the basics of instances in general, start with our guide to Amazon EC2.

Last checked against the AWS EC2 docs and AWS’s published On-Demand price list on December 5, 2026.

Prototype or small model inference: G6 (L4) or G5 (A10G). Bigger inference, fine-tuning: G6e (L40S). Large-scale training: P5, P5en or P6. Cheaper training at scale: Trn2. Cheap steady inference: Inf2.

This post contains affiliate links. As an Amazon Associate, Stepstocloud.com earns from qualifying purchases.

Choosing hardware is easier once you know how the model will be served and measured. Designing Machine Learning Systems by Chip Huyen covers that decision before you spend on GPUs.

AWS GPU instances: four server trays growing from one accelerator card to eight cards
AWS GPU instance sizes scale from one accelerator to eight in the same family, and the price scales with them.

What each family is for

AWS groups these under accelerated computing. The EC2 accelerated computing specs list the chip, count and memory for every size. Here are the ones that matter for AI work, with the largest size of each.

FamilyAcceleratorLargest sizeBest for
G4dnNVIDIA T48 GPUs, 128 GiBCheapest GPU for light inference and testing
G5NVIDIA A10G8 GPUs, 178 GiBSmall to mid models, graphics
G6NVIDIA L48 GPUs, 178 GiBEfficient inference, video, small fine-tunes
G6eNVIDIA L40S8 GPUs, 357 GiBLarger inference, fine-tuning mid-size models
G7eNVIDIA RTX PRO Server 60008 GPUs, 768 GiBNewest G family for heavy inference and graphics
P4d / P4deNVIDIA A1008 GPUs, 320 / 640 GiBOlder training workloads
P5NVIDIA H1008 GPUs, 640 GiBTraining and large-model inference
P5e / P5enNVIDIA H2008 GPUs, 1,128 GiBSame, with more memory per GPU
P6-B200 / P6-B300NVIDIA B200 / B3008 GPUs, 1,432 / 2,148 GiBFrontier-scale training
P7-RubinNVIDIA Rubin8 GPUs, 2,016 GBAWS’s newest GPU family
Trn2 / Trn3AWS Trainium2 / Trainium316 chipsTraining and serving large models on AWS silicon
Inf2AWS Inferentia212 chips, 384 GiBLow-cost, high-throughput inference
AWS EC2 docs table of accelerated computing instances showing accelerator type, count and memory
The EC2 docs list each size’s accelerator, how many it has and their total memory: the three numbers that decide what model fits.

The G families are the everyday choice. The P families are for training runs and very large models, and their smallest common size is already eight GPUs, except p5.4xlarge, which gives you a single H100.

See also  AWS Outposts: What It Is, What It Costs and When to Skip It

What they really cost per hour

These are On-Demand Linux prices in US East (N. Virginia) from AWS’s published price list on December 3, 2026. Other Regions usually cost more, so check London, Canada Central or Sydney separately.

InstanceAcceleratorsPer hourIf left on for a month (730 h)
g4dn.xlarge1x T4$0.526$383.98
g6.xlarge1x L4$0.8048$587.50
g5.xlarge1x A10G$1.006$734.38
g6e.xlarge1x L40S$1.861$1,358.53
inf2.xlarge1x Inferentia2$0.7582$553.49
p5.4xlarge1x H100$6.88$5,022.40
p5.48xlarge8x H100$55.04$40,179.20
p5en.48xlarge8x H200$63.296$46,206.08
p6-b200.48xlarge8x B200$113.9328$83,170.94

One detail worth noticing: p5.48xlarge works out to exactly $6.88 per H100 per hour, the same as p5.4xlarge. You pay for the GPU, not a bulk discount, so only rent eight if the job can use eight.

Trn2 and Trn3 didn’t appear in the On-Demand price list we checked; they’re offered through EC2 Capacity Blocks for ML, covered below. Our guide to how AWS pricing works covers Savings Plans and Spot.

Three bills worth doing the math on

A dev box you only use in work hours

A g6.xlarge run 8 hours a day, 22 days a month, is 176 hours: 176 x $0.8048 = $141.64. Left on around the clock it’s $587.50.

Stopping it when you log off saves about $446 a month on one small GPU.

A one-day fine-tune on eight H100s

A p5.48xlarge for 24 hours costs 24 x $55.04 = $1,320.96. A forgotten weekend after the job finishes adds another $2,641.92, which is why teams script the shutdown into the training job itself.

Always-on inference for a small model

An inf2.xlarge serving a compiled model 24/7 runs $553.49 a month, cheaper than a g5.xlarge at $734.38. The catch is the work: models must be compiled with the AWS Neuron SDK first.

A GPU board, a custom training chip and an inference chip standing side by side on pedestals
NVIDIA GPUs run almost any framework; Trainium and Inferentia cost less for steady work but need the Neuron SDK.

When Trainium or Inferentia makes sense

AWS builds its own AI chips. The Trn2 instance page lists 16 Trainium2 chips and 1.5 TB of accelerator memory per instance, and AWS claims 30-40% better price performance than its H200-based P5e and P5en.

See also  How To Become AWS Certified? Full AWS Certification List

Trn3 uses Trainium3, AWS’s first 3 nm chip, with 144 GB of HBM3e per chip. Both run PyTorch, JAX and vLLM through the AWS Neuron SDK.

For inference, AWS Inferentia2 puts up to 12 chips in an instance, each with 32 GB of memory. It suits steady, high-volume serving of a model you’ve already settled on.

Pick NVIDIA when you need any framework, any CUDA library or fast experiments. Pick AWS chips when the model is stable, the volume is high and someone on the team can own the Neuron compile step.

Will the model fit?

GPU memory, not speed, is usually the first wall. A common rule of thumb: model weights in 16-bit precision need about 2 bytes per parameter, plus room for the KV cache and activations.

Model sizeWeights in 16-bitFits on
7-8B parametersabout 14-16 GBOne L4, A10G or L40S, with room for the KV cache
13B parametersabout 26 GBOne L40S, or a quantized version on an L4
70B parametersabout 140 GBSeveral H100s, or two or more H200s; or quantize it

Quantizing to 8-bit or 4-bit roughly halves or quarters those numbers, which is often the cheapest fix of all.

Getting GPUs at all: quotas and Capacity Blocks

New accounts often can’t launch a GPU on day one. According to the EC2 instance quotas page, the vCPU quotas for P, G and VT, Inf and Trn instances start at 0.

You request an increase in Service Quotas, and AWS also raises quotas automatically as you use more.

AWS docs table of EC2 On-Demand vCPU quotas with P, G and VT, Inf and Trn instances defaulting to 0
The default vCPU quota for GPU and AI-chip instances is 0, so request an increase before launch day.

This checks your G and VT quota (quota code L-DB2E81BA) in us-east-1:

aws service-quotas get-service-quota \
  --service-code ec2 \
  --quota-code L-DB2E81BA \
  --region us-east-1 \
  --query "Quota.Value"

And this shows which Availability Zones actually offer a type, since not every zone has every GPU. Our guide to AWS Regions and Availability Zones explains why that matters.

aws ec2 describe-instance-type-offerings \
  --location-type availability-zone \
  --filters Name=instance-type,Values=g6e.xlarge \
  --region us-east-1 \
  --query "InstanceTypeOfferings[].Location"

For big jobs, EC2 Capacity Blocks for ML let you reserve P or Trn instances for a future date: 1 to 14 days, or multiples of 7 up to 182 days, booked up to 8 weeks ahead.

You pay up front, the price is set by supply and demand, and a block can’t be cancelled.

You may not need an instance at all

If you only want to call a model like Claude, Llama or Nova, Amazon Bedrock is serverless: no GPUs to pick, size or forget. You pay per token instead of per hour.

See what Amazon Bedrock is and our Bedrock pricing examples.

Training or hosting your own model is where instances, or SageMaker AI on top of them, come in. Our Bedrock vs SageMaker AI comparison shows where that line sits.

See also  What Is IaaS, PaaS, SaaS, DBaaS In Cloud Computing?

Mistakes that quietly cost money

  • Leaving GPU instances running overnight. Stop them, or schedule the stop; a stopped instance doesn’t bill compute, though its EBS storage still does.
  • Renting eight GPUs for a one-GPU job. The per-GPU price is the same, so you just pay eight times.
  • Starting with a P instance. Prove the code on a G6 first, then scale up.
  • Forgetting the quota. A 0 vCPU quota blocks the launch; ask days before you need it.
  • No billing alarm. A billing alert catches a forgotten p5 within hours, not at month end.
Books on machine learning systems design on a desk

Designing Machine Learning Systems (Chip Huyen)

How to plan training, serving and monitoring, so the GPU you rent matches the job.

Check price on Amazon
Books on building AI applications

AI Engineering (Chip Huyen)

Inference optimization, quantization and cost control for apps built on foundation models.

Check price on Amazon
Pinterest pin: AWS GPU instances for AI explained, from a small one-GPU tray to an eight-GPU server

Frequently asked questions

What is the cheapest GPU instance on AWS?

Among current NVIDIA options, g4dn.xlarge with one T4 is the cheapest at $0.526 an hour On-Demand in us-east-1. The newer g6.xlarge with an L4 costs $0.8048 an hour and is faster and more efficient for most AI inference.

How much does an H100 cost per hour on AWS?

In us-east-1, p5.4xlarge with one H100 costs $6.88 an hour On-Demand, and p5.48xlarge with eight H100s costs $55.04, which is the same $6.88 per GPU. Prices differ by Region, and Capacity Blocks are priced separately.

Why can’t I launch a GPU instance in a new AWS account?

The vCPU quotas for P, G and VT, Inf and Trn instances start at 0. Request an increase for the right quota in the Service Quotas console, such as Running On-Demand G and VT instances, and allow time for approval before you need the instance.

Is Trainium cheaper than NVIDIA GPUs?

AWS claims Trn2 gives 30 to 40 percent better price performance than its H200-based P5e and P5en instances. The saving depends on your model and on porting it to the AWS Neuron SDK, so test a real workload before committing.

Which AWS GPU should I use for LLM inference?

For models up to about 8 billion parameters, one L4 on G6 or an A10G on G5 is usually enough. Mid-size models fit better on G6e with the L40S. Large models need P5 or P5en, or a quantized version on a smaller GPU.

Do I need a GPU instance to use Claude or Llama on AWS?

No. Amazon Bedrock is serverless, so you call models such as Claude, Llama and Nova through an API and pay per token. GPU instances are for training, fine-tuning or hosting your own models.

Conclusion

The cheapest GPU is the one that’s switched off when nobody is using it. After that, match the family to the job and check memory before speed.

  • G6 and G5 for prototypes and small-model inference; G6e when you need more memory.
  • P5, P5en and P6 for serious training; p5.4xlarge if you only need one H100.
  • Trn2 and Inf2 cut costs for stable, high-volume work if you can use the Neuron SDK.
  • GPU quotas start at 0, so request an increase early.
  • Bedrock skips instances entirely when you only need to call a model.

Recommended reading

Leave a Comment