It would be great if the mos tool would allow for using the equivalent of aws cli's --profile when using aws-iot-setup.
Looks like at least the following would be necessary:
-
Accept a --profile <PROFILE_NAME> arg when mos aws-iot-setup is called
-
If a profile arg was provided, add --profile <PROFILE_ARG> to
|
output, err := ourutil.GetCommandOutput("aws", "configure", "get", "region") |
for the region acquisition
-
Use the same approach for getting aws_access_key_id and aws_secret_access_key as is used currently for getting the default AWS region (i.e. calling getCommandOutput()) and then assigning those results to the appropriate members of the cfg.Credentials object. All with the same potential use of --profile <PROFILE_ARG> as in point 2 above
It would be great if the mos tool would allow for using the equivalent of aws cli's --profile when using aws-iot-setup.
Looks like at least the following would be necessary:
Accept a
--profile <PROFILE_NAME>arg whenmos aws-iot-setupis calledIf a profile arg was provided, add
--profile <PROFILE_ARG>tomos-tool/mos/aws/aws.go
Line 80 in e5f7d54
Use the same approach for getting
aws_access_key_idandaws_secret_access_keyas is used currently for getting the default AWS region (i.e. calling getCommandOutput()) and then assigning those results to the appropriate members of the cfg.Credentials object. All with the same potential use of--profile <PROFILE_ARG>as in point 2 above