Open jamesgawn opened 6 years ago
Great, thank you! Two questions:
config.AWSConfiguration.check()
or Blade.check()
method that can check the configuration before trying anything else? What was the profile configuration issue you ran into? Presumably creating the new session worked but the permissions where such that you couldn't read the log groups?I found that when using the canonical Docker container my credentials were not being picked up via a profile in my .aws folder for any command. I've not quite cracked why... as it works fine if I repackage the container. I added this bit of error handling to my fork, while attempting to repackage the docker container in order to diagnose what was going on.
I can see that the commands other than groups already seem to return the AWS SDK error. Do you think it's worth trying to standardise capture of the AWS error across all the commands?
I just built saw
to test it. The first thing I ran was saw groups
, which hangs a bit and then exits with 0
, not producing any output.
% time saw groups
saw groups 0.00s user 0.01s system 0% cpu 12.276 total
% echo $?
0
(This account has many log groups, aws logs describe-log-groups
does return them).
Probably due to my default profile requiring an assume-role?
It can be a little confusing when diagnosing profile configuration issues when first using the tool given the groups command is likely the first one you'd attempt to use. I've added some simple error handling for this command to ensure feedback is provided to make it easier for anyone using the tool to diagnose any issue.