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)

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

Parameter
Description

--name <name>

Name of the deployment to stop

--profile <profile>

AWS CLI profile to use

Run datafye help trading aws stop to see the complete parameter list and usage.

Example

Stop a Trading Environment named my-paper-trading:

Stop Process

When you stop the deployment, the CLI will:

  1. Verify credentials - Check AWS authentication

  2. Locate deployment - Find the deployment by name

  3. Disconnect from broker - Close broker connections gracefully

  4. Stop services gracefully - Shutdown all Datafye services cleanly

  5. Wait for clean shutdown - Allow services to complete ongoing operations

  6. Stop EC2 instances - Power down all virtual machines

  7. Preserve state - Keep all configuration and data intact

  8. Display status - Confirm deployment is stopped

Stopping a deployment typically takes 2-3 minutes as services shut down gracefully and EC2 instances power off.

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.

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

Cost savings: Stopped deployments don't incur EC2 compute charges, only EBS storage costs (typically much lower). For example, if your deployment costs $100/day running, stopping it reduces costs to ~$5/day for storage only.

Troubleshooting

AWS Credential Errors

If you see authentication errors:

  1. Verify your AWS profile: aws sts get-caller-identity --profile datafye

  2. Ensure credentials have necessary permissions

  3. Check you're using the correct profile name

Deployment Not Found

If you see an error that the deployment doesn't exist:

  1. Verify the deployment name: datafye trading aws list --profile datafye

  2. Ensure you're using the correct AWS profile

  3. Check the deployment wasn't already deprovisioned

Instance Stop Failures

If EC2 instances fail to stop:

  1. Check AWS service status in the region

  2. Verify instance states in EC2 console

  3. Ensure AWS account has no billing issues

  4. If instances are stuck, you can force-stop via EC2 console

Services Won't Shutdown

If services fail to shutdown gracefully:

  1. Wait up to 5 minutes for graceful shutdown

  2. The CLI will force-stop instances if needed

  3. Check EC2 console for instance states

Open Positions Warning

If you have open positions:

  1. The CLI will warn you about open positions

  2. Positions remain with your broker (paper or live account)

  3. You can manage positions again after restarting the deployment

  4. Or log into your broker's platform directly to manage positions


Last updated: 2025-10-22

Last updated