diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java
index 2efdbde..f20c646 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAINetworkResourcesTest.java
@@ -159,7 +159,7 @@
 		final String content = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "queryAaiVpnBinding.json")));
 		AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
 		Optional<VpnBinding> oVpnBinding = Optional.empty();
-		AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, "ModelInvariantUUID", "serviceModelVersionId");
+		AAIResourceUri aaiUri = AAIUriFactory.createResourceUri(AAIObjectType.VPN_BINDING, "ModelInvariantUUID");
 		
 		doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIResourceUri.class));
 		oVpnBinding = aaiNetworkResources.getVpnBinding(aaiUri);
@@ -176,7 +176,7 @@
 		final String content = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "queryAaiNetworkPolicy.json")));
 		AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
 		Optional<NetworkPolicy> oNetPolicy = Optional.empty();
-		AAIResourceUri netPolicyUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, "ModelInvariantUUID", "serviceModelVersionId");
+		AAIResourceUri netPolicyUri = AAIUriFactory.createResourceUri(AAIObjectType.NETWORK_POLICY, "ModelInvariantUUID");
 		
 		doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIResourceUri.class));
 		oNetPolicy = aaiNetworkResources.getNetworkPolicy(netPolicyUri);
@@ -193,7 +193,7 @@
 		final String content = new String(Files.readAllBytes(Paths.get(JSON_FILE_LOCATION + "queryAaiNetworkTableRefs.json")));
 		AAIResultWrapper aaiResultWrapper = new AAIResultWrapper(content);
 		Optional<RouteTableReference> oRtref = Optional.empty();
-		AAIResourceUri rTRefUri = AAIUriFactory.createResourceUri(AAIObjectType.ROUTE_TABLE_REFERENCE, "ModelInvariantUUID", "serviceModelVersionId");
+		AAIResourceUri rTRefUri = AAIUriFactory.createResourceUri(AAIObjectType.ROUTE_TABLE_REFERENCE, "ModelInvariantUUID");
 		
 		doReturn(aaiResultWrapper).when(MOCK_aaiResourcesClient).get(isA(AAIResourceUri.class));
 		oRtref = aaiNetworkResources.getRouteTable(rTRefUri);
diff --git a/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java b/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java
index 884f8c6..324bb8a 100644
--- a/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java
+++ b/common/src/main/java/org/onap/so/client/aai/entities/uri/HttpLookupUri.java
@@ -22,7 +22,6 @@
 
 import java.io.IOException;
 import java.net.URI;
-import java.util.Arrays;
 import java.util.Map;
 import java.util.Optional;
 
@@ -38,6 +37,7 @@
 import org.onap.so.client.graphinventory.exceptions.GraphInventoryPayloadException;
 import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriComputationException;
 import org.onap.so.client.graphinventory.exceptions.GraphInventoryUriNotFoundException;
+import org.onap.so.client.graphinventory.exceptions.IncorrectNumberOfUriKeys;
 
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -118,6 +118,18 @@
 	@Override
 	public abstract HttpLookupUri clone();
 	
+	@Override
+	public void validateValuesSize(String template, Object... values) {
+		try {
+			super.validateValuesSize(template, values);
+		} catch (IncorrectNumberOfUriKeys e) {
+			if (values.length == 1) {
+				//Special case where we perform an http look up
+			} else {
+				throw e;
+			}
+		}
+	}
 	public AAIResourcesClient getResourcesClient() {
 		return new AAIResourcesClient();
 	}
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java
index 2876f77..93de913 100644
--- a/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java
+++ b/common/src/main/java/org/onap/so/client/graphinventory/entities/uri/SimpleUri.java
@@ -24,11 +24,11 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
-import java.io.UnsupportedEncodingException;
 import java.net.URI;
 import java.nio.charset.StandardCharsets;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
 
 import javax.ws.rs.core.UriBuilder;
 
@@ -39,6 +39,7 @@
 import org.onap.so.client.graphinventory.GraphInventoryObjectType;
 import org.onap.so.client.graphinventory.entities.uri.parsers.UriParser;
 import org.onap.so.client.graphinventory.entities.uri.parsers.UriParserSpringImpl;
