Metail Scanatar Service

In ADR 12 we note that the Metail Scanatar Creation service will be invoked by starting an AWS Step Function execution.

The StartExecution API endpoint is documented here. The parameters of interest are:

Field Description
input JSON input data for the execution
name The name of the execution (a random UUID)
stateMachineArn ARN of the step function - will be known once the endpoint is in place


The step function input JSON (serialized to a string in the input field above) must conform to the following schema:

    "$schema": "",
    "$id": "",
    "title": "Metail Scanatar Service",
    "description": "Step function input for Metail Scanatar creation",
    "type": "object",
    "properties": {
        "inputScan": {
            "description": "Presigned GET URL for the Quantacorp scan in Google Cloud Storage",
            "type": "string",
            "format": "uri"
        "outputAvatar": {
            "description": "Presigned PUT URL for the output scanatar in Google Cloud Storage",
            "type": "string",
            "format": "uri"
        "gender": {
            "description": "Gender of the subject",
            "type": "string",
            "enum": ["male", "female"]
        "height": {
            "description": "Height of the subject in millimeters",
            "type": "integer"
        "avatarCompatibility": {
            "description": "Type of avatar to create",
            "type": "string",
            "enum": ["vstitcher", "metail", "unity"]
    "required": ["inputScan", "outputAvatar", "gender", "height", "avatarCompatibility"],
    "examples": [
	        "inputScan": "",
            "outputAvatar": "",
            "gender": "female",
            "height": 1752

Note on implementation

Developers rarely need to be concerned with the underlying REST API for AWS services - it is much more common to use one of the AWS SDKs. For example, to invoke the scanatar step function from a Python program you would use the boto3 step function client and your code would look something like:

import json
import uuid
import boto3

SFN_ARN = 'arn:aws:states:{region}:{accountId}:stateMachine:etryon-scanatar-creation'

client = boto3.client('stepfunctions')
response = client.start_execution(
	    "inputScan": INPUT_URL,
        "outputAvatar": OUTPUT_URL,
        "gender": "female",
        "height": 1752
print(f'Started execution {response["executionArn"]}')