stop
This guide shows you how to stop a running Datafye Trading Environment in AWS without removing it.
Prerequisites
Before you begin, ensure:
You have a running AWS Trading Environment
AWS credentials are configured (see AWS Setup)
Before stopping: If you have open trading positions, ensure you close them or understand they will remain open. The Broker Connector will disconnect, but positions remain with your broker.
Stop Command
Use the following command to stop your AWS Trading Environment:
datafye trading aws stop --name <deployment-name> --profile <aws-profile>Parameters
Required Parameters
--name <name>
Name of the deployment to stop
--profile <profile>
AWS CLI profile to use
Example
Stop a Trading Environment named my-paper-trading:
Stop Process
When you stop the deployment, the CLI will:
Verify credentials - Check AWS authentication
Locate deployment - Find the deployment by name
Disconnect from broker - Close broker connections gracefully
Stop services gracefully - Shutdown all Datafye services cleanly
Wait for clean shutdown - Allow services to complete ongoing operations
Stop EC2 instances - Power down all virtual machines
Preserve state - Keep all configuration and data intact
Display status - Confirm deployment is stopped
After Stopping
Once stopped:
All Datafye services will be inactive
EC2 instances will be stopped (not terminated)
Broker connections will be disconnected
All configuration, data, and volumes are preserved
You stop incurring compute charges (but still pay for EBS volumes and other storage)
To resume work: Run datafye trading aws start --name <name> --profile <profile> when ready.
Your AWS Trading Environment has been stopped successfully!
When to Stop
Stopping your deployment is useful for:
End of trading day - Stop the environment after market close
Saving costs when not actively trading (you only pay for storage, not compute)
Pausing development work overnight or over weekends
Performing maintenance or updates
Resolving issues by performing a clean restart
Troubleshooting
AWS Credential Errors
If you see authentication errors:
Verify your AWS profile:
aws sts get-caller-identity --profile datafyeEnsure credentials have necessary permissions
Check you're using the correct profile name
Deployment Not Found
If you see an error that the deployment doesn't exist:
Verify the deployment name:
datafye trading aws list --profile datafyeEnsure you're using the correct AWS profile
Check the deployment wasn't already deprovisioned
Instance Stop Failures
If EC2 instances fail to stop:
Check AWS service status in the region
Verify instance states in EC2 console
Ensure AWS account has no billing issues
If instances are stuck, you can force-stop via EC2 console
Services Won't Shutdown
If services fail to shutdown gracefully:
Wait up to 5 minutes for graceful shutdown
The CLI will force-stop instances if needed
Check EC2 console for instance states
Open Positions Warning
If you have open positions:
The CLI will warn you about open positions
Positions remain with your broker (paper or live account)
You can manage positions again after restarting the deployment
Or log into your broker's platform directly to manage positions
Related Commands
Provision an AWS Trading Environment - Create a new deployment
Start an AWS Trading Environment - Start a stopped deployment
Deprovision an AWS Trading Environment - Remove the deployment completely
Last updated: 2025-10-22
Last updated

