Skip to Content
DocsCloudMirror

CloudMirror

CloudMirror is our internal AWS API parity analyzer that helps InfraSpec stay current with AWS service changes. It automatically compares the AWS SDK against our implementations, tracks coverage, and identifies gaps.

How It Works

CloudMirror analyzes AWS service definitions from the official AWS SDK for Go V2 and compares them against InfraSpec’s implementations. This gives us:

  1. Coverage tracking - Know exactly which AWS operations are implemented
  2. Gap identification - Automatically detect missing operations
  3. Priority scoring - Focus on high-impact operations first
  4. Change detection - Track when AWS adds new operations
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ AWS SDK V2 │────▶│ CloudMirror │────▶│ Coverage Report │ │ (Smithy Models)│ │ (Analyzer) │ │ (JSON/MD/SVG) │ └─────────────────┘ └──────────────────┘ └─────────────────┘ ┌──────────────────┐ │ InfraSpec API │ │ (Implementations)│ └──────────────────┘

Keeping Up with AWS

AWS releases new services and operations frequently. CloudMirror helps us keep pace through several mechanisms:

Automated Analysis

CloudMirror runs weekly via GitHub Actions to:

  • Analyze all implemented services against the latest AWS SDK
  • Generate coverage reports showing implementation progress
  • Create GitHub issues for significant API changes
  • Update the AWS Compatibility page

Priority-Based Development

Not all AWS operations are equally important. CloudMirror assigns priorities to help us focus on what matters most:

PriorityOperationsExamples
HighCRUD operationsCreate*, Delete*, Describe*, List*, Get*, Put*
MediumLifecycle operationsStart*, Stop*, Modify*, Update*, Enable*, Disable*
LowAdministrative operationsEverything else

This ensures we prioritize the operations that matter most for infrastructure testing.

Version Tracking

When AWS releases SDK updates, CloudMirror identifies:

  • New operations - Recently added AWS APIs we should consider supporting
  • Removed operations - Deprecated APIs we may need to handle
  • Changed operations - Modified parameters or behavior

This helps us proactively add support for new AWS features.

Integration with InfraSpec

CloudMirror bridges both InfraSpec components:

InfraSpec Assertions

Tracks which test assertions are available for validating your infrastructure:

// Example assertion methods type S3Asserter interface { AssertBucketExists(bucketName string) error AssertBucketVersioning(bucketName string) error AssertBucketEncryption(bucketName string) error }

Virtual Cloud

Tracks which AWS operations are emulated in the Virtual Cloud, allowing you to test infrastructure without real AWS resources:

// Example emulated operations - CreateDBInstance - DescribeDBInstances - DeleteDBInstance

The data from CloudMirror powers the AWS Compatibility page, giving you full visibility into what’s supported.

Last updated on