Create IAM Roles

Click “Create Role” again and select “CodeDeploy” as a principal service as shown below:

Select “CodeDeploy - ECS” as use-case: It will automatically select the required policy. Give name and create the role: