How to make ECS deployment environment specific

How to make ECS deployment environment specific like staging branch should get deployed to staging aws account ecs cluster, and production branch changes should get deployed to production aws account ecs cluster.

I am using below url for reference: Getting started with Continuous Deployment to AWS Elastic Container Service | GitLab