buildstack.py [139:157]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        regions = args.region_list.split(',')
        
        # Get all possible regions
        global regionslist
        ec2client = boto3.client('ec2','us-east-1')
        regionslist = ec2client.describe_regions()
        
        # validate all passed region names for correctness
        if not regions:
            print ("Please provide list of regions to build the stack.")
            sys.exit(1)
        else:
            for region in regions:
                
                # regionregex = re.compile(r"^us-[a-z]*-[0-9]{1}")
                # regionmatch  = re.search(regionregex, region)
                if not validateregion(region):
                    print ("Please provide a valid region name in region list. For example: us-east-1. Incorrect region name", region, "was provided.")
                    sys.exit(1)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



create_managed_endpoint.py [289:305]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        regions = args.region_list.split(',')

        # Get all possible regions
        global regionslist
        ec2client = boto3.client('ec2','us-east-1')
        regionslist = ec2client.describe_regions()


        # validate all passed region names for correctness
        if not regions:
            print ("Please provide list of regions to build the stack.")
            sys.exit(1)
        else:
            for region in regions:
                if not validateregion(region):
                    print ("Please provide a valid region name in region list. For example: us-east-1. Incorrect region name", region, "was provided.")
                    sys.exit(1)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



