Provision and Run a Task
A 4-step recipe with Amazon Fargate. We can help you get access.
Recipe · 4 steps
Provision and Run a Task
with Amazon Fargate
Stand up a cluster and task definition, then run and confirm a Fargate task is RUNNING.
- Create the ECS cluster that will host the Fargate task.
- Register a FARGATE-compatible task definition with the supplied container.
- Run a single task from the registered task definition on Fargate.
- Poll DescribeTasks until the started task reaches RUNNING or STOPPED. The loop re-enters this step while the task is still provisioning or pending.
What you'll need to have ready
- clusterName: Name for the ECS cluster to create.
- family: Family name for the task definition to register.
- containerName: Name of the container in the task definition.
- image: Container image URI (e.g. nginx:latest).
- cpu: Task-level CPU units for Fargate (e.g. "256").
- memory: Task-level memory in MiB for Fargate (e.g. "512").
- executionRoleArn: ARN of the ECS task execution role.
- subnets: Subnet IDs for the awsvpc network configuration.
- securityGroups: Security group IDs for the awsvpc network configuration.
- assignPublicIp: Whether to assign a public IP (ENABLED or DISABLED).
For your developer
Arazzo workflow amazon-fargate:provision-and-run-task, 4 operations: createCluster → registerTaskDefinition → runTask → describeTasks. Specs on APIs.io.