builder.id(instance.getRegion() + "/" + instance.getId());
String group = getGroupForInstance(instance);
builder.group(group);
// standard convention from aws-ec2, which might not be re-used outside.
if (instance.getPrivateDnsName() != null)
builder.hostname(instance.getPrivateDnsName().replaceAll("\\..*", ""));
addCredentialsForInstance(builder, instance);
builder.status(instanceToNodeStatus.get(instance.getInstanceState()));
builder.backendStatus(instance.getRawState());
// collect all ip addresses into one bundle in case the api mistakenly put a private address