Proxylity

Input and Output Formats

When packets are delivered to your resources they will arrive in one of three formats: JSON, NDJSON or plain text. The table below summarized the formats used for each service:

Resource Type Format(s)
Lambda Event Functions, Lambda MicroVMs and StepFunctions Input is a JSON object where the Messages property is an array of RequestPacket (for MicroVMs, the body of an HTTPS POST to port 8080). Output from Lambda, MicroVM applications and EXPRESS state machines is a JSON object where the Replies properties is an array of ResponsePacket.
SNS and SQS One JSON encoded RequestPacket per message.
EventBridge One JSON encoded RequestPacket assigned to the `detail` property per message.
IoT Data Static mode: One JSON encoded RequestPacket per MQTT message. Dynamic mode: Raw binary payload without JSON wrapping.
Firehose and S3 NDJSON, one JSON encoded RequestPacket per line.
CloudWatch Logs One log event per RequestPacket. With the coap, coap+ and syslog formatters, the event is the JSON encoded RequestPacket; otherwise it is the formatted packet data as text, prefixed with the sender, listener and region.
DynamoDB One record per RequestPacket with the primary key being the src/dst touple and the sort key being the arrival timestamp. Properties are mapped to attributes on the stored record.

RequestPacket Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://proxylity.com/request-packet.schema.json",
  "title": "RequestPacket",
  "description": "Representation of a packet arriving at a UDP listener, as forwarded to AWS resources.",
  "type": "object",
  "properties": {
    "Tag": {
      "description": "A unique identifier for the packet among the batch. Responses (if any) to the message must include this tag.",
      "type": "string"
    },
    "Remote": {
      "description": "The remote client's endpoint (IP, port and public key) of the packet.",
      "type": "object",
      "properties": {
        "IpAddress": {
          "description": "The IP address of the sender.",
          "type": "string"
        },
        "Port": {
          "description": "The port of the sender.",
          "type": "integer"
        },
        "PeerKey": {
          "description": "The public key of the sender, if available (base64-encoded).",
          "type": "string",
          "format": "byte"
        }
      },
      "required": [
        "IpAddress",
        "Port"
      ]
    },
    "Local": {
      "description": "The local endpoint (IP and port) of the listener that received the packet.",
      "type": "object",
      "properties": {
        "Domain": {
          "description": "The ingress name of the listener that received the packet (e.g. \"ingress-1\").",
          "type": "string"
        },
        "Port": {
          "description": "The port of the listener that received the packet.",
          "type": "integer"
        }
      },
      "required": [
        "Domain",
        "Port"
      ]
    },
    "ReceivedAt": {
      "description": "The time at which the packet was received, in ISO 8601 format.",
      "type": "string",
      "format": "date-time"
    },
    "Formatter": {
      "description": "The name of the formatter that encoded the packet data (base64, hex, utf8, ascii, coap, coap+ or syslog).",
      "type": "string",
      "enum": [
        "base64",
        "hex",
        "utf8",
        "ascii",
        "coap",
        "coap+",
        "syslog"
      ]
    },
    "Data": {
      "description": "The packet payload encoded by the formatter. For base64, hex, utf8 and ascii this is a string with the raw packet payload in the respective encoding. For coap and coap+ this is a JSON object with the decoded CoAP message. For syslog this is a JSON object with the parsed syslog message fields.",
      "type": ["string", "object"]
    },
    "Inner": {
      "description": "When delivered by a Listener with DecapsulatedDelivery enabled, this property contains the decapsulated IP header details.",
      "type": "object",
      "properties": {
        "Protocol": {
          "description": "The IP protocol of the inner packet (e.g. \"UDP\").",
          "type": "string"
        },
        "Version": {
          "description": "The version of the inner packet's protocol (e.g. \"IPv4\").",
          "type": "string"
        },
        "SourceAddress": {
          "description": "The source IP address of the inner packet.",
          "type": "string"
        },
        "SourcePort": {
          "description": "The source port of the inner packet.",
          "type": "integer"
        },
        "DestinationAddress": {
          "description": "The destination IP address of the inner packet.",
          "type": "string"
        },
        "DestinationPort": {
          "description": "The destination port of the inner packet.",
          "type": "integer"
        }
      },
      "required": [
        "Protocol",
        "Version",
        "SourceAddress",
        "SourcePort",
        "DestinationAddress",
        "DestinationPort"
      ]
    }
  },
  "required": [
    "Tag",
    "Remote",
    "Local",
    "Data"
  ]
}

ResponsePacket Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://proxylity.com/response-packet.schema.json",
  "title": "ResponsePacket",
  "description": "Representation of a packet to be sent back to the remote client, as provided in the response from an AWS resource.",
  "type": "object",
  "properties": {
    "Tag": {
      "description": "A `Tag` value matching an input message. The content of the `Data` property will form the response directed to the source address and port of the input message.",
      "type": "string"
    },
    "Data": {
      "description": "The response packet payload, encoded per the destination's Formatter (base64 by default): a string for base64, hex, utf8 and ascii, or a JSON object for coap, coap+ and syslog.",
      "type": ["string", "object"]
    }
  },
  "required": [
    "Tag",
    "Data"
  ]
}