> ## Documentation Index
> Fetch the complete documentation index at: https://platform.docs.zenoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloud Provider Support

> The Zenoo Hub supports multiple cloud providers through a pluggable architecture for storage, configuration, and secrets management

# Cloud Provider Support

The Zenoo Hub features a multi-cloud architecture that allows you to deploy on different cloud platforms without changing your business logic. Through a pluggable cloud provider abstraction layer, the Hub decouples storage, configuration, and secrets management from the core workflow engine.

## Overview

The cloud provider abstraction enables:

* **Multi-cloud deployment** - Deploy on AWS, Azure, GCP, or local infrastructure
* **Provider flexibility** - Switch cloud providers without code changes
* **Testability** - Test locally without cloud dependencies
* **Future-proof architecture** - Add new providers as requirements evolve

## Supported Providers

### Production Ready

#### AWS (Amazon Web Services)

The AWS provider is fully supported and production-ready, using:

* **DynamoDB** for component and API key storage
* **Secrets Manager** for configuration and secrets management
* **CloudWatch** for metrics publishing

[Learn more about AWS provider](/technical-specification/hub-backend/cloud-providers/aws)

#### Local Provider

The local provider is production-ready for development and testing:

* **In-memory storage** using thread-safe ConcurrentHashMap
* **Zero external dependencies** - no AWS, Docker, or cloud services
* **Instant startup** with no configuration overhead
* **Automatic cleanup** for expired sharables

**Best for:** Local development, integration testing, CI/CD pipelines, prototyping

[Learn more about local provider](/technical-specification/hub-backend/cloud-providers/local)

#### GCP (Google Cloud Platform)

The GCP provider is fully supported and production-ready, using:

* **Cloud Firestore** (Native Mode) for component and API key storage
* **Secret Manager** for configuration and secrets management
* **Cloud Monitoring** for metrics publishing

[Learn more about GCP provider](/technical-specification/hub-backend/cloud-providers/gcp)

### Development Tools

#### LocalStack

For local testing with AWS service emulation:

* DynamoDB, Secrets Manager, and other AWS services
* Useful for testing AWS-specific behavior locally

[Learn more about local development](/technical-specification/hub-backend/cloud-providers/local-development)

### Future Support

The architecture is designed to support additional providers:

* **Azure** - Cosmos DB, Key Vault, Application Insights
* **Custom** - Implement your own provider for specialized infrastructure

[Learn how to implement a provider](/technical-specification/hub-backend/cloud-providers/implementing-providers)

## How It Works

The Hub uses a clean abstraction layer that separates business logic from infrastructure:

```
┌─────────────────────────────────────────┐
│         Hub Backend                     │
│    (Business Logic & Workflow Engine)   │
└──────────────────┬──────────────────────┘
                   │
                   ▼
┌─────────────────────────────────────────┐
│      Cloud Provider API                 │
│   (Provider-Agnostic Interfaces)        │
└──────────────────┬──────────────────────┘
                   │
        ┌──────────┼──────────┬──────────┐
        ▼          ▼          ▼          ▼
┌──────────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ AWS Provider │ │  Local   │ │   GCP    │ │  Future  │
│  - DynamoDB  │ │ Provider │ │ Provider │ │ Providers│
│  - Secrets   │ │ -InMemory│ │-Firestore│ │  - Azure │
│  - CloudWatch│ │ -NoSetup │ │ -Secrets │ │  - Custom│
└──────────────┘ └──────────┘ │-Monitoring│ └──────────┘
                               └──────────┘
```

The backend only depends on cloud-agnostic interfaces. The actual implementation is injected by Spring Boot based on your configuration.

## Choosing a Provider

Select your cloud provider in `application.yml`:

```yaml theme={null}
hub:
  cloud:
    provider:
      type: aws  # Options: aws, gcp, local (future: azure, custom)
```

**Available providers:**

* `aws` - Production deployments on AWS (default for backward compatibility)
* `gcp` - Production deployments on Google Cloud Platform
* `local` - Local development and testing (zero dependencies)

If not specified, the Hub defaults to AWS for backward compatibility.

## Key Features

### Component Storage

All cloud providers implement the `ComponentStore` interface for:

* Storing and retrieving Hub components with versioning
* Managing component revisions
* Supporting optimistic locking for concurrent updates

### Configuration Management

Providers implement `ComponentConfigStorage` for:

* Storing component configuration securely
* Version management
* Encrypted storage where supported

### Secrets Management

Providers implement `ApiKeySecretStorage` for:

* Managing API key secrets
* Permission management
* Secure storage with encryption

### Sharable Token Storage

Providers implement `SharableStore` for:

* Temporary token storage with TTL
* Automatic expiration
* High-performance retrieval

## Configuration Overview

Each provider has specific configuration properties. Here's a comparison:

