AWS CLI ECR and ECS Cheat Sheet/Register a task definition

Create or update an ECS task definition revision from JSON.

Section: Task Definitions and Tasks

Register a task definition

bash
bash
aws ecs register-task-definition --cli-input-json file://taskdef.json
Explanation

Task definitions describe containers, CPU, memory, networking, and IAM roles.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Task Definitions and Tasks
List task definitions
Show task definition family revisions.
OpenIn sheetbashsame section
Run a one-off task
Start an ECS task without creating a service.
OpenIn sheetbashsame section
List tasks
Show running or stopped tasks in a cluster.
OpenIn sheetbashsame section
Describe tasks
Inspect ECS task state, containers, and attachments.
OpenIn sheetbashsame section
Stop a task
Terminate a running ECS task.
OpenIn sheetbashsame section
List ECS clusters
Show cluster ARNs in the account and region.
OpenIn sheetbash2 tag match