- Le plus récent
- Le plus de votes
- La plupart des commentaires
If your ECS task is configured to use Fargate, it will not run on your manually managed EC2 instances. Fargate is a serverless compute engine for containers that abstracts the underlying infrastructure, meaning AWS manages the compute resources required to run your tasks. This allows you to focus solely on defining your containerized applications without managing the underlying EC2 instances.
Understanding ECS and Fargate Compatibility ECS on Fargate:
When you specify requiresCompatibilities as FARGATE, ECS will run your task using AWS Fargate, and the infrastructure is fully managed by AWS. You have no control over the specific EC2 instances on which your tasks run, as Fargate handles provisioning, scaling, and managing the compute resources. ECS on EC2:
When you run ECS tasks using EC2, you are responsible for managing the EC2 instances that serve as the underlying compute infrastructure for your tasks. Tasks with requiresCompatibilities set to EC2 will run on the EC2 instances that you have provisioned and registered to your ECS cluster. Task Definition Example Given your task definition configuration:
Json:
"placementConstraints": [],
"compatibilities": [ "EC2", "FARGATE" ],
"requiresCompatibilities": [ "FARGATE" ],
This configuration specifies that the task can run on both EC2 and Fargate (compatibilities: [ "EC2", "FARGATE" ]), but it requires Fargate (requiresCompatibilities: [ "FARGATE" ]). Key Points Fargate Tasks: If your task requires Fargate, it will not run on your managed EC2 instances. Fargate tasks run on infrastructure managed by AWS. EC2 Tasks: To run tasks on your specific EC2 instances, you need to set requiresCompatibilities to EC2 in your task definition. Example of EC2-Only Task Definition If you want to run a task on your managed EC2 instances, you need to configure your task definition like this: Json:
"placementConstraints": [],
"compatibilities": [ "EC2", "FARGATE" ],
"requiresCompatibilities": [ "EC2" ],
Summary Fargate: Tasks defined with requiresCompatibilities: [ "FARGATE" ] will not utilize your manually managed EC2 instances. EC2: Tasks defined with requiresCompatibilities: [ "EC2" ] will run on your manually managed EC2 instances. In your case, since your task definition requires Fargate, AWS will manage the underlying infrastructure, and your tasks will not run on your tooling VM EC2 instances.
Contenus pertinents
- demandé il y a 2 ans
- demandé il y a 2 mois
- demandé il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
Thank you for the explanation.