0Pricing
AWS for Backend Developers (EC2, S3, RDS, Lambda) · Lektion

Spot Instances und kosteneffizientes Computing

Lernen Sie, EC2 Spot Instances und gemischte Instance-Flotten zu verwenden, um Rechenkosten deutlich zu senken und Unterbrechungen souverän zu bewältigen.

Spot Instances und kosteneffizientes Computing ist eine kostenlose AWS for Backend Developers (EC2, S3, RDS, Lambda)-Lektion auf CoddyKit. Dies ist Lektion 4 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des AWS for Backend Developers (EC2, S3, RDS, Lambda)-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der AWS for Backend Developers (EC2, S3, RDS, Lambda)-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

What Are Spot Instances?

Spot Instances let you use spare EC2 capacity at discounts of up to 90% versus On-Demand pricing.

The catch: AWS can reclaim them with a short warning when it needs the capacity back.

On-Demand vs Reserved vs Spot

Three pricing models:

  • On-Demand — pay per second, no commitment, full price
  • Reserved / Savings Plans — commit for 1-3 years, big discount
  • Spot — cheapest, but interruptible

Good Workloads for Spot

Spot shines for fault-tolerant, flexible workloads:

  • Batch processing and data analysis
  • CI/CD build runners
  • Stateless web tiers behind a load balancer
  • Containerized jobs

The Interruption Notice

Before reclaiming a Spot Instance, AWS sends a two-minute interruption notice via instance metadata. Your app should check for it and shut down gracefully.

curl http://169.254.169.254/latest/meta-data/spot/instance-action

Requesting a Spot Instance

You can request Spot capacity through the CLI, an Auto Scaling group, or a Spot Fleet. Here is a simple run-instances request.

aws ec2 run-instances \
  --image-id ami-123 \
  --instance-type c6g.large \
  --instance-market-options 'MarketType=spot'

Spot in Auto Scaling Groups

Auto Scaling groups support a mixed instances policy: combine On-Demand and Spot in one group, so a baseline stays reliable while Spot adds cheap capacity.

Diversification Reduces Risk

Spreading requests across many instance types and Availability Zones lowers the chance all your capacity is interrupted at once. This is called diversification.

Capacity Rebalancing

Capacity Rebalancing proactively launches a replacement instance when a Spot Instance is at elevated risk of interruption, before the two-minute notice fires.

Handling State

Because instances can vanish, keep state off the instance. Store data in S3, RDS, or DynamoDB, and treat compute as disposable.

Spot with Containers

ECS and EKS both support Spot capacity. The orchestrator reschedules tasks/pods when an instance is reclaimed, making Spot especially safe for containerized workloads.

Cost Strategy Summary

A balanced strategy:

  • Reserved/Savings Plans for steady baseline load
  • On-Demand for unpredictable bursts
  • Spot for flexible, fault-tolerant capacity

Quick Check

Test your Spot knowledge.

Recap

You learned cost-efficient compute:

  • Spot offers up to 90% savings but is interruptible
  • Watch the two-minute interruption notice
  • Diversify across types and AZs
  • Mix Spot, On-Demand, and Reserved for the best balance

Treat compute as disposable and Spot becomes a powerful cost lever.

Häufig gestellte Fragen

Ist die Lektion „Spot Instances und kosteneffizientes Computing“ kostenlos?

Ja — der vollständige Text von „Spot Instances und kosteneffizientes Computing“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des AWS for Backend Developers (EC2, S3, RDS, Lambda)-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der AWS for Backend Developers (EC2, S3, RDS, Lambda)-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Spot Instances und kosteneffizientes Computing“?

Lernen Sie, EC2 Spot Instances und gemischte Instance-Flotten zu verwenden, um Rechenkosten deutlich zu senken und Unterbrechungen souverän zu bewältigen. Du übst AWS for Backend Developers (EC2, S3, RDS, Lambda) mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um AWS for Backend Developers (EC2, S3, RDS, Lambda) zu starten?

Keine Vorkenntnisse erforderlich. AWS for Backend Developers (EC2, S3, RDS, Lambda) auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 4 von 4.

Wie lange dauert die Lektion „Spot Instances und kosteneffizientes Computing“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser AWS for Backend Developers (EC2, S3, RDS, Lambda)-Lektion Code schreiben und ausführen?

Ja. Jede AWS for Backend Developers (EC2, S3, RDS, Lambda)-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. EC2-Instanztypen und AMIs
  2. Auto-Scaling-Gruppen implementieren
  3. Load-Balancing mit ELB
  4. Spot Instances und kosteneffizientes Computing
← Zurück zu AWS for Backend Developers (EC2, S3, RDS, Lambda)