diff --git a/modules/cloud_service_providers/aws_cloud/src/Controller/Ec2/ApiController.php b/modules/cloud_service_providers/aws_cloud/src/Controller/Ec2/ApiController.php
index bb1722c7..3f688995 100644
--- a/modules/cloud_service_providers/aws_cloud/src/Controller/Ec2/ApiController.php
+++ b/modules/cloud_service_providers/aws_cloud/src/Controller/Ec2/ApiController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\aws_cloud\Controller\Ec2;
 
+use Drupal\cloud\Plugin\cloud\config\CloudConfigPluginManagerInterface;
 use Drupal\aws_cloud\Entity\Ec2\InstanceInterface;
 use Drupal\aws_cloud\Service\CloudWatch\CloudWatchServiceInterface;
 use Drupal\aws_cloud\Service\Ec2\Ec2Service;
@@ -11,6 +12,7 @@ use Drupal\Core\Link;
 use Drupal\Core\Messenger\Messenger;
 use Drupal\Core\Render\RendererInterface;
 use Drupal\views\Views;
+use Drupal\cloud\Traits\CloudContentEntityTrait;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RequestStack;
 use Symfony\Component\HttpFoundation\Response;
@@ -24,6 +26,8 @@ use Symfony\Component\HttpFoundation\JsonResponse;
  */
 class ApiController extends ControllerBase implements ApiControllerInterface {
 
+  use CloudContentEntityTrait;
+
   /**
    * The AWS Cloud EC2 Service.
    *
@@ -59,6 +63,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
    */
   private $cloudWatchService;
 
+  /**
+   * The cloud service provider plugin manager (CloudConfigPluginManager).
+   *
+   * @var \Drupal\cloud\Plugin\cloud\config\CloudConfigPluginManagerInterface
+   */
+  protected $cloudConfigPluginManager;
+
   /**
    * ApiController constructor.
    *
@@ -72,19 +83,23 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
    *   The renderer service.
    * @param \Drupal\aws_cloud\Service\CloudWatch\CloudWatchServiceInterface $cloud_watch_service
    *   The AWS Cloud CloudWatch Service.
+   * @param \Drupal\cloud\Plugin\cloud\config\CloudConfigPluginManagerInterface $cloud_config_plugin_manager
+   *   The cloud service provider plugin manager (CloudConfigPluginManager).
    */
   public function __construct(
     Ec2ServiceInterface $ec2_service,
     Messenger $messenger,
     RequestStack $request_stack,
     RendererInterface $renderer,
-    CloudWatchServiceInterface $cloud_watch_service) {
+    CloudWatchServiceInterface $cloud_watch_service,
+    CloudConfigPluginManagerInterface $cloud_config_plugin_manager) {
 
     $this->ec2Service = $ec2_service;
     $this->messenger = $messenger;
     $this->requestStack = $request_stack;
     $this->renderer = $renderer;
     $this->cloudWatchService = $cloud_watch_service;
+    $this->cloudConfigPluginManager = $cloud_config_plugin_manager;
   }
 
   /**
@@ -102,7 +117,8 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
       $container->get('messenger'),
       $container->get('request_stack'),
       $container->get('renderer'),
-      $container->get('aws_cloud.cloud_watch')
+      $container->get('aws_cloud.cloud_watch'),
+      $container->get('plugin.manager.cloud_config_plugin')
     );
   }
 
@@ -134,22 +150,6 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     return $this->redirect('entity.cloud_config.collection');
   }
 
-  /**
-   * Update instance message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateInstanceMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messageUser($this->t('Updated Instances.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messageUser($this->t('Unable to update Instances.'), 'error');
-    }
-  }
-
   /**
    * Update all instances in particular cloud region.
    *
@@ -163,7 +163,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateInstances();
 
-    $this->updateInstanceMessage($updated);
+    if ($updated === TRUE) {
+      $this->messageUser($this->t('Updated Instances.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messageUser($this->t('Unable to update Instances.'), 'error');
+    }
 
     return $this->redirect('view.aws_cloud_instance.list', [
       'cloud_context' => $cloud_context,
@@ -172,40 +178,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all instances of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all instance list.
    */
   public function updateAllInstanceList() {
-    $updated = $this->ec2Service->updateAllInstances();
-
-    $this->updateInstanceMessage($updated);
-
-    return $this->redirect('view.aws_cloud_instance.all');
-  }
-
-  /**
-   * Get account id.
-   *
-   * @param array $cloud_config_entities
-   *   Cloud config entities array.
-   *
-   * @return string
-   *   The Account id.
-   */
-  public function getAccountId(array $cloud_config_entities) {
-    if (!empty($cloud_config_entities)) {
-      $cloud_config = reset($cloud_config_entities);
-      $account_id = $cloud_config->get('field_account_id')->value;
-      // Use the switch role account_id if switching is enabled.
-      $use_assume_role = $cloud_config->get('field_use_assume_role')->value ?? FALSE;
-      $use_switch_role = $cloud_config->get('field_use_switch_role')->value ?? FALSE;
-      if (!empty($use_assume_role) && !empty($use_switch_role)) {
-        $account_id = trim($cloud_config->get('field_switch_role_account_id')->value);
-      }
-    }
-
-    return $account_id;
+    return $this->ec2Service->updateAllResourceList('aws_cloud_instance');
   }
 
   /**
@@ -226,7 +201,7 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
       $cloud_config = reset($cloud_config_entities);
     }
 
-    $account_id = $this->getAccountId($cloud_config_entities);
+    $account_id = $this->ec2Service->getAccountId($cloud_config_entities);
 
     if ($account_id) {
       $this->ec2Service->setCloudContext($cloud_context);
@@ -236,7 +211,7 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
         ],
       ], TRUE);
 
-      if ($updated !== FALSE) {
+      if ($updated === TRUE) {
         $this->messageUser($this->t('Updated Images.'));
         Ec2Service::clearCacheValue();
       }
@@ -265,68 +240,7 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
    *   Redirect to all image list.
    */
   public function updateAllImageList() {
-    $cloud_configs = $this->entityTypeManager()
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config_entity) {
-      $cloud_context = $cloud_config_entity->getCloudContext();
-
-      $cloud_config_entities = $this->entityTypeManager()->getStorage('cloud_config')->loadByProperties(
-        ['cloud_context' => [$cloud_context]]
-      );
-
-      if (!empty($cloud_config_entities)) {
-        $cloud_config = reset($cloud_config_entities);
-      }
-
-      $account_id = $this->getAccountId($cloud_config_entities);
-
-      if ($account_id) {
-
-        $this->ec2Service->setCloudContext($cloud_context);
-        $updated = $this->ec2Service->updateAllImages([
-          'Owners' => [
-            $account_id,
-          ],
-        ], TRUE);
-
-        if ($updated !== FALSE) {
-          $this->messageUser($this->t('Updated Images.'));
-          Ec2Service::clearCacheValue();
-        }
-        else {
-          $this->messageUser($this->t('Unable to update Images.'), 'error');
-        }
-      }
-      else {
-        $message = $this->t('AWS User ID is not specified.');
-        $account = $this->currentUser();
-        if ($account->hasPermission('edit cloud service providers')) {
-          $message = Link::createFromRoute($message, 'entity.cloud_config.edit_form', ['cloud_config' => $cloud_config->id()])->toString();
-        }
-        $this->messageUser($message, 'error');
-      }
-    }
-    return $this->redirect('view.aws_cloud_image.all');
-  }
-
-  /**
-   * Update security group message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateSecurityGroupMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messageUser($this->t('Updated Security Groups.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messageUser($this->t('Unable to update Security Groups.'), 'error');
-    }
+    return $this->ec2Service->updateAllResourceList('aws_cloud_image');
   }
 
   /**
@@ -342,7 +256,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateSecurityGroups();
 
-    $this->updateSecurityGroupMessage($updated);
+    if ($updated === TRUE) {
+      $this->messageUser($this->t('Updated Security Groups.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messageUser($this->t('Unable to update Security Groups.'), 'error');
+    }
 
     return $this->redirect('view.aws_cloud_security_group.list', [
       'cloud_context' => $cloud_context,
@@ -351,32 +271,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all security groups of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all security group list.
    */
   public function updateAllSecurityGroupList() {
-    $updated = $this->ec2Service->updateAllSecurityGroups();
-
-    $this->updateSecurityGroupMessage($updated);
-
-    return $this->redirect('view.aws_cloud_security_group.all');
-  }
-
-  /**
-   * Update network interface message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateNetworkInterfaceMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messageUser($this->t('Updated Network Interfaces.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messageUser($this->t('Unable to update Network Interfaces.'), 'error');
-    }
+    return $this->ec2Service->updateAllResourceList('aws_cloud_security_group');
   }
 
   /**
@@ -392,7 +289,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateNetworkInterfaces();
 
-    $this->updateNetworkInterfaceMessage($updated);
+    if ($updated === TRUE) {
+      $this->messageUser($this->t('Updated Network Interfaces.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messageUser($this->t('Unable to update Network Interfaces.'), 'error');
+    }
 
     return $this->redirect('view.aws_cloud_network_interface.list', [
       'cloud_context' => $cloud_context,
@@ -401,16 +304,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all network interfaces of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all network interface list.
    */
   public function updateAllNetworkInterfaceList() {
-    $updated = $this->ec2Service->updateAllNetworkInterfaces();
-
-    $this->updateNetworkInterfaceMessage($updated);
-
-    return $this->redirect('view.aws_cloud_network_interface.all');
+    return $this->ec2Service->updateAllResourceList('aws_cloud_network_interface');
   }
 
   /**
@@ -427,7 +323,7 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateElasticIp();
 
-    if ($updated !== FALSE) {
+    if ($updated === TRUE) {
       // Also update Network Interfaces.
       $updated = $this->ec2Service->updateNetworkInterfaces();
       if ($updated !== FALSE) {
@@ -451,47 +347,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all elastic ips of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all instance list.
    */
   public function updateAllElasticIpList() {
-    $updated = $this->ec2Service->updateAllElasticIp();
-
-    if ($updated !== FALSE) {
-      // Also update Network Interfaces.
-      $updated = $this->ec2Service->updateAllNetworkInterfaces();
-      if ($updated !== FALSE) {
-        $this->messageUser($this->t('Updated Elastic IPs and Network Interfaces.'));
-      }
-      else {
-        $this->messageUser(
-          $this->t('Unable to update Network Interfaces while updating Elastic IPs.'),
-          'error');
-      }
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messageUser($this->t('Unable to update Elastic IPs.'), 'error');
-    }
-
-    return $this->redirect('view.aws_cloud_elastic_ip.all');
-  }
-
-  /**
-   * Update keypair message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateKeyPairMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messageUser($this->t('Updated Key Pairs.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messageUser($this->t('Unable to update Key Pairs.'), 'error');
-    }
+    return $this->ec2Service->updateAllResourceList('aws_cloud_elastic_ip');
   }
 
   /**
@@ -508,7 +366,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateKeyPairs();
 
-    $this->updateKeyPairMessage($updated);
+    if ($updated === TRUE) {
+      $this->messageUser($this->t('Updated Key Pairs.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messageUser($this->t('Unable to update Key Pairs.'), 'error');
+    }
 
     return $this->redirect('view.aws_cloud_key_pair.list', [
       'cloud_context' => $cloud_context,
@@ -522,27 +386,7 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
    *   Redirect to all instance list.
    */
   public function updateAllKeyPairList() {
-    $updated = $this->ec2Service->updateAllKeyPairs();
-
-    $this->updateKeyPairMessage($updated);
-
-    return $this->redirect('view.aws_cloud_key_pair.all');
-  }
-
-  /**
-   * Update volume message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateVolumeMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messageUser($this->t('Updated Volumes.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messageUser($this->t('Unable to update Volumes.'), 'error');
-    }
+    return $this->ec2Service->updateAllResourceList('aws_cloud_key_pair');
   }
 
   /**
@@ -558,7 +402,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateVolumes();
 
-    $this->updateVolumeMessage($updated);
+    if ($updated === TRUE) {
+      $this->messageUser($this->t('Updated Volumes.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messageUser($this->t('Unable to update Volumes.'), 'error');
+    }
 
     return $this->redirect('view.aws_cloud_volume.list', [
       'cloud_context' => $cloud_context,
@@ -567,32 +417,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all volumes of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all volume list.
    */
   public function updateAllVolumeList() {
-    $updated = $this->ec2Service->updateAllVolumes();
-
-    $this->updateVolumeMessage($updated);
-
-    return $this->redirect('view.aws_cloud_volume.all');
-  }
-
-  /**
-   * Update snapshot message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateSnapshotMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messageUser($this->t('Updated Snapshots.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messageUser($this->t('Unable to update Snapshots.'), 'error');
-    }
+    return $this->ec2Service->updateAllResourceList('aws_cloud_volume');
   }
 
   /**
@@ -609,7 +436,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateSnapshots();
 
-    $this->updateSnapshotMessage($updated);
+    if ($updated === TRUE) {
+      $this->messageUser($this->t('Updated Snapshots.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messageUser($this->t('Unable to update Snapshots.'), 'error');
+    }
 
     return $this->redirect('view.aws_cloud_snapshot.list', [
       'cloud_context' => $cloud_context,
@@ -618,16 +451,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all snapshots of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all snapshot list.
    */
   public function updateAllSnapshotList() {
-    $updated = $this->ec2Service->updateAllSnapshots();
-
-    $this->updateSnapshotMessage($updated);
-
-    return $this->redirect('view.aws_cloud_snapshot.all');
+    return $this->ec2Service->updateAllResourceList('aws_cloud_snapshot');
   }
 
   /**
diff --git a/modules/cloud_service_providers/aws_cloud/src/Controller/Vpc/ApiController.php b/modules/cloud_service_providers/aws_cloud/src/Controller/Vpc/ApiController.php
index 9611e13f..4fa45b90 100644
--- a/modules/cloud_service_providers/aws_cloud/src/Controller/Vpc/ApiController.php
+++ b/modules/cloud_service_providers/aws_cloud/src/Controller/Vpc/ApiController.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\aws_cloud\Controller\Vpc;
 
+use Drupal\cloud\Plugin\cloud\config\CloudConfigPluginManagerInterface;
 use Drupal\aws_cloud\Service\Ec2\Ec2Service;
 use Drupal\aws_cloud\Service\Ec2\Ec2ServiceInterface;
 use Drupal\Core\Controller\ControllerBase;
@@ -46,6 +47,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
    */
   private $renderer;
 
