This project showcases selenium grid on AWS fargate. For further information how to use it please visit: https://blog.cosee.biz/2019/05/13/e2e-testing-cluster-on-aws-fargate-part-1
The base of this project was https://github.com/xilution/xilution-selenium-grid. We modified it quite heavily to work as we wanted. You can look there if you just want to spinup a selenium-grid in a Fargate stack without the extras we needed.