Folks,
  I am having difficult time understanding the docs http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/frames.html
I need to grab all the running instances with the following tags assigned to them:
project=foo
environment=production
The following does not seem to work.
var params = {
    DryRun: false,
    Filters: [
        {
            Name: 'instance-state-name',
            Values: [
                'running'
            ],
        },
        {
            Name: 'tag:key=value',
            Values: [
                'foo',
                'production'
            ],
        },
    ]
};
ec2.describeInstances(params, function (err, data) {
...
                If your tag's key is 'foo' and its value is 'production', you should change your code to the following. The Name is in the 'tag:key' format, and the Values are the data you are looking for that correspond to that key.
{
    Name: 'tag:foo',
    Values: [
            'production'
    ],
},
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With