The simplest thing is just setting the AWS provider configuration via stack configuration. Then only the prod stack would use the pros account a configuration, and similar for dev.
Is there some aspect of what you want to ensure that this does not achieve? There are several other tools/patterns you can use - but depend a bit on more details of what you want to accomplish.