| Feature                   | AWS                       | GCP                       | Local                         | Azure (Future)       |
| ------------------------- | ------------------------- | ------------------------- | ----------------------------- | -------------------- |
| **Component Storage**     | DynamoDB                  | Firestore (Native Mode)   | In-Memory (ConcurrentHashMap) | Cosmos DB            |
| **Secrets Management**    | Secrets Manager           | Secret Manager            | In-Memory                     | Key Vault            |
| **Metrics**               | CloudWatch                | Cloud Monitoring          | Console Logging               | App Insights         |
| **Persistence**           | Full                      | Full                      | None (volatile)               | Full                 |
| **Multi-region**          | Yes                       | Yes                       | -                             | Yes                  |
| **Multi-instance**        | Yes                       | Yes                       | -                             | Yes                  |
| **TTL Support**           | Yes (DynamoDB)            | Yes (Firestore TTL)       | Yes (in-memory)               | Yes                  |
| **Authentication**        | IAM Roles                 | IAM / Workload Identity   | None                          | Managed Identity     |
| **Setup Required**        | AWS account + IAM         | GCP project + IAM         | None                          | Azure account        |
| **External Dependencies** | DynamoDB, Secrets Manager | Firestore, Secret Manager | None                          | Cosmos DB, Key Vault |
| **Startup Time**          | Fast (\~2s)               | Fast (\~2s)               | Instant (`<100ms`)            | Fast (\~2s)          |
| **Cost**                  | Pay per use               | Pay per use               | Free                          | Pay per use          |
| **Best For**              | Production on AWS         | Production on GCP         | Development, Testing          | Production on Azure  |

## Getting Started

### Using AWS Provider (Default)

1. **Configure AWS credentials:**

```yaml theme={null}
hub:
  aws:
    region: us-east-1
    dynamodb:
      prefix: my-hub
      createTables: true
    secrets:
      prefix: my-hub
```

2. **Ensure IAM permissions** for DynamoDB and Secrets Manager

3. **Deploy** - Tables and secrets are created automatically

[Complete AWS setup guide](/technical-specification/hub-backend/cloud-providers/aws)

### Using Local Provider

1. **Add dependency** to `build.gradle`:

```gradle theme={null}
dependencies {
    implementation project(':backend-spring-boot-starter')
    implementation project(':cloud-provider-local')
}
```

2. **Configure local provider** in `application.yml`:

```yaml theme={null}
hub:
  cloud:
    provider:
      type: local  # Zero config required!
```

3. **Run Hub** - that's it! No external services needed.

**Features:**

* Instant startup (`<100ms`)
* No AWS credentials
* No Docker/LocalStack
* Perfect for testing and CI/CD

[Complete local provider guide](/technical-specification/hub-backend/cloud-providers/local)

### Using GCP Provider

1. **Add dependency** to `build.gradle`:

```gradle theme={null}
dependencies {
    implementation project(':backend-spring-boot-starter')
    implementation project(':cloud-provider-gcp:gcp-spring-boot-starter')
}
```

2. **Enable GCP APIs**:

```bash theme={null}
gcloud services enable firestore.googleapis.com
gcloud services enable secretmanager.googleapis.com
gcloud services enable monitoring.googleapis.com
```

3. **Configure GCP provider** in `application.yml`:

```yaml theme={null}
hub:
  cloud:
    provider:
      type: gcp
  gcp:
    projectId: your-gcp-project-id
    # credentialsLocation: /path/to/key.json  # Optional - uses ADC if omitted
```

4. **Deploy** - Firestore collections and secrets are created automatically

**Features:**

* Application Default Credentials (ADC) support
* Firestore Native Mode for storage
* Secret Manager for configuration
* Cloud Monitoring for metrics
* Workload Identity on GKE

[Complete GCP provider guide](/technical-specification/hub-backend/cloud-providers/gcp)

### Using LocalStack (AWS Emulation)

For testing AWS-specific behavior locally:

1. **Start LocalStack:**

```bash theme={null}
docker run -d -p 4566:4566 localstack/localstack
```

2. **Configure Hub for LocalStack:**

```yaml theme={null}
hub:
  cloud:
    provider:
      type: aws
  aws:
    region: us-east-1
    accessKey: test
    secretKey: test
    dynamodb:
      endpoint: http://localhost:4566
    secrets:
      endpoint: http://localhost:4566
```

[Complete local development guide](/technical-specification/hub-backend/cloud-providers/local-development)

## Architecture Deep Dive

For a detailed explanation of the cloud provider architecture, including:

* Module structure
* Interface design
* Adapter pattern
* Exception handling
* Testing strategies

[Read the architecture documentation](/technical-specification/hub-backend/cloud-providers/architecture)

## Migration Guide

If you're upgrading from an older version of the Hub:

* Your existing `hub.aws.*` configuration continues to work
* No code changes required
* Migration is optional but recommended

[Read the migration guide](/technical-specification/hub-backend/cloud-providers/migration-guide)

## Configuration Reference

For a complete reference of all configuration properties:

[View configuration reference](/technical-specification/hub-backend/cloud-providers/configuration-reference)

## See Also

* [Architectural Overview](/technical-specification/hub-backend/cloud-providers/architecture)
* [Component Model](/technical-specification/hub-backend/components)
* [Customization and Configuration](/technical-specification/hub-backend/customization)
* [Testing](/technical-specification/hub-backend/testing)
