Repository: wso2/testgrid
Issue: AWS region can be configured via infrastructureConfig now.

**Description:**
This can be done by setting the inputParameter 'region' under the `infrastructureConfig -> scripts`. 

However, this does not work ATM. We need to look at why this does not happen.

**Affected Product Version:**
0.9.0-m14

**OS, DB, other environment details and versions:**    

**Steps to reproduce:**

Run `cloudformation-is` with the following testgrid.yaml.
```yaml
version: '0.9'
infrastructureConfig:
  iacProvider: CLOUDFORMATION
  infrastructureProvider: AWS
  containerOrchestrationEngine: None
  parameters:
    - JDK : ORACLE_JDK8
  provisioners:
    - name: 01-two-node-deployment
      description: Provision Infra for a two node IS cluster
      dir: cloudformation-templates/pattern-1
      scripts:
        - name: infra-for-two-node-deployment
          description: Creates infrastructure for a IS two node deployment.
          type: CLOUDFORMATION
          file: pattern-1-with-puppet-cloudformation.template.yml
          inputParameters:
            parseInfrastructureScript: false
            region: us-east-2
            DBPassword: "DB_Password"
            EC2KeyPair: "testgrid-key"
            ALBCertificateARN: "arn:aws:acm:us-east-1:809489900555:certificate/2ab5aded-5df1-4549-9f7e-91639ff6634e"

scenarioConfig:
  scenarios:
    -  "scenario02"
    -  "scenario12"
    -  "scenario21"
```

**Related Issues:**
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->

Changed files:
infrastructure/src/main/java/org/wso2/testgrid/infrastructure/providers/AWSProvider.java

diff --git a/infrastructure/src/main/java/org/wso2/testgrid/infrastructure/providers/AWSProvider.java b/infrastructure/src/main/java/org/wso2/testgrid/infrastructure/providers/AWSProvider.java
index c9b1bc10..3cc654b4 100644
--- a/infrastructure/src/main/java/org/wso2/testgrid/infrastructure/providers/AWSProvider.java
+++ b/infrastructure/src/main/java/org/wso2/testgrid/infrastructure/providers/AWSProvider.java
@@ -152,7 +152,9 @@ public class AWSProvider implements InfrastructureProvider {
 
     private InfrastructureProvisionResult doProvision(InfrastructureConfig infrastructureConfig,
         String stackName, String infraRepoDir) throws TestGridInfrastructureException {
-        String region = infrastructureConfig.getParameters().getProperty(AWS_REGION_PARAMETER);
+        String region = infrastructureConfig.getProvisioners().get(0)
+                .getScripts().get(0).getInputParameters().getProperty(AWS_REGION_PARAMETER);
+
             Path configFilePath;
             try {
                 configFilePath = TestGridUtil.getConfigFilePath();
@@ -258,7 +260,8 @@ public class AWSProvider implements InfrastructureProvider {
         }
         AmazonCloudFormation stackdestroy = AmazonCloudFormationClientBuilder.standard()
                 .withCredentials(new PropertiesFileCredentialsProvider(configFilePath.toString()))
-                .withRegion(infrastructureConfig.getParameters().getProperty(AWS_REGION_PARAMETER))
+                .withRegion(infrastructureConfig.getProvisioners().get(0).getScripts().get(0)
+                        .getInputParameters().getProperty(AWS_REGION_PARAMETER))
                 .build();
         DeleteStackRequest deleteStackRequest = new DeleteStackRequest();
         deleteStackRequest.setStackName(stackName);