Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
Bugfix - handle EC2 instances without tagSets
Browse files Browse the repository at this point in the history
Apparently EC2 instances can be created without names?

This should handle instances without metadata / names
  • Loading branch information
Iristyle committed Nov 6, 2012
1 parent 4bb359e commit 875ec6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripts/aws.coffee
Expand Up @@ -98,8 +98,8 @@ getRegionInstances = (region, msg) ->
arch = instance.architecture
devType = instance.rootDeviceType

tags = _.flatten [instance.tagSet.item]
name = (_.find tags, (t) -> t.key == 'Name').value
tags = _.flatten [instance.tagSet?.item ? []]
name = (_.find tags, (t) -> t.key == 'Name')?.value ? 'missing'

msg.send "#{prefix} [#{state}] - #{name} / #{type} [#{devType} #{arch}] / #{dnsName} / #{region} / #{id} - started #{launchTime} #{suffix}"

Expand Down

0 comments on commit 875ec6f

Please sign in to comment.