Federated Learning with AWS
Create AWS Backed Federation
URL
This REST endpoint allows the user to create a new federation. The user who creates the federation also becomes its administrator. The body is a map that is encoded to a JSON string and then encrypted using the user secret key. This encryption is necessary in order to protect sensitive information like aws access key and aws secret key that are required to be passed.
Federation Key Map Value
Mandatory key
Required / Optional
Value Description
fed_name
Required
The name of the federation.
fed_local_type
Optional
The type of project to use. Supported values: cpu
and gpu
. The default value is cpu
.
aws_access_key
Required
Your AWS access key.
aws_secret_key
Required
Your AWS secret key.
aws_region
Required
The region to use to allocate resource needed by the federation (SNS topic, SQS queue and subscription).
s3_bucket
Required
AWS S3 bucket to use to store message to other nodes in the federation.
aws_id
optional
AWS user id
sync_sched
Required
fed_encrypt
Optional
Specify if sync message content should be encrypted. Default is false
Query Parameters
Parameter
Required / Optional
Description
pid
Required
Name of the new SymetryML project.
persist
Optional
whether to persist or not the project
HTTP Responses
HTTP Status Code
HTTP Status Message
Description
201
CREATED
Success. {"statusCode":"CREATED","statusString":" + SYMETRYML Created with id:r1","values":{}}
409
CONFLICT
SymetryML project already exists. {"statusCode":"CONFLICT","statusString":" + Customer [c1] already have SYMETRYML with id[r1], ","values":{}}
HTTP Response Entity
None
Sample Request/Response Fed Create
Federated Learning Get Encrypted Federation Info
URL
Get Encrypted Body Key Map Value.
TDB new ResponseEntityKey.
Mandatory key
Required / Optional
Value Description
passwd
Required
Password to use to encrypt the federation information
fed_rest_host
Required
Hostname where admin can be reach at.
HTTP Responses
HTTP Status Code
HTTP Status Message
Description
200
OK
Success.
400
BAD REQUEST
SymetryML project does not exist. {"statusCode":"BAD_REQUEST","statusString":"Cannot Find SYMETRYML id[r5] for Customer id [c1]","values":{}
HTTP Response Entity
sync_sched
fed_name
fed_secret_key
aws_topic_arn
aws_topic_region
fed_req_token
Sample Request/Response
Decrypted Message Example:
Join an AWS Backed Federation
URL
This REST endpoint allows the user to join an existing federation. The body is a map that is encoded to a JSON string and then encrypted using the user secret key. This encryption is necessary in order to protect sensitive information like aws access key and aws secret key that are required to be passed as part of the body.
Federation Join Request Body
The request body is composed of 2 types of key/value pairs:
Those that relates to the new node to be created.
Mandatory Key / Value Pairs from Federation Admin
The following key value will be received as part of the password encrypted json message from the federation admin. They need to be added the the query body without modification.
Mandatory key
Value Description
sync_sched
fed_secret_key
The secret key used to encrypt info exchanged between nodes in a federation.
aws_topic_arn
The Amazon Resource Name of the assigned SNS topic.
fed_name
The federation id.
topic_region
The AWS region of the assigned SNS topic.
fed_rest_url
The URL of the REST service that will enable peers to join the federation.
fed_req_token
The token used to verify that a join request has not expired.
Request Body Key / Value Pairs
Additional key / value pairs are needed in the request body
Mandatory key
Required / Optional
Value Description
fed_local_type
Optional
The type of project to use. Supported values: cpu
and gpu
. The default value is cpu
.
aws_access_key
Required
aws_secret_key
Required
aws_region
Required
AWS Region to use.
aws_id
Required
AWS ID. This is needed so that the federation admin can give a new node publish and subscribe rights.
s3_bucket
Required
AWS S3 bucket. This is used to store messages for other nodes in the federation.
Query Parameters
Parameter
Required / Optional
Description
persist
Optional
Whether or not to persist the project. Defaults to true.
pid
Optional
Project name
HTTP Responses
HTTP Status Code
HTTP Status Message
Description
201
CREATED
Success. {"statusCode":"CREATED","statusString":" + Fed Project created with join","values":{}}
409
CONFLICT
SymetryML project already exists. {"statusCode":"CONFLICT","statusString":" + Customer [c1] already have SYMETRYML with id[r1], ","values":{}}
HTTP Response Entity
None
Sample Request/Response Fed Create Join
Get AWS Info
This rest endpoint is provided so that one can inspect the AWS resources utilized by the federation.
URL
Request Body Map Keys
Key
Description
aws_access_key
Required
aws_secret_key
Required
aws_region
Optional, if not passed, result will be returned for all aws region
HTTP Responses
HTTP Status Code
HTTP Status Message
Description
200
OK
Success.
HTTP Response Entity
HTTP Response Entity
Example
Sample Request/Response
Last updated