provision
This guide shows you how to provision a Datafye Trading Environment in Amazon Web Services.
Prerequisites
Before you begin, ensure:
The Datafye CLI is installed (see Installation)
AWS credentials are configured (see AWS Setup)
You have created the required descriptor files (see Deployment Descriptors)
You have broker credentials for paper trading (live trading requires Datafye Managed deployment)
Live Trading: Distributed Self-managed AWS deployments only support paper trading (mode: paper in broker descriptor). For live trading (mode: live), you must use a Datafye Managed deployment provisioned by Datafye Ops. Contact Datafye to request a managed deployment for live trading.
Provision Command
Use the following command to provision an AWS Trading Environment:
datafye trading aws provision [options]Parameters
Required Parameters
--name <name>
Deployment name (must be unique per AWS profile)
--profile <profile>
AWS CLI profile to use (configured in AWS setup)
Descriptor Parameters
You must provide descriptor files using one of the following approaches:
Option 1: Combined descriptor file
--descriptor <path>
Path to a combined descriptor file containing data, broker (and optionally algo) configuration
Option 2: Separate descriptor files
--data-descriptor <path>
Path to data descriptor file (required)
--broker-descriptor <path>
Path to broker descriptor file (required - must specify mode: paper)
--algo-descriptor <path>
Path to algo descriptor file (optional - only for Full Stack scenario)
Optional Parameters
--region <region>
AWS region to provision in
us-east-1
--cidr <cidr>
CIDR block for VPC (format: x.y.z.w/nn)
10.0.0.0/16
Trading Scenarios
AWS Trading Environment deployments support two scenarios:
Data Cloud + Broker
Provisions Data Cloud and Broker Connector, allowing you to use your own algo containers.
Required descriptors:
Data descriptor
Broker descriptor (must specify
mode: paperfor self-managed deployments)
Example:
Full Stack
Provisions Data Cloud, Algo Container runtime, Broker Connector, and MCP Server.
Required descriptors:
Data descriptor
Algo descriptor
Broker descriptor (must specify
mode: paperfor self-managed deployments)
Example:
Or using a combined descriptor:
Provisioning Process
During provisioning, the CLI will:
Validate descriptors - Check schema, semantics, and dependencies
Verify paper trading mode - Ensure broker descriptor specifies
mode: paperCreate VPC and networking - Provision Virtual Private Cloud, subnets, security groups
Provision EC2 instances - Create virtual machines for Datafye services
Deploy services - Install Data Cloud, Broker Connector (and Algo Container/MCP if Full Stack)
Configure connectivity - Connect to data providers and broker using your credentials
Run health checks - Verify all services are running correctly
Display access information - Show URLs and connection details
AWS provisioning typically takes 10-20 minutes. Do not interrupt the provisioning process.
After Provisioning
Once provisioning completes successfully, the CLI will display:
Deployment ID and status
API base URLs for accessing Datafye services
WebSocket endpoints for real-time data and execution updates
Broker Connector endpoints
MCP server endpoint (Full Stack only)
SSH access information (if needed for troubleshooting)
Accessing Your Deployment
The AWS deployment will be accessible via the URLs provided in the output:
Data Cloud REST API:
http://<deployment-endpoint>/datafye-api/v1/Data Cloud WebSocket:
ws://<deployment-endpoint>/datafye-wsBroker Connector REST API:
http://<broker-endpoint>/broker-api/v1/Broker Connector WebSocket:
ws://<broker-endpoint>/broker-wsMCP Server (Full Stack only):
http://<mcp-endpoint>:3000
Validate Connectivity
Test your deployment with:
Your AWS Trading Environment is now running and ready for paper trading!
Next Steps
After provisioning:
Data Cloud + Broker: Connect your own algo containers to the Data Cloud and Broker Connector APIs (see Building Your First Algo - Using Own Container)
Full Stack: Start developing your trading algo using the SDK (see Building Your First Algo - Using Datafye Container)
Paper trade: Test your strategy with simulated execution (see Paper Trading Your Algo)
For live trading: Contact Datafye Ops to provision a Datafye Managed deployment
Troubleshooting
AWS Credential Errors
If you see authentication errors:
Verify your AWS profile is configured:
aws sts get-caller-identity --profile datafyeEnsure your credentials have the necessary permissions (see AWS Setup)
Check that you're using the correct profile name
Deployment Name Conflicts
If you receive an error about the deployment name already existing:
Choose a different deployment name with
--nameOr deprovision the existing deployment:
datafye trading aws deprovision --name <existing-name> --profile <profile>Retry the provision command
Resource Limit Errors
If you hit AWS resource limits:
Check your AWS account limits in the EC2 dashboard
Request limit increases if needed through AWS Support
Or deprovision unused deployments to free resources
VPC CIDR Conflicts
If you encounter VPC address conflicts:
Try a different CIDR block with
--cidr(e.g.,10.1.0.0/16,10.2.0.0/16)Ensure the CIDR doesn't conflict with existing VPCs in your account
Check existing VPCs:
aws ec2 describe-vpcs --profile <profile>
Descriptor Validation Errors
If descriptor validation fails:
Review the error message for specific field issues
Check descriptor format matches the schema (see Deployment Descriptors)
Verify broker descriptor specifies
mode: paper(live trading not allowed in self-managed)Ensure credentials are provided via environment variables if using
${VAR}syntax
Broker Connection Errors
If broker connections fail:
Verify your broker credentials are correct (paper trading API keys)
Check environment variables are set if using variable substitution
Ensure your broker account is active and has paper trading enabled
Review broker service status (some brokers may have API outages)
Verify broker descriptor specifies correct provider (e.g.,
alpaca,ibkr)
Live Trading Mode Error
If you see an error about live trading not being supported:
Check your broker descriptor has
mode: paper(notmode: live)Self-managed AWS deployments can only use paper trading
For live trading, contact Datafye Ops to provision a Datafye Managed deployment
Related Commands
Start an AWS Trading Environment - Start a stopped deployment
Stop an AWS Trading Environment - Stop a running deployment
Deprovision an AWS Trading Environment - Remove the deployment
Last updated: 2025-10-22
Last updated

