Deploy on Amazon ECS with EC2

Have a look at below given Solution Architecture diagram showing AWS CodePipeline integration with Amazon ECS Cluster having Amazon EC2 Launch type.

Architecture - Amazon ECS with EC2