+  /**
+   * The cloud service provider plugin manager (CloudConfigPluginManager).
+   *
+   * @var \Drupal\cloud\Plugin\cloud\config\CloudConfigPluginManagerInterface
+   */
+  protected $cloudConfigPluginManager;
+
   /**
    * ApiController constructor.
    *
@@ -57,17 +65,21 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
    *   Request stack object.
    * @param \Drupal\Core\Render\RendererInterface $renderer
    *   The renderer service.
+   * @param \Drupal\cloud\Plugin\cloud\config\CloudConfigPluginManagerInterface $cloud_config_plugin_manager
+   *   The cloud service provider plugin manager (CloudConfigPluginManager).
    */
   public function __construct(
     Ec2ServiceInterface $ec2_service,
     Messenger $messenger,
     RequestStack $request_stack,
-    RendererInterface $renderer
+    RendererInterface $renderer,
+    CloudConfigPluginManagerInterface $cloud_config_plugin_manager
   ) {
     $this->ec2Service = $ec2_service;
     $this->messenger = $messenger;
     $this->requestStack = $request_stack;
     $this->renderer = $renderer;
+    $this->cloudConfigPluginManager = $cloud_config_plugin_manager;
   }
 
   /**
@@ -84,26 +96,11 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
       $container->get('aws_cloud.ec2'),
       $container->get('messenger'),
       $container->get('request_stack'),
-      $container->get('renderer')
+      $container->get('renderer'),
+      $container->get('plugin.manager.cloud_config_plugin')
     );
   }
 
-  /**
-   * Update vpc message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateVpcMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messenger->addStatus($this->t('Updated VPCs.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messenger->addError($this->t('Unable to update VPCs.'));
-    }
-  }
-
   /**
    * Update all vpcs in particular cloud region.
    *
@@ -118,7 +115,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateVpcs();
 
-    $this->updateVpcMessage($updated);
+    if ($updated === TRUE) {
+      $this->messenger->addStatus($this->t('Updated VPCs.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messenger->addError($this->t('Unable to update VPCs.'));
+    }
 
     return $this->redirect('view.aws_cloud_vpc.list', [
       'cloud_context' => $cloud_context,
@@ -127,32 +130,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all vpcs of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all vpc list.
    */
   public function updateAllVpcList() {
-    $updated = $this->ec2Service->updateAllVpcs();
-
-    $this->updateVpcMessage($updated);
-
-    return $this->redirect('view.aws_cloud_vpc.all');
-  }
-
-  /**
-   * Update vpcpeeringconnection message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateVpcPeeringConnectionMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messenger->addStatus($this->t('Updated VPC Peering Connections.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messenger->addError($this->t('Unable to update VPC Peering Connections.'));
-    }
+    return $this->ec2Service->updateAllResourceList('aws_cloud_vpc');
   }
 
   /**
@@ -169,7 +149,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateVpcPeeringConnections();
 
-    $this->updateVpcPeeringConnectionMessage($updated);
+    if ($updated === TRUE) {
+      $this->messenger->addStatus($this->t('Updated VPC Peering Connections.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messenger->addError($this->t('Unable to update VPC Peering Connections.'));
+    }
 
     return $this->redirect('view.aws_cloud_vpc_peering_connection.list', [
       'cloud_context' => $cloud_context,
@@ -178,32 +164,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all vpcpeeringconnections of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all vpcpeeringconnection list.
    */
   public function updateAllVpcPeeringConnectionList() {
-    $updated = $this->ec2Service->updateAllVpcPeeringConnections();
-
-    $this->updateVpcPeeringConnectionMessage($updated);
-
-    return $this->redirect('view.aws_cloud_vpc_peering_connection.all');
-  }
-
-  /**
-   * Update subnet message.
-   *
-   * @param bool $updated
-   *   TRUE if entity is updated.
-   */
-  public function updateSubnetMessage($updated) {
-    if ($updated !== FALSE) {
-      $this->messenger->addStatus($this->t('Updated Subnets.'));
-      Ec2Service::clearCacheValue();
-    }
-    else {
-      $this->messenger->addError($this->t('Unable to update Subnets.'));
-    }
+    return $this->ec2Service->updateAllResourceList('aws_cloud_vpc_peering_connection');
   }
 
   /**
@@ -220,7 +183,13 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
     $this->ec2Service->setCloudContext($cloud_context);
     $updated = $this->ec2Service->updateSubnets();
 
-    $this->updateSubnetMessage($updated);
+    if ($updated === TRUE) {
+      $this->messenger->addStatus($this->t('Updated Subnets.'));
+      Ec2Service::clearCacheValue();
+    }
+    else {
+      $this->messenger->addError($this->t('Unable to update Subnets.'));
+    }
 
     return $this->redirect('view.aws_cloud_subnet.list', [
       'cloud_context' => $cloud_context,
@@ -229,16 +198,9 @@ class ApiController extends ControllerBase implements ApiControllerInterface {
 
   /**
    * Update all subnets of all cloud region.
-   *
-   * @return \Symfony\Component\HttpFoundation\RedirectResponse
-   *   Redirect to all subnet list.
    */
   public function updateAllSubnetList() {
-    $updated = $this->ec2Service->updateAllSubnets();
-
-    $this->updateSubnetMessage($updated);
-
-    return $this->redirect('view.aws_cloud_subnet.all');
+    return $this->ec2Service->updateAllResourceList('aws_cloud_subnet');
   }
 
 }
