# aws


05/30/2023, 7:46 AM
Hello All. Please, I need assistance on this task. I have two AWS accounts, for production and dev environments. I have a domain ( in Route53 of the production account. However, I want to create a new stack and deploy to the dev environment. If the stack name is testing, it should create a record in the production environment as, and then create a hosted zone in the dev account. In other words, the parent domain is inside the Production account ( And under that domain, a subdomain, a subdomain was created (, where dev is the stack name. That subdomain ( has now be used as a hosted zone in the Dev account. Now what I want to achieve is the use of ephemeral environments. So now, when I create a name stack, say testing, it should have that record registered on the production account as (, and a hosted zone on the Dev account.


05/30/2023, 9:10 AM
create 2 providers, one with prod credentials one with dev. use the prod provider to create the subdomain, and the dev provider to create the rest of the stack&resources
you would pass the prod provider as opts on the resources needed in the prod account, and the dev provider to the rest (or more simply, configure the default provider with dev creds, and then you only need to create 1 custom provider for prod and only pass that to the prod resources)