donnemartin / saws

A supercharged AWS command line interface (CLI).
Other
5.24k stars 281 forks source link

Add option to count results #47

Open mlimaloureiro opened 8 years ago

mlimaloureiro commented 8 years ago

Something like

aws ec2 ls --ec2-tag-value admin-staging --count
donnemartin commented 8 years ago

@mlimaloureiro interesting, do you see this as returning the results and then listing the total count at the end?

From a technical standpoint, this might be more involved to implement. Currently SAWS builds the command and sends it off to the awscli to execute and output the results. To get the count you might need to parse the output or use boto.

mlimaloureiro commented 8 years ago

yes we would need to parse the output or use boto for that purpose. was thinking about this and don't know if it would make sense to be an actual command instead of an option what do you think ?

aws ec2 count [options]

and yes technically I think it's a decision to make. Do you feel we should stick to awscli or include boto for some tasks?

donnemartin commented 8 years ago

was thinking about this and don't know if it would make sense to be an actual command instead of an option what do you think

@mlimaloureiro hmm, I think it might be helpful to check out some more examples of the awscli to see if it would flow better one way or the other.

Do you feel we should stick to awscli or include boto for some tasks?

I think boto is great and it seems like a good solution in this case versus parsing raw text output from the awscli. Also, it seems awscli uses boto under the hood.

mlimaloureiro commented 8 years ago

yes I agree on both points, and really think boto will be sooner or later an inevitable asset for this project