@@ -337,7 +337,7 @@ def __init__(self, args):
337337 # Convert Namespace to dict
338338 args = vars (args )
339339
340- aws_profile = args .get ("aws_profile" , "default" )
340+ aws_profile = args .get ("aws_profile" , None )
341341 aws_region_name = args .get ("aws_region" , None )
342342 aws_access_key_id = args .get ("aws_access_key_id" , None )
343343 aws_secret_access_key = args .get ("aws_secret_access_key" , None )
@@ -352,11 +352,10 @@ def __init__(self, args):
352352 )
353353
354354 # If profile is specified, allow boto3 to determine other arguments from ~/.aws/config
355- elif aws_profile :
355+ elif not aws_profile :
356356 self .session = boto3 .session .Session (
357357 profile_name = aws_profile ,
358358 )
359-
360359 self .check_credentials ()
361360
362361 def check_credentials (self ):
@@ -919,7 +918,7 @@ def main():
919918 # Initialize a connection to AWS IoT
920919 aws = AwsHelper (args = args )
921920 if not aws .check_credentials ():
922- print ("The provided AWS account credentials are inalid ." )
921+ print ("The provided AWS account credentials are invalid ." )
923922 raise SystemExit
924923
925924 target .conf_set ("mqtt_endpoint" , aws .get_endpoint ())
0 commit comments