How to Configure Different ECS Task IAM Roles for Production and Branch Deployments
Last updated: October 25, 2025
To use different ECS task IAM roles for production and branch deployments in Dagster Cloud, you can do one of the following:
Templating in different values in the
dagster_cloud.yamlfile in just branch deployments. You'll just have to do the templating yourselves, e.g. you could add a jinja step in your github workflow that does it.You could have a totally separate
dagster_cloud.yamlfile just for branch deployments. The path is an input variable here so you could change the path that is used depending on whether its happening in a PR or not: https://github.com/dagster-io/dagster-cloud-hybrid-quickstart/blob/main/.github/workflows/dagster-cloud-deploy.yml#L58You could have two separate agents with different task IAM roles. You would only need a
dagster_cloud.yamlif you want this configuration to vary for different code locations.