Repository: awslabs/aws-ddk (language: python)

Issue:
config: Bootstrap within multiple different regions for different environments
Is there currently a way to point/deploy to a different region when bootstrapping. I'm currently attempting to point our existing bootstrap stack that is located within `eu-west-1` in our DDK app. However, I'm not seeing a configuration to do so.
For our specific use case, our prod region is bootstrapped in `eu-west-2`, and our dev region is bootstrapped in `eu-west-1`. However, both regions are pointing to `eu-west-2`.

- A reproducible test case or series of steps
  - Have an existing bootstrapped environment in another region
- The version of our code being used
  - 1.0.0
- Anything unusual about your environment or deployment
  - Bootstrapped during the 0.x release (specifically 0.4.1)


Discussion / hints:
Thanks @Rizxcviii i've taken a closer look and this is indeed a bug that boils down to [appending account ids and regions to stack synthesizer resources](https://github.com/awslabs/aws-ddk/blob/a25a879c4c59a7004748a48f0b1ef97d9e2834fb/src/config/configurator.ts#L128) that do not come from configuration. 

With the configuration 
```json
{
  "environments": {
    "dev": {
      "bootstrap": {
        "prefix": "ddk"
      },
      "account": "22222222222",
      "region": "us-east-1"
    },
    "prod": {
      "bootstrap": {
        "prefix": "ddk"
      },
      "account": "222222222222",
      "region": "us-west-2"
    }
  }
}
```

```javascript
import * as cdk from "aws-cdk-lib";
import * as ddk from "aws-ddk-core";


const app = new cdk.App();

const devStack = new ddk.BaseStack(app, "my-dev-stack", {
  environmentId: "dev",
  stackName: "MyDevStack",
});

new ddk.Configurator(devStack, "./ddk.json", "dev")

const prodStack = new ddk.BaseStack(app, "my-prod-stack", {
  environmentId: "prod",
  stackName: "MyProdStack",
});
new ddk.Configurator(prodStack, "./ddk.json", "prod")


console.log(devStack.synthesizer)
console.log(prodStack.synthesizer)
```

#### Prod Stack Synthesizer values are using wrong region
```shell
qualifier: 'hnb659fds',
  bucketName: 'ddk-prod-hnb659fds-assets-032118170130-us-east-1',
  repositoryName: 'cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}',
  _deployRoleArn: 'arn:aws:iam::032118170130:role/ddk-prod-hnb659fds-deploy-032118170130-us-east-1',
  _cloudFormationExecutionRoleArn: 'arn:aws:iam::032118170130:role/ddk-prod-hnb659fds-cfn-exec-032118170130-us-east-1',
  fileAssetPublishingRoleArn: 'arn:aws:iam::032118170130:role/ddk-prod-hnb659fds-file-publish-032118170130-us-east-1',
  imageAssetPublishingRoleArn: 'arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-image-publishing-role-${AWS::AccountId}-${AWS::Region}',
  lookupRoleArn: 'arn:aws:iam::032118170130:role/ddk-prod-hnb659fds-lookup-032118170130-us-east-1',
  bucketPrefix: '',
  dockerTagPrefix: '',
  bootstrapStackVersionSsmParameter: '/ddk/prod/hnb659fds/bootstrap-version'
```

Will open a PR to address shortly.

Fix patch:
diff --git a/src/config/configurator.ts b/src/config/configurator.ts
index b1f7d30d..67e6c55e 100644
--- a/src/config/configurator.ts
+++ b/src/config/configurator.ts
@@ -6,8 +6,8 @@ import { parse } from "yaml";
 const ddkBootstrapConfigKey = "bootstrap";
 const bootstrapPrefix = "ddk";
 const bootstrapQualifier = "hnb659fds";
