サービス · Compute · CLF-C02 の発展
AWS Batch
Job queues, compute environments, array jobs and dependencies, and when Batch beats Lambda, Glue or EMR.
このレッスンはまだ翻訳されていないため、英語で表示しています。
クラウドプラクティショナーで学んだこと
- Runs many finite jobs as containers.
- Compute comes from EC2, Spot or Fargate and scales back when the work is done.
- No extra charge: you pay for the compute.
- 1You submit jobs.
- 2The queue holds them by priority and hands them to a compute environment.
- 3The environment launches EC2, Spot or Fargate capacity, and scales it back when the queue is empty.
- Best for
- Short, event-driven tasks
- Watch for
- Time limit per run
Batch
- Best for
- Queues of container jobs
- Watch for
- Not for always-on apps
- Best for
- Serverless ETL and catalog
- Watch for
- Data work, not general jobs
- Best for
- Hadoop and Spark clusters
- Watch for
- Cluster for big data analysis
| Service | Best for | Watch for |
|---|---|---|
| Short, event-driven tasks | Time limit per run | |
| Queues of container jobs | Not for always-on apps | |
| Serverless ETL and catalog | Data work, not general jobs | |
| Hadoop and Spark clusters | Cluster for big data analysis |
1 / 2
概要
Batch has three parts. A job definition says which container image, how much vCPU and memory, and which command. A job queue holds submitted jobs with a priority. A compute environment is the EC2 or Fargate capacity behind a queue. A managed one scales by itself, on On-Demand or Spot. A queue can use several compute environments in order.
An array job runs one definition up to 10,000 times, each copy with its own index, for work such as one input file per job. A job dependency makes a job wait for others. Multi-node parallel jobs span several instances.
概要
Choose by the shape of the work. Lambda: short, event-driven tasks. Batch: container jobs that run longer, need more CPU or memory, or queue up in thousands, ideally on Spot. AWS Glue: serverless ETL and a data catalog. Amazon EMR: Hadoop and Spark clusters for big data analysis.
覚えること
- Job definition, job queue and compute environment.
- Spot compute environments cut cost for fault-tolerant jobs.
- Array jobs: up to 10,000 child jobs from one submission.
- Dependencies: run job B only after job A.
- Fargate compute: no instances to manage. EC2: GPUs and special types.
覚えること
- Not for always-on services or event handlers. Use ECS or Lambda.
試験では
- “Thousands of containerized jobs, minimize cost” points to AWS Batch on Spot.
- “Run the same job 5,000 times with different inputs” points to an array job.
- “Serverless ETL with a data catalog” points to AWS Glue.
- “Spark or Hadoop cluster” points to Amazon EMR.
混同しやすいもの
AWS LambdaSize memory, plan concurrency and cold starts, and know how each trigger calls a function.
AWS GlueServerless ETL and the Data Catalog: crawl data, transform it, and write it as Parquet.
Amazon EMRManaged Spark and Hadoop clusters. Use Spot task nodes, S3 storage and short-lived clusters to save money.