From fb1c8ffb21ed4c0c216de8e9179f7bbcd43bff83 Mon Sep 17 00:00:00 2001 From: bsajjan Date: Thu, 2 Dec 2021 11:46:28 +0000 Subject: [PATCH] Fixing reported issues #171 #179 --- MWAA/verify_env/verify_env.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MWAA/verify_env/verify_env.py b/MWAA/verify_env/verify_env.py index 85bd6d8..f1962af 100644 --- a/MWAA/verify_env/verify_env.py +++ b/MWAA/verify_env/verify_env.py @@ -79,6 +79,8 @@ def validation_region(input_region): ''' session = Session() mwaa_regions = session.get_available_regions('mwaa') + new_regions = ['sa-east-1', 'ap-northeast-2', 'ap-south-1', 'ca-central-1', 'eu-west-2', 'eu-west-3'] + mwaa_regions.extend(new_regions) if input_region in mwaa_regions: return input_region raise argparse.ArgumentTypeError("%s is an invalid REGION value" % input_region) @@ -88,7 +90,7 @@ def validation_profile(profile_name): ''' verify profile name doesn't have path to files or unexpected input ''' - if re.match(r"^[a-zA-Z0-9]*$", profile_name): + if re.match(r"^[a-zA-Z0-9\-]*$", profile_name): return profile_name raise argparse.ArgumentTypeError("%s is an invalid profile name value" % profile_name)