nl_tokens: Takes an identifier either an InstanceId or Name Tag and returns whether the instance exists in any state . The second instanceState allows specification of the state the machine is in . Will also return false if an error is thrown when given an invalid or non existent instance ID .
pl_tokens: function doesInstanceExist ( ec2 , identifier , instanceState ) { var params = buildParams ( identifier , instanceState ) function inspectError ( <mask> ) { if ( err . code === 'InvalidInstanceID.NotFound' ) { return false } return Bluebird . reject ( err ) } return ec2 . describeInstancesPromised ( params ) . then ( function checkResult ( data ) { return ! isEmpty ( data . Reservations ) } ) . catch ( inspectError ) }