checkNotNull(name, "name");
logger.debug(">> creating placementGroup region(%s) name(%s)", region, name);
try {
ec2Client.getPlacementGroupServices().createPlacementGroupInRegion(region, name);
logger.debug("<< created placementGroup(%s)", name);
checkState(placementGroupAvailable.apply(new PlacementGroup(region, name, "cluster", State.PENDING)), String
.format("placementGroup region(%s) name(%s) failed to become available", region, name));
} catch (AWSResponseException e) {
if (e.getError().getCode().equals("InvalidPlacementGroup.Duplicate")) {
logger.debug("<< reused placementGroup(%s)", name);
} else {