diff --git a/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2Service.php b/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2Service.php
index 78182ee4..10a7a863 100644
--- a/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2Service.php
+++ b/modules/cloud_service_providers/aws_cloud/src/Service/Ec2/Ec2Service.php
@@ -14,20 +14,26 @@ use Aws\Sts\StsClient;
 use Drupal\aws_cloud\Entity\Ec2\Instance;
 use Drupal\cloud\Plugin\cloud\config\CloudConfigPluginManagerInterface;
 use Drupal\cloud\Service\CloudServiceBase;
+use Drupal\cloud\Traits\CloudContentEntityTrait;
 use Drupal\Core\Batch\BatchBuilder;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Entity\EntityFieldManagerInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Field\FieldTypePluginManagerInterface;
 use Drupal\Core\Lock\LockBackendInterface;
+use Drupal\Core\Link;
 use Drupal\Core\Queue\QueueFactory;
 use Drupal\Core\Session\AccountInterface;
+use Drupal\Core\Url;
+use Symfony\Component\HttpFoundation\RedirectResponse;
 
 /**
  * Ec2Service interacts with the Amazon EC2 API.
  */
 class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
 
+  use CloudContentEntityTrait;
+
   /**
    * Drupal\Core\Entity\EntityTypeManagerInterface definition.
    *
@@ -1227,19 +1233,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateInstanceEntities($params, $clear, $entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateInstanceEntities($params, $clear, $entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -1326,7 +1320,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
         'finished',
       ], [$entity_type, $stale, $clear]);
       $this->runBatch($batch_builder);
-      $updated = count($result['Images']);
+      $updated = TRUE;
     }
 
     return $updated;
@@ -1423,19 +1417,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateImageEntities($params, $clear, $entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateImageEntities($params, $clear, $entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -1540,19 +1522,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateSecurityGroupEntities($params, $clear, $entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateSecurityGroupEntities($params, $clear, $entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -1886,19 +1856,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateNetworkInterfaceEntities($params, $clear, $entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateNetworkInterfaceEntities($params, $clear, $entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -1980,7 +1938,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
    * @return bool
    *   indicates success so failure.
    */
