@@ -337,7 +337,7 @@ def __init__(self, args):
337
337
# Convert Namespace to dict
338
338
args = vars (args )
339
339
340
- aws_profile = args .get ("aws_profile" , "default" )
340
+ aws_profile = args .get ("aws_profile" , None )
341
341
aws_region_name = args .get ("aws_region" , None )
342
342
aws_access_key_id = args .get ("aws_access_key_id" , None )
343
343
aws_secret_access_key = args .get ("aws_secret_access_key" , None )
@@ -352,11 +352,10 @@ def __init__(self, args):
352
352
)
353
353
354
354
# If profile is specified, allow boto3 to determine other arguments from ~/.aws/config
355
- elif aws_profile :
355
+ elif not aws_profile :
356
356
self .session = boto3 .session .Session (
357
357
profile_name = aws_profile ,
358
358
)
359
-
360
359
self .check_credentials ()
361
360
362
361
def check_credentials (self ):
@@ -919,7 +918,7 @@ def main():
919
918
# Initialize a connection to AWS IoT
920
919
aws = AwsHelper (args = args )
921
920
if not aws .check_credentials ():
922
- print ("The provided AWS account credentials are inalid ." )
921
+ print ("The provided AWS account credentials are invalid ." )
923
922
raise SystemExit
924
923
925
924
target .conf_set ("mqtt_endpoint" , aws .get_endpoint ())
0 commit comments