Update AWS ECS Task Definition Image from Jenkins

Hello,

I’m currently using ‘amazon-ecs’ and ‘aws-codebuild’ plugins. I have a CodeBuild project setup to build an image from a Dockerfile and push the image up to ECR.

My question is; What is the best way to update an ECS Task Definition with the new image from ECR and kill the tasks? Can I do this in the Jenkins pipeline using the ‘amazon-ecs’ plugin or do I need to use AWS CLI to do this?

Thanks!
Aub_C