Registering the task execution policy
Next, register the task execution policy with the following command in PowerShell:
Register-IAMRolePolicy -RoleName ecsExecutionRole -PolicyArn arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy
The preceding command does not generate any output, and the task execution policy gets registered.