Open EldritchJS opened 6 years ago
We use a QA and PRODUCTION AWS environment so being able to specify the profile name would be very nice.
This would be useful for me - I'm having to change between Prod and Dev environments.
@rojer I see you committed the change for --aws-profile. It doesn't seem to be working in 2.19.0. I have the AWS CLI configured with a default profile, but this flag seems to be completely ignoring it.
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-setup
is calledIf a profile arg was provided, add
--profile <PROFILE_ARG>
to https://github.com/cesanta/mos-tool/blob/e5f7d54b2ac946728880cfdab16a919d5b7ac775/mos/aws/aws.go#L80 for the region acquisitionUse the same approach for getting
aws_access_key_id
andaws_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