Want to understand how we can integrate metricbeat with amazon ecs ec2 launch type?

If any one has integrated metricbeat with aws ecs ec2. It would be really helpful if you can share the details on how to achieve it.