-const accountId = process.env.CDK_DEFAULT_ACCOUNT;
-const region = process.env.CDK_DEFAULT_REGION;
+const defaultAccountId = process.env.CDK_DEFAULT_ACCOUNT;
+const defaultRegion = process.env.CDK_DEFAULT_REGION;
 
 export interface EnvironmentConfiguration {
   readonly account?: string;
@@ -112,6 +112,12 @@ interface getStackSynthesizerProps {
 export function getStackSynthesizer(props: getStackSynthesizerProps): cdk.IStackSynthesizer {
   const configData = getConfig({ config: props.config });
 
+  const accountId =
+    configData && props.environmentId ? configData.environments[props.environmentId].account : defaultAccountId;
+
+  const region =
+    configData && props.environmentId ? configData.environments[props.environmentId].region : defaultRegion;
+
   const bootstrapConfig: any = configData
     ? configData.ddkBootstrapConfigKey
       ? configData.ddkBootstrapConfigKey


Test patch:
diff --git a/docs/release/latest/how-to/custom-bootstrap.markdown b/docs/release/latest/how-to/custom-bootstrap.markdown
index 2bf4761e..c526a079 100644
--- a/docs/release/latest/how-to/custom-bootstrap.markdown
+++ b/docs/release/latest/how-to/custom-bootstrap.markdown
@@ -40,6 +40,8 @@ __Configurator uses the [DefaultStackSynthesizer](https://docs.aws.amazon.com/cd
 ```json
 "environments": {
   "dev": {
+    "account": "000000000000",
+    "region": "us-west-2",
     "bootstrap": {
       "qualifier": "abcdefgh",
       "bucket_name": "ddk-abcdefgh-assets-000000000000-us-west-2",
@@ -56,6 +58,8 @@ __Configurator uses the [DefaultStackSynthesizer](https://docs.aws.amazon.com/cd
 
 The stack synthesizer will be created for your app using all values specified in `Configurator()` and resort to default `cdk bootstrap` values when not explicitly set.
 
+**Note**: The values for `account` and `region` will be default to `CDK_DEFAULT_ACCOUNT` and `CDK_DEFAULT_REGION` if not explicitly set in the environment config.
+
 
 
 ### Using Legacy DDK Bootstrap Roles
diff --git a/test/base-stack.test.ts b/test/base-stack.test.ts
index dccb5970..0ac57dd0 100644
--- a/test/base-stack.test.ts
+++ b/test/base-stack.test.ts
@@ -428,6 +428,87 @@ test("Use Only Prefix to Default to DDK roles", () => {
   }
 });
 
+test("Legacy Bootstraps in different regions", () => {
+  const app = new cdk.App();
+
+  const config = {
+    environments: {
+      dev: {
+        bootstrap: {
+          prefix: "ddk",
+        },
+        account: "222222222222",
+        region: "us-east-1",
+      },
+      prod: {
+        bootstrap: {
+          prefix: "ddk",
+        },
+        account: "222222222222",
+        region: "us-west-2",
+      },
+    },
+  };
+
+  const devStack = new BaseStack(app, "my-dev-stack", {
+    environmentId: "dev",
+    stackName: "MyDevStack",
+    config: config,
+  });
+
+  const prodStack = new BaseStack(app, "my-prod-stack", {
+    environmentId: "prod",
+    stackName: "MyProdStack",
+    config: config,
+  });
+
+  const devExpectedValues = {
+    qualifier: "hnb659fds",
+    bucketName: "ddk-dev-hnb659fds-assets-222222222222-us-east-1",
+    repositoryName: "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}",
+    _deployRoleArn: "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-deploy-role-222222222222-us-east-1",
+    _cloudFormationExecutionRoleArn:
+      "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-cfn-exec-role-222222222222-us-east-1",
+    fileAssetPublishingRoleArn:
+      "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-file-publishing-role-222222222222-us-east-1",
+    imageAssetPublishingRoleArn:
+      "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-image-publishing-role-222222222222-us-east-1",
+    lookupRoleArn: "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-lookup-role-222222222222-us-east-1",
+    bucketPrefix: "",
+    dockerTagPrefix: "",
+    bootstrapStackVersionSsmParameter: "/ddk/dev/hnb659fds/bootstrap-version",
+  };
+
+  const prodExpectedValues = {
+    qualifier: "hnb659fds",
+    bucketName: "ddk-dev-hnb659fds-assets-222222222222-us-west-2",
+    repositoryName: "cdk-hnb659fds-container-assets-${AWS::AccountId}-${AWS::Region}",
+    _deployRoleArn: "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-deploy-role-222222222222-us-west-2",
+    _cloudFormationExecutionRoleArn:
+      "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-cfn-exec-role-222222222222-us-west-2",
+    fileAssetPublishingRoleArn:
+      "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-file-publishing-role-222222222222-us-west-2",
+    imageAssetPublishingRoleArn:
+      "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-image-publishing-role-222222222222-us-west-2",
+    lookupRoleArn: "arn:${AWS::Partition}:iam::222222222222:role/ddk-dev-hnb659fds-lookup-role-222222222222-us-west-2",
+    bucketPrefix: "",
+    dockerTagPrefix: "",
+    bootstrapStackVersionSsmParameter: "/ddk/dev/hnb659fds/bootstrap-version",
+  };
+  for (const attribute in devExpectedValues) {
+    assert(
+      devStack.synthesizer[attribute as keyof typeof devStack.synthesizer] ===
+        devExpectedValues[attribute as keyof typeof devExpectedValues],
+    );
+  }
+  for (const attribute in prodExpectedValues) {
+    assert(
+      prodStack.synthesizer[attribute as keyof typeof prodStack.synthesizer] ===
+        prodExpectedValues[attribute as keyof typeof prodExpectedValues],
+    );
+  }
+});
+
 test("Additional Stack Props", () => {
   const app = new cdk.App();