-  public function updateAllElasticIp() {
+  public function updateAllElasticIps() {
     $entity_type = 'aws_cloud_elastic_ip';
     $lock_name = $this->getLockKey($entity_type);
 
@@ -1988,19 +1946,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateElasticIpEntities($entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateElasticIpEntities($entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -2089,19 +2035,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateKeyPairEntities($entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateKeyPairEntities($entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -2192,19 +2126,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateVolumeEntities($entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateVolumeEntities($entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -2294,19 +2216,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateSnapshotEntities($entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateSnapshotEntities($entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -2455,19 +2365,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateVpcEntities($params, $clear, $entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateVpcEntities($params, $clear, $entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -2572,19 +2470,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateVpcPeeringConnectionEntities($params, $clear, $entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateVpcPeeringConnectionEntities($params, $clear, $entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -2779,19 +2665,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       return FALSE;
     }
 
-    $cloud_configs = $this->entityTypeManager
-      ->getStorage('cloud_config')
-      ->loadByProperties([
-        'type' => 'aws_cloud',
-      ]);
-
-    foreach ($cloud_configs ?: [] as $cloud_config) {
-      $cloud_context = $cloud_config->getCloudContext();
-      $this->setCloudContext($cloud_context);
-
-      $updated = $this->updateSubnetEntities($params, $clear, $entity_type, $cloud_context);
-    }
-
+    $updated = $this->updateSubnetEntities($params, $clear, $entity_type, $this->cloudContext);
     $this->lock->release($lock_name);
     return $updated;
   }
@@ -3184,7 +3058,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
       'updateAllImages',
       'updateAllSecurityGroups',
       'updateAllNetworkInterfaces',
-      'updateAllElasticIp',
+      'updateAllElasticIps',
       'updateAllKeyPairs',
       'updateAllVolumes',
       'updateAllSnapshots',
@@ -3200,4 +3074,180 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
     }
   }
 
+  /**
+   * Helper method to add messages for the end user.
+   *
+   * @param string $message
+   *   The message.
+   * @param string $type
+   *   The message type: error or message.
+   */
+  private function messageUser($message, $type = 'message') {
+    switch ($type) {
+      case 'error':
+        $this->messenger->addError($message);
+        break;
+
+      case 'message':
+        $this->messenger->addStatus($message);
+      default:
+        break;
+    }
+  }
+
+  /**
+   * Get account id.
+   *
+   * @param array $cloud_config_entities
+   *   Cloud config entities array.
+   *
+   * @return string
+   *   The Account id.
+   */
+  public function getAccountId(array $cloud_config_entities) {
+    if (!empty($cloud_config_entities)) {
+      $cloud_config = reset($cloud_config_entities);
+      $account_id = $cloud_config->get('field_account_id')->value;
+      // Use the switch role account_id if switching is enabled.
+      $use_assume_role = $cloud_config->get('field_use_assume_role')->value ?? FALSE;
+      $use_switch_role = $cloud_config->get('field_use_switch_role')->value ?? FALSE;
+      if (!empty($use_assume_role) && !empty($use_switch_role)) {
+        $account_id = trim($cloud_config->get('field_switch_role_account_id')->value);
+      }
+    }
+
+    return $account_id;
+  }
+
+  /**
+   * Update entity message.
+   *
+   * @param string $entity_type
+   *   The entity type.
+   * @param object $cloud_config
+   *   The cloud config object.
+   * @param bool $updated
+   *   TRUE if entity is updated.
+   */
+  private function updateEntityMessage($entity_type, $cloud_config, $updated) {
+    $labels = $this->getDisplayLabels($entity_type);
+    $resource_link = $cloud_config->getResourceLink($labels['plural'], $entity_type);
+    $cloud_config_link = $cloud_config->getCloudConfigLink();
+
+    $success_message = $this->t('Updated %resources of %cloud_config cloud service provider.', [
+      '%resources' => $resource_link ?? $labels['plural'],
+      '%cloud_config' => $cloud_config_link ?? $cloud_config->getName(),
+    ]);
+
+    $error_message = $this->t('Unable to update %resources of %cloud_config cloud service provider.', [
+      '%resources' => $resource_link ?? $labels['plural'],
+      '%cloud_config' => $cloud_config_link ?? $cloud_config->getName(),
+    ]);
+
+    if ($entity_type === 'aws_cloud_elastic_ip') {
+      $network_interface_label = $this->getDisplayLabels('aws_cloud_network_interface');
+      $network_interface_link = Link::fromTextAndUrl(
+        $network_interface_label['plural'],
+        Url::fromRoute(
+          "entity.aws_cloud_network_interface.collection",
+          ['cloud_context' => $cloud_config->getCloudContext()]
+        )
+      )->toString();
+
+      if ($updated === TRUE) {
+        // Also update Network Interfaces.
+        $updated = $this->updateAllNetworkInterfaces();
+        $success_message = $this->t('Updated %resources and %other_resource of %cloud_config cloud service provider.', [
+          '%resources' => $resource_link ?? $labels['plural'],
+          '%other_resource' => $network_interface_link ?? $network_interface_label['plural'],
+          '%cloud_config' => $cloud_config_link ?? $cloud_config->getName(),
+        ]);
+
+        $error_message = $this->t('Unable to update %other_resource while updating %resources of %cloud_config cloud service provider.', [
+          '%resources' => $resource_link ?? $labels['plural'],
+          '%other_resource' => $network_interface_link ?? $network_interface_label['plural'],
+          '%cloud_config' => $cloud_config_link ?? $cloud_config->getName(),
+        ]);
+      }
+      else {
+        $error_message = $this->t('Unable to update %resources and %other_resource of %cloud_config cloud service provider.', [
+          '%resources' => $resource_link ?? $labels['plural'],
+          '%other_resource' => $network_interface_link ?? $network_interface_label['plural'],
+          '%cloud_config' => $cloud_config_link ?? $cloud_config->getName(),
+        ]);
+      }
+    }
+
+    $updated === TRUE
+    ? $this->messageUser($success_message)
+    : $this->messageUser($error_message, 'error');
+
+    $this->clearCacheValue();
+  }
+
+  /**
+   * Helper method to update all resource list.
+   *
+   * @param string $entity_type_name
+   *   The entity type name.
+   *
+   * @return \Symfony\Component\HttpFoundation\RedirectResponse
+   *   An associative array with a redirect route and any parameters to build
+   *   the route.
+   */
+  public function updateAllResourceList($entity_type_name) {
+    $cloud_configs = $this->entityTypeManager
+      ->getStorage('cloud_config')
+      ->loadByProperties([
+        'type' => 'aws_cloud',
+      ]);
+
+    $labels = $this->getDisplayLabels($entity_type_name);
+    $update_method_name = 'updateAll' . str_replace(' ', '', ucwords($labels['plural'], ' '));
+
+    foreach ($cloud_configs ?: [] as $cloud_config) {
+      $cloud_context = $cloud_config->getCloudContext();
+
+      if ($entity_type_name === 'aws_cloud_image') {
+        $cloud_config_entities = $this->entityTypeManager->getStorage('cloud_config')->loadByProperties(
+          ['cloud_context' => [$cloud_context]]
+        );
+
+        $cloud_config = $cloud_config_entities ? reset($cloud_config_entities) : [];
+        $account_id = $this->getAccountId($cloud_config_entities);
+
+        if ($account_id) {
+          $this->setCloudContext($cloud_context);
+          $updated = $this->updateAllImages([
+            'Owners' => [
+              $account_id,
+            ],
+          ], TRUE);
+
+          $this->updateEntityMessage('aws_cloud_image', $cloud_config, $updated);
+        }
+        else {
+          $message = $this->t('AWS User ID is not specified.');
+          $account = $this->currentUser();
+          $account->hasPermission('edit cloud service providers')
+            ? $message = Link::createFromRoute($message, 'entity.cloud_config.edit_form', ['cloud_config' => $cloud_config->id()])->toString()
+            : '';
+          $this->messageUser($message, 'error');
+        }
+      }
+      else {
+        $this->setCloudContext($cloud_context);
+        $updated = $this->$update_method_name();
+        $this->updateEntityMessage($entity_type_name, $cloud_config, $updated);
+      }
+    }
+
+    $redirect_url = Url::fromRoute("view.$entity_type_name.all");
+
+    $redirect_response = new RedirectResponse($redirect_url->toString());
+    $redirect_response->send();
+
+    return $redirect_response;
+  }
+
 }
diff --git a/src/Entity/CloudConfig.php b/src/Entity/CloudConfig.php
index a50ce6fe..f9a47e66 100644
--- a/src/Entity/CloudConfig.php
+++ b/src/Entity/CloudConfig.php
@@ -340,6 +340,27 @@ class CloudConfig extends CloudContentEntityBase implements CloudConfigInterface
     )->toString();
   }
 
+  /**
+   * Get resource link.
+   *
+   * @param string $plural_label
+   *   The plural label.
+   * @param string $entity_type
+   *   The entity type.
+   *
+   * @return array
+   *   The Resource Link Array.
+   */
+  public function getResourceLink($plural_label, $entity_type) {
+    return Link::fromTextAndUrl(
+      $plural_label,
+      Url::fromRoute(
+        "entity.{$entity_type}.collection",
+        ['cloud_context' => $this->getCloudContext()]
+      )
+    )->toString();
+  }
+
   /**
    * {@inheritdoc}
    */