+import org.onap.so.client.graphinventory.exceptions.IncorrectNumberOfUriKeys;
 import org.springframework.web.util.UriUtils;
 
 public class SimpleUri implements GraphInventoryResourceUri, Serializable {
@@ -56,6 +57,7 @@
 		this.pluralType = null;
 		this.internalURI = UriBuilder.fromPath(this.getTemplate(type));
 		this.values = values;
+		validateValuesSize(this.getTemplate(type), values);
 	}
 	protected SimpleUri(GraphInventoryObjectType type, URI uri) {
 		this.type = type;
@@ -86,12 +88,14 @@
 		this.pluralType = type;
 		this.internalURI = UriBuilder.fromPath(this.getTemplate(type));
 		this.values = values;
+		validateValuesSize(this.getTemplate(type), values);
 	}
 	protected SimpleUri(GraphInventoryResourceUri parentUri, GraphInventoryObjectType childType, Object... childValues) {
 		this.type = childType;
 		this.pluralType = null;
 		this.internalURI = UriBuilder.fromUri(parentUri.build()).path(childType.partialUri());
 		this.values = childValues;
+		validateValuesSize(childType.partialUri(), values);
 	}
 	
 	protected void setInternalURI(UriBuilder builder) {
@@ -232,6 +236,14 @@
 		return this;
 	}
 	
+	public void validateValuesSize(String template, Object... values) {
+		UriParser parser = new UriParserSpringImpl(template);
+		Set<String> variables = parser.getVariables();
+		if (variables.size() != values.length) {
+			throw new IncorrectNumberOfUriKeys(String.format("Expected %s variables: %s", variables.size(), variables));
+		}
+	}
+	
 	protected String getTemplate(GraphInventoryObjectType type) {
 		return type.uriTemplate();
 	}
diff --git a/common/src/main/java/org/onap/so/client/graphinventory/exceptions/IncorrectNumberOfUriKeys.java b/common/src/main/java/org/onap/so/client/graphinventory/exceptions/IncorrectNumberOfUriKeys.java
new file mode 100644
index 0000000..c94e561
--- /dev/null
+++ b/common/src/main/java/org/onap/so/client/graphinventory/exceptions/IncorrectNumberOfUriKeys.java
@@ -0,0 +1,11 @@
+package org.onap.so.client.graphinventory.exceptions;
+
+public class IncorrectNumberOfUriKeys extends RuntimeException {
+
+	private static final long serialVersionUID = 2189285428827817518L;
+	
+	public IncorrectNumberOfUriKeys(String message) {
+		super(message);
+	}
+
+}
diff --git a/common/src/test/java/org/onap/so/client/aai/entities/uri/IncorrectNumberOfUriKeysTest.java b/common/src/test/java/org/onap/so/client/aai/entities/uri/IncorrectNumberOfUriKeysTest.java
new file mode 100644
index 0000000..729f0e5
--- /dev/null
+++ b/common/src/test/java/org/onap/so/client/aai/entities/uri/IncorrectNumberOfUriKeysTest.java
@@ -0,0 +1,50 @@
+package org.onap.so.client.aai.entities.uri;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+import org.onap.so.client.aai.AAIObjectPlurals;
+import org.onap.so.client.aai.AAIObjectType;
+import org.onap.so.client.graphinventory.exceptions.IncorrectNumberOfUriKeys;
+
+public class IncorrectNumberOfUriKeysTest {
+
+	@Rule
+	public ExpectedException thrown = ExpectedException.none();
+	
+	@Test
+	public void verifyIncorrectNumberOfKeysSingle() {
+		
+		thrown.expect(IncorrectNumberOfUriKeys.class);
+		thrown.expectMessage(equalTo("Expected 3 variables: [cloud-owner, cloud-region-id, volume-group-id]"));
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.VOLUME_GROUP, "volume-group-id");
+		
+	}
+	
+	@Test
+	public void verifyIncorrectNumberOfKeysPlural() {
+		
+		thrown.expect(IncorrectNumberOfUriKeys.class);
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.VOLUME_GROUP, "my-cloud-owner");
+		
+	}
+	
+	@Test
+	public void verifyIncorrectNumberOfKeysFromParent() {
+		
+		thrown.expect(IncorrectNumberOfUriKeys.class);
+		AAIResourceUri parentUri = AAIUriFactory.createResourceUri(AAIObjectType.CLOUD_REGION, "my-cloud-owner", "my-cloud-region-id");
+		AAIResourceUri uri = AAIUriFactory.createResourceFromParentURI(parentUri, AAIObjectType.VOLUME_GROUP);
+	}
+	
+	@Test
+	public void verifyIncorrectNumberOfKeysHttpAware() {
+
+		thrown.expect(IncorrectNumberOfUriKeys.class);
+		AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, "customer-id", "subscription-id");
+	}
+}
