aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
Deano 2019-01-18T14:30:59.058Z

Hi everyone, I hope you are well. I am using the new Cognitect AWS-SDK, I would like to filter on running machines from a specific auto scaling group. The scaling group is stored as a tag on the EC2 machine This is what I have so far, could anyone nudge me in the right direction?

(def aws-ec2 (aws/client {:api :ec2}))
(aws/invoke aws-ec2 {:op :DescribeInstances :Filter [{:State "running"}]})
I have not included the tag in the example as I am trying to work out how to structure the code

gws 2019-01-18T15:06:55.059800Z

you should structure the filters according to this: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html

gws 2019-01-18T15:08:09.060800Z

does the code you wrote work as written? I'd guess that it wouldn't because "State" is not a valid filter key

2019-01-18T16:54:52.061800Z

something akin to (-> % :State :Name) could have the value of “running”