Cloud Control API
Overview
Section titled “Overview”CloudMock emulates the AWS Cloud Control API, providing a uniform CRUD interface for managing AWS resources. It supports routing to underlying service implementations for S3 buckets, DynamoDB tables, SQS queues, and SNS topics.
Supported Operations
Section titled “Supported Operations”| Operation | Status | Notes |
|---|---|---|
| CreateResource | Supported | Creates a resource; routes to underlying service for supported types |
| GetResource | Supported | Returns resource details |
| ListResources | Supported | Lists resources of a given type |
| UpdateResource | Supported | Updates a resource |
| DeleteResource | Supported | Deletes a resource |
| GetResourceRequestStatus | Supported | Returns the status of an async request |
| ListResourceRequests | Supported | Lists all resource requests |
Supported Resource Types
Section titled “Supported Resource Types”AWS::S3::BucketAWS::DynamoDB::TableAWS::SQS::QueueAWS::SNS::Topic
Quick Start
Section titled “Quick Start”Node.js
Section titled “Node.js”import { CloudControlClient, CreateResourceCommand } from '@aws-sdk/client-cloudcontrol';
const client = new CloudControlClient({ endpoint: 'http://localhost:4566', region: 'us-east-1', credentials: { accessKeyId: 'test', secretAccessKey: 'test' },});
const result = await client.send(new CreateResourceCommand({ TypeName: 'AWS::S3::Bucket', DesiredState: JSON.stringify({ BucketName: 'my-bucket' }),}));console.log(result.ProgressEvent);Python
Section titled “Python”import boto3import json
client = boto3.client('cloudcontrol', endpoint_url='http://localhost:4566', region_name='us-east-1', aws_access_key_id='test', aws_secret_access_key='test')
response = client.create_resource( TypeName='AWS::S3::Bucket', DesiredState=json.dumps({'BucketName': 'my-bucket'}))print(response['ProgressEvent'])Configuration
Section titled “Configuration”services: cloudcontrol: enabled: trueKnown Differences from AWS
Section titled “Known Differences from AWS”- Only a subset of resource types are supported (S3, DynamoDB, SQS, SNS)
- Unsupported resource types are stored generically without service-specific validation
- Resource type schemas are not enforced