diff --git a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineClusterHealthMock.java b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineClusterHealthMock.java
index b7273d7..4294ca6 100644
--- a/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineClusterHealthMock.java
+++ b/asdctool/src/main/java/org/openecomp/sdc/asdctool/migration/config/mocks/DistributionEngineClusterHealthMock.java
@@ -26,7 +26,7 @@
 public class DistributionEngineClusterHealthMock extends DistributionEngineClusterHealth {
 
     @Override
-    protected void init() {
+    protected void init(final String publicApiKey) {
     }
 
     @Override
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/CambriaHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/CambriaHandler.java
index 425b464..41d1073 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/CambriaHandler.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/CambriaHandler.java
@@ -62,10 +62,6 @@
     private static final Logger log = Logger.getLogger(CambriaHandler.class.getName());
     private static final String PARTITION_KEY = "asdc" + "aa";
     private static final String SEND_NOTIFICATION = "send notification";
-    private static final String CONSUMER_ID = ConfigurationManager.getConfigurationManager().getDistributionEngineConfiguration()
-        .getDistributionStatusTopic().getConsumerId();
-    private static final boolean USE_HTTPS_WITH_DMAAP = ConfigurationManager.getConfigurationManager().getDistributionEngineConfiguration()
-        .isUseHttpsWithDmaap();
     private final Gson gson = new Gson();
 
     /**
@@ -284,7 +280,9 @@
                                                                                                String managerSecretKey) {
         AbstractAuthenticatedManagerBuilder<CambriaTopicManager> clientBuilder = createTopicManagerBuilder(hostSet)
             .authenticatedBy(managerApiKey, managerSecretKey);
-        if (USE_HTTPS_WITH_DMAAP) {
+        final boolean useHttpsWithDmaap = ConfigurationManager.getConfigurationManager().getDistributionEngineConfiguration()
+                .isUseHttpsWithDmaap();
+        if (useHttpsWithDmaap) {
             clientBuilder = clientBuilder.usingHttps();
         }
         return clientBuilder;
@@ -506,7 +504,9 @@
         Either<ApiCredential, CambriaErrorResponse> result;
         try {
             CambriaIdentityManager createIdentityManager = buildCambriaClient(new IdentityManagerBuilder().usingHosts(hostSet));
-            String description = String.format("ASDC Key for %s", CONSUMER_ID);
+            final String consumerId = ConfigurationManager.getConfigurationManager().getDistributionEngineConfiguration()
+                    .getDistributionStatusTopic().getConsumerId();
+            String description = String.format("ASDC Key for %s", consumerId);
             ApiCredential credential = createIdentityManager.createApiKey("", description);
             createIdentityManager.setApiCredentials(credential.getApiKey(), credential.getApiSecret());
             result = Either.left(credential);
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealth.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealth.java
index b1bf59f..0851f22 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealth.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealth.java
@@ -31,7 +31,6 @@
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
-import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 import org.openecomp.sdc.be.config.BeEcompErrorManager;
 import org.openecomp.sdc.be.config.ConfigurationManager;
@@ -66,9 +65,8 @@
     private HealthCheckInfo healthCheckInfo = HealthCheckInfoResult.UNKNOWN.getHealthCheckInfo();
     private Map<String, AtomicBoolean> envNamePerStatus = null;
     private ScheduledFuture<?> scheduledFuture = null;
-
-    @PostConstruct
-    protected void init() {
+    
+    protected void init(final String publicApiKey) {
         logger.trace("Enter init method of DistributionEngineClusterHealth");
         Long reconnectIntervalConfig = ConfigurationManager.getConfigurationManager().getConfiguration()
             .getUebHealthCheckReconnectIntervalInSeconds();
@@ -82,7 +80,7 @@
         DistributionEngineConfiguration distributionEngineConfiguration = ConfigurationManager.getConfigurationManager()
             .getDistributionEngineConfiguration();
         this.uebServers = distributionEngineConfiguration.getUebServers();
-        this.publicApiKey = distributionEngineConfiguration.getUebPublicKey();
+        this.publicApiKey = publicApiKey;
         this.healthCheckScheduledTask = new HealthCheckScheduledTask(this.uebServers);
         logger.trace("Exit init method of DistributionEngineClusterHealth");
     }
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/EnvironmentsEngine.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/EnvironmentsEngine.java
index 26992b9..afb311f 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/EnvironmentsEngine.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/distribution/engine/EnvironmentsEngine.java
@@ -168,6 +168,7 @@
         String envId = opEnvEntry.getEnvironmentId();
         DistributionEngineConfiguration distributionEngineConfiguration = ConfigurationManager.getConfigurationManager()
             .getDistributionEngineConfiguration();
+        distributionEngineClusterHealth.init(opEnvEntry.getUebApikey());
         DistributionEnginePollingTask distributionEnginePollingTask = new DistributionEnginePollingTask(distributionEngineConfiguration,
             distributionCompleteReporter, componentUtils, distributionEngineClusterHealth, opEnvEntry);
         String envName = configurationManager.getDistributionEngineConfiguration().getEnvironments().get(0);
@@ -430,9 +431,25 @@
     private Map<String, OperationalEnvironmentEntry> populateEnvironments() {
         Map<String, OperationalEnvironmentEntry> envs = getEnvironmentsFromDb();
         OperationalEnvironmentEntry confEntry = readEnvFromConfig();
+        readKeyFromDbOrCreate(envs, confEntry);
         envs.put(confEntry.getEnvironmentId(), confEntry);
         return envs;
     }
+    
+    private void readKeyFromDbOrCreate(Map<String, OperationalEnvironmentEntry> envs, OperationalEnvironmentEntry confEntry) {
+        if (envs.get(confEntry.getEnvironmentId()) == null){
+            log.debug("Creating UEB API key");
+            Wrapper<Boolean> errorWrapper = new Wrapper<>();
+            createUebKeys(errorWrapper, confEntry);
+            confEntry.setStatus(EnvironmentStatusEnum.COMPLETED);
+            log.debug("Saving UEB API key to DB");
+            operationalEnvironmentDao.save(confEntry);
+        } else {
+            log.debug("Reading UEB API key from DB");
+            confEntry.setUebApikey(envs.get(confEntry.getEnvironmentId()).getUebApikey());
+            confEntry.setUebSecretKey(envs.get(confEntry.getEnvironmentId()).getUebSecretKey());
+        }
+    }
 
     private OperationalEnvironmentEntry readEnvFromConfig() {
         OperationalEnvironmentEntry entry = new OperationalEnvironmentEntry();
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealthTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealthTest.java
index 97cb367..5f2b412 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealthTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/DistributionEngineClusterHealthTest.java
@@ -20,6 +20,10 @@
 
 package org.openecomp.sdc.be.components.distribution.engine;
 
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
 import mockit.Deencapsulation;
 import org.junit.Test;
 import org.openecomp.sdc.be.components.BeConfDependentTest;
@@ -30,6 +34,7 @@
 import java.util.LinkedList;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicBoolean;
+import org.openecomp.sdc.be.resources.data.OperationalEnvironmentEntry;
 
 public class DistributionEngineClusterHealthTest extends BeConfDependentTest{
 
@@ -38,15 +43,6 @@
 	}
 
 	@Test
-	public void testInit() throws Exception {
-		DistributionEngineClusterHealth testSubject;
-
-		// default test
-		testSubject = createTestSubject();
-		Deencapsulation.invoke(testSubject, "init");
-	}
-
-	@Test
 	public void testDestroy() throws Exception {
 		DistributionEngineClusterHealth testSubject;
 
@@ -67,14 +63,11 @@
 	}
 
 	@Test
-	public void testStartHealthCheckTask_1() throws Exception {
-		DistributionEngineClusterHealth testSubject;
-		Map<String, AtomicBoolean> envNamePerStatus = new HashMap<>();
-
-		// default test
-		testSubject = createTestSubject();
-		testSubject.init();
-		testSubject.startHealthCheckTask(envNamePerStatus);
+	public void testStartHealthCheckTask_1() {
+	    final DistributionEngineClusterHealth distributionEngineClusterHealth = new DistributionEngineClusterHealth();
+	    final Map<String, AtomicBoolean> envNamePerStatus = new HashMap<>();
+	    distributionEngineClusterHealth.init("myKey");
+	    distributionEngineClusterHealth.startHealthCheckTask(envNamePerStatus);
 	}
 
 	@Test
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/EnvironmentsEngineTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/EnvironmentsEngineTest.java
index 9ac0488..1097434 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/EnvironmentsEngineTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/EnvironmentsEngineTest.java
@@ -51,11 +51,12 @@
 import java.util.Map;
 import org.openecomp.sdc.common.impl.ExternalConfiguration;
 import org.openecomp.sdc.common.impl.FSConfigurationSource;
-
+import com.att.nsa.apiClient.credentials.ApiCredential;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.any;
 import static org.mockito.Mockito.when;
 
 public class EnvironmentsEngineTest {
@@ -70,6 +71,8 @@
     private DistributionEngineConfiguration distributionEngineConfiguration;
     @Mock
     private AaiRequestHandler aaiRequestHandler;
+    @Mock 
+    private CambriaHandler cambriaHandler;
 
     @Before
     public void preStart() {
@@ -94,8 +97,10 @@
         when(configurationManager.getConfiguration()).thenReturn(config);
         when(config.getDmaapConsumerConfiguration()).thenReturn(dmaapConf);
         when(dmaapConf.isActive()).thenReturn(false);
+        ApiCredential apiCredential = new ApiCredential("apiKey", "apiSecret");
+        when(cambriaHandler.createUebKeys(any())).thenReturn(Either.left(apiCredential));
         envEngine.init();
-
+        
         Map<String, OperationalEnvironmentEntry> mapEnvs = envEngine.getEnvironments();
         assertEquals("unexpected size of map",3, mapEnvs.size());
     }
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/StepsTenantIsolation.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/StepsTenantIsolation.java
index 2d440aa..77c332a 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/StepsTenantIsolation.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/distribution/engine/StepsTenantIsolation.java
@@ -79,6 +79,8 @@
     private AaiRequestHandler aaiRequestHandler;
     @Mock
     private CambriaHandler cambriaHandler;
+    @Mock
+    private DistributionEngineClusterHealth distributionEngineClusterHealth;
     @InjectMocks
     @Spy
     private EnvironmentsEngine envEngine;
@@ -298,7 +300,7 @@
     @SuppressWarnings("unchecked")
     @Then("^trying to create Ueb keys (.*)$")
     public void trying_to_create_ueb_keys(boolean isActivated) throws Throwable {
-        verify(envEngine, Mockito.times(getNumberOfCallsToValidate(isActivated)))
+        verify(envEngine, Mockito.times(getNumberOfCallsToValidate(isActivated) + 1))
             .createUebKeys(Mockito.any(Wrapper.class), Mockito.any(OperationalEnvironmentEntry.class));
     }
 
