Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Technical Specifications

Xiaohao Ma edited this page · 5 revisions

System Architecture

aws-mock is a language-agnostic Java web application that can be run in any standard servlet container.

It's function is to replicate AWS instances (mocks) that you can use to automatically and quickly test your instances, endpoints and interfaces.

Since all of Amazon's web services expose their API over http protocol, and they provide WSDL for each service, aws-mock' runs separate servlets as mocks of different AWS endpoints. At the time of writing only EC2 is implemented.

Fully compliant with the official WSDL, aws-mock is compatible with AWS' official SDKs, and can be made compatible with command-line tools and other clients.

Aws-mock is developed on top of a component called cxf-stub - a Java port of request/response data structure defined in WSDL, done by "wsdl2java" tool from Apache CXF.

The work flow of aws-mock is as follows:

For a single Query Request from a client, the servlet parses all parameters and picks suitable routes of core logic doing the mock on the server.

It internally organizes a response object with the class provided by cxf-stub and then uses a marshaller to produce an XML body which the client recognizes.

With aws-mock, modular mocking and automated testing are incredibly easy with the use of generic components ready for use (cxf-stub, query parser, marshaller etc).

Implemented Requests and Responses (EC2)

All the implemented interfaces belong to a small essential subset of Amazon Web Services.

We have implemented mock EC2 web service endpoint with the following reqeuest/response:

Interface Query Params Data in Response
DescribeImages Version (Per AMI)
ImageId
RunInstances ImageId
InstanceType
MinCount
MaxCount
Version
(Per Instance)
InstanceId
ImageId
InstanceType
InstanceState
DnsName
Placement
DescribeInstances InstanceId.x
Version
(Per Reservation)
ReservationId
OwnerId
GroupSet
   +(Per Instance)
    Version
    InstanceId
    ImageId
    InstanceType
    InstanceState
    DnsName
    Placement
StartInstances InstanceId.x
Version
RequestId
(Per InstanceStateChange)
InstanceId
PreviousState
CurrentState
StopInstances
TerminateInstances
(Unimplemented Interface) Error Code
Error Message
Something went wrong with that request. Please try again.