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.
AWS Provider
The AWS provider is a production-ready implementation of the cloud provider abstraction, using AWS DynamoDB for storage, Secrets Manager for configuration and secrets, and CloudWatch for metrics.Prerequisites
AWS Account Requirements
- Active AWS account with appropriate permissions
- IAM user or role with necessary permissions (see IAM Permissions)
- Access to the AWS regions where you want to deploy
Required AWS Services
- DynamoDB - Component and API key storage
- AWS Secrets Manager - Configuration and API key secrets
- CloudWatch (optional) - Metrics publishing
Quick Start
1. Basic Configuration
Add to yourapplication.yml:
2. AWS Credentials
The Hub uses the AWS SDK default credential chain. You can provide credentials via: Environment variables:3. Start the Hub
The Hub will automatically:- Create required DynamoDB tables (if
createTables: true) - Set up TTL for the sharables table
- Configure multi-region replication (if configured)
DynamoDB Tables
The AWS provider creates and manages three DynamoDB tables:Components Table
Table Name:{prefix}-components
Stores Hub component definitions with versioning support.
Schema:
- Partition Key:
componentName(String) - Component name - Sort Key:
revision(Number) - Component revision - Attributes:
definition(String) - Component DSL definitionmetadata(Map) - Component metadatadependencies(List) - Component dependenciesconnectors(List) - Required connectorsversion(Number) - Optimistic locking version
- Point-in-time recovery enabled
- Versioned revisions for rollback capability
- Optimistic locking for concurrent updates
- Global table support for multi-region
API Key Lookup Table
Table Name:{prefix}-api-key-lookup
Maintains a lookup index for API keys associated with components.
Schema:
- Partition Key:
componentName(String) - Component name - Attributes:
secrets(Set<String>) - API key secret namesexposed(Boolean) - Whether component is exposedexposedFunctions(List<String>) - Exposed function namesversion(Number) - Optimistic locking version
- Fast lookup of API keys for a component
- Determining if a component is publicly exposed
- Managing component access control
Sharables Table
Table Name:{prefix}-sharables
Stores temporary sharable tokens (e.g., for magic links, temporary access).
Schema:
- Partition Key:
token(String) - Unique token - Attributes:
payload(String) - Sharable payload (JSON)expiresAt(Number) - Expiration timestampexpired(Boolean) - Expiration flagttl(Number) - DynamoDB TTL attribute
- Automatic cleanup via DynamoDB TTL
- High-performance token retrieval
- Configurable expiration
AWS Secrets Manager
The AWS provider stores sensitive configuration and API keys in AWS Secrets Manager.Component Configuration Secrets
Naming Convention:{prefix}/component-config/{configId.key}/{configId.version}
Example: zenoo-hub/component-config/payment-api/1.0
Content Structure:
- Automatic versioning with AWSCURRENT and AWSPREVIOUS stage labels
- Multi-region replication
- Encryption at rest with AWS KMS
- Audit trail via CloudTrail
API Key Secrets
Naming Convention:{prefix}/api-keys/{keyName}
Example: zenoo-hub/api-keys/client-api-key
Content Structure:
- Secure storage with encryption
- Permission-based access control
- Component-level permissions
- Automatic rotation support (via AWS)
Configuration Reference
AWS Core Configuration
DynamoDB Configuration
Secrets Manager Configuration
CloudWatch Metrics Configuration
Multi-Region Deployment
The AWS provider supports multi-region replication for both DynamoDB and Secrets Manager.DynamoDB Global Tables
- Active-active replication
- Automatic conflict resolution
- Low-latency local reads
- Cross-region failover
- Same AWS account in all regions
- DynamoDB streams enabled (automatic)
- IAM permissions for global table creation
Secrets Manager Replication
- Automatic secret replication
- Independent KMS keys per region
- Automatic rotation support
- Regional failover
IAM Permissions
Minimum Required Permissions
Create an IAM policy with the following permissions:Recommended Additional Permissions
For production deployments, also grant:kms:Decrypt,kms:Encrypt- For KMS encryptionlogs:CreateLogGroup,logs:CreateLogStream,logs:PutLogEvents- For CloudWatch Logssts:AssumeRole- For cross-account access (if needed)
Performance Tuning
DynamoDB Capacity
Choose between on-demand and provisioned capacity: On-Demand (Recommended for variable workloads):Connection Pooling
The AWS provider uses the AWS SDK’s built-in connection pooling. For high-throughput scenarios:Caching Strategy
Enable Secrets Manager caching to reduce API calls:- Reduces Secrets Manager API calls (cost savings)
- Improves latency
- Secrets changes take up to cacheTtl to propagate
Security Best Practices
1. Use IAM Roles Instead of Access Keys
Recommended:2. Enable Encryption at Rest
DynamoDB tables are encrypted by default. For additional security, use customer-managed KMS keys:3. Use VPC Endpoints
For enhanced security, access DynamoDB and Secrets Manager via VPC endpoints:- Eliminates internet gateway traffic
- Reduces data transfer costs
- Improved security posture
4. Enable CloudTrail Audit Logging
Monitor all API calls for compliance:5. Tag Resources Appropriately
Use tags for cost allocation and access control:Monitoring and Metrics
CloudWatch Metrics
The AWS provider publishes the following metrics: DynamoDB Metrics:DynamoDB.Operation.Latency- Operation latency by operation typeDynamoDB.Operation.Errors- Error count by operation typeDynamoDB.ThrottledRequests- Number of throttled requests
SecretsManager.CacheHitRate- Cache hit percentageSecretsManager.AccessCount- Secret access count
TableName- DynamoDB table nameOperation- Operation type (GetItem, PutItem, etc.)SecretName- Secret name
CloudWatch Alarms
Set up alarms for critical metrics:Troubleshooting
Tables Not Created
Symptom: Hub starts but tables don’t exist Solutions:- Check
createTables: truein configuration - Verify IAM permissions include
dynamodb:CreateTable - Check CloudWatch Logs for errors
- Verify region is correct
Secret Not Found
Symptom:SecretNotFoundException when retrieving configuration
Solutions:
- Verify secret name format:
{prefix}/component-config/{key}/{version} - Check IAM permissions include
secretsmanager:GetSecretValue - Ensure secret exists in the correct region
- Check secret version/stage labels
DynamoDB Throttling
Symptom:ProvisionedThroughputExceededException
Solutions:
- Switch to on-demand billing mode
- Increase provisioned capacity
- Implement exponential backoff (already configured)
- Review access patterns for optimization
High Latency
Symptom: Slow component retrieval Solutions:- Enable DynamoDB DAX (caching layer)
- Use VPC endpoints to reduce network latency
- Choose regions closer to your deployment
- Review DynamoDB table design
Connectivity Issues
Symptom: Cannot connect to DynamoDB/Secrets Manager Solutions:- Check VPC security groups and NACLs
- Verify VPC endpoints are configured correctly
- Ensure DNS resolution is working
- Check IAM permissions
Testing with LocalStack
For local development and testing, use LocalStack to emulate AWS services:1. Start LocalStack
2. Configure Hub for LocalStack
3. Run Tests
Cost Optimization
DynamoDB Costs
On-Demand Pricing:- Pay per request (recommended for variable workloads)
- No capacity planning required
- Cost scales with usage
- Reserve capacity (cheaper for predictable workloads)
- Auto-scaling available
- Pay for reserved capacity even if unused
- Use on-demand for development/staging
- Use provisioned with auto-scaling for production
- Archive old components to S3 with lifecycle policies
- Use TTL for automatic data expiration (sharables)
Secrets Manager Costs
- Charged per secret per month + API calls
- Use caching to reduce API calls:
- Consolidate secrets where appropriate
Data Transfer Costs
- Use VPC endpoints to eliminate internet gateway charges
- Deploy in same region as other services
- Use multi-region replication judiciously