for (Node n : wsNode.getControlInPort().getFromNodes()) {
if (n instanceof InstanceNode) {
// TODO make it as constant
LeadResourceMapping x = new LeadResourceMapping("AMAZON");
x.addAttribute("ACCESS_KEY", AmazonCredential.getInstance().getAwsAccessKeyId());
x.addAttribute("SECRET_KEY", AmazonCredential.getInstance().getAwsSecretAccessKey());
if (((InstanceNode) n).isStartNewInstance()) {
x.addAttribute("AMI_ID", ((InstanceNode) n).getIdAsValue());
x.addAttribute("INS_TYPE", ((InstanceNode) n).getInstanceType());