In this section, we will register a task definition for Fargate tasks. Run the command below to create the task definition
aws ecs register-task-definition --cli-input-json file://fargate-task.json
Take some time to read the Fargate task definition fargate-task.json file. Check the setting of properties such as requiresCompatibilities and read more about Fargate Task Definition documentation.
The task will look like this in the console