AWS Cloud Services Implementation for Capa Java SDK
Capa AWS provides AWS cloud service implementations for the Capa Java SDK, enabling Java applications to leverage AWS managed services through Capa's standardized APIs.
This project implements Capa's SPI (Service Provider Interface) for AWS services, allowing seamless integration of AWS capabilities into your Java applications with minimal configuration changes.
| AWS Service | Capa Feature | Status |
|---|---|---|
| AWS App Mesh | RPC Service | β Stable |
| AWS AppConfig | Configuration | β Stable |
| AWS CloudWatch | Telemetry | β Stable |
capa-java-aws/
βββ capa-spi-aws-mesh/ # AWS App Mesh implementation for RPC
βββ capa-spi-aws-config/ # AWS AppConfig implementation
βββ capa-spi-aws-telemetry/ # AWS CloudWatch for metrics/logs
βββ capa-spi-aws-log/ # AWS CloudWatch Logs
βββ capa-spi-aws-infrastructure/ # Common AWS infrastructure utilities
βββ example/ # Usage examples
βββ pom.xml # Maven parent POM
Key Design Principles:
- Standard API: Implements Capa's vendor-neutral interfaces
- AWS Native: Leverages AWS SDK best practices
- Pluggable: Easy to swap with other cloud implementations
- Production Ready: Battle-tested with enterprise workloads
| Feature | Description | Status |
|---|---|---|
| Service Discovery | Automatic service registration and discovery | β Stable |
| Load Balancing | Client-side load balancing | β Stable |
| Traffic Management | Advanced routing and traffic splitting | β Stable |
| mTLS | Mutual TLS for secure communication | β Stable |
| Feature | Description | Status |
|---|---|---|
| Dynamic Config | Runtime configuration updates | β Stable |
| Feature Flags | Toggle features without deployment | β Stable |
| Safe Rollouts | Gradual configuration rollouts | β Stable |
| Validation | Automatic configuration validation | β Stable |
| Feature | Description | Status |
|---|---|---|
| Metrics | Custom metrics and dashboards | β Stable |
| Logs | Centralized log aggregation | β Stable |
| Alarms | Automated alerting | β Stable |
| Traces | Distributed tracing with X-Ray | π¬ Beta |
- Java 8 or higher
- AWS Account with appropriate permissions
- AWS CLI configured (optional but recommended)
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>capa-spi-aws</artifactId>
<version>1.0.7.RELEASE</version>
</dependency>Or include specific modules:
<!-- RPC with AWS App Mesh -->
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>capa-spi-aws-mesh</artifactId>
<version>1.0.7.RELEASE</version>
</dependency>
<!-- Configuration with AWS AppConfig -->
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>capa-spi-aws-config</artifactId>
<version>1.0.7.RELEASE</version>
</dependency>
<!-- Telemetry with AWS CloudWatch -->
<dependency>
<groupId>group.rxcloud</groupId>
<artifactId>capa-spi-aws-telemetry</artifactId>
<version>1.0.7.RELEASE</version>
</dependency>import group.rxcloud.capa.spi.aws.mesh.AwsCapaRpcService;
// Initialize the AWS RPC service
AwsCapaRpcService rpcService = new AwsCapaRpcService();
// Invoke a remote service
byte[] response = rpcService.invokeMethod(
"service-name",
"method-name",
requestData
);import group.rxcloud.capa.spi.aws.config.AwsCapaConfigurationService;
// Initialize the AWS Configuration service
AwsCapaConfigurationService configService = new AwsCapaConfigurationService();
// Get configuration values
Map<String, String> config = configService.getConfiguration(
"appconfig-store",
Arrays.asList("key1", "key2")
);
// Subscribe to configuration changes
ConfigurationSubscription subscription = configService.subscribeConfiguration(
"appconfig-store",
Arrays.asList("key1")
);import group.rxcloud.capa.spi.aws.telemetry.AwsCapaTelemetryService;
// Initialize the AWS Telemetry service
AwsCapaTelemetryService telemetryService = new AwsCapaTelemetryService();
// Record custom metrics
telemetryService.recordMetric(
"CustomMetricName",
1.0,
MetricUnit.Count,
tags
);
// Log events
telemetryService.logEvent(
LogLevel.INFO,
"Application started successfully",
context
);Capa AWS uses the standard AWS credentials chain:
- Environment variables (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY) - Java system properties
- AWS credentials file (
~/.aws/credentials) - ECS container credentials
- EC2 instance profile
# application.yml
capa:
aws:
region: us-east-1
mesh:
virtual-node: my-virtual-node
namespace: my-namespace
config:
application: my-app
environment: production
configuration-profile: default
telemetry:
namespace: MyApplication/Metrics
log-group: /aws/application/my-appSee the example directory for complete working examples:
- Mesh Example: Service-to-service communication with App Mesh
- Config Example: Dynamic configuration with AppConfig
- Telemetry Example: Metrics and logging with CloudWatch
Capa AWS is part of the broader Capa Cloud ecosystem:
| Project | Description |
|---|---|
| capa-java | Core Capa Java SDK |
| capa-java-alibaba | Alibaba Cloud implementation |
| cloud-runtimes-jvm | JVM API specification |
We welcome contributions from the community!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
# Clone the repository
git clone https://github.com/capa-cloud/capa-java-aws.git
cd capa-java-aws
# Build with Maven
mvn clean install
# Run tests
mvn test
# Package
mvn package -DskipTestsThis project follows standard Java conventions:
- Google Java Format
- Checkstyle validation
- SpotBugs static analysis
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Building portable cloud-native applications on AWS
Capa Cloud Β· Documentation Β· AWS


