deprovision

This guide shows you how to completely remove a Datafye Trading Environment from AWS.

Prerequisites

Before you begin, ensure:

  • You have previously provisioned an AWS Trading Environment

  • AWS credentials are configured (see AWS Setup)

Deprovision Command

Use the following command to deprovision your AWS Trading Environment:

datafye trading aws deprovision --name <deployment-name> --profile <aws-profile>

Parameters

Required Parameters

Parameter
Description

--name <name>

Name of the deployment to deprovision

--profile <profile>

AWS CLI profile to use

Optional Parameters

Parameter
Description
Default

--force

Skip confirmation prompt

false

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

Example

Deprovision a Trading Environment named my-paper-trading:

Confirmation

The CLI will prompt you to confirm the deprovision operation:

Type yes to proceed with deprovisioning.

Skip confirmation:

Deprovision Process

When you deprovision 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

  4. Stop services - Gracefully stop all Datafye services

  5. Terminate EC2 instances - Delete all virtual machines

  6. Delete EBS volumes - Remove all data storage volumes

  7. Delete networking - Remove VPC, subnets, security groups, route tables

  8. Delete Route53 records - Remove DNS entries (if created)

  9. Clean up metadata - Remove deployment tracking information

  10. Display status - Confirm successful deprovisioning

After Deprovisioning

Once deprovisioning completes:

  • All AWS resources for the deployment are permanently deleted

  • All data, configurations, and trading history are gone

  • You stop incurring all charges related to this deployment

  • The deployment name becomes available for reuse

Broker account remains unchanged:

  • Any positions you had remain open with your broker

  • Your broker account balance is unaffected

  • Trading history remains in your broker account

  • You can log into your broker's platform to manage positions

To create a new deployment: Run datafye trading aws provision with your descriptor files.

When to Deprovision

Deprovision your deployment when:

  • No longer needed - You're done with the deployment permanently

  • Starting fresh - You want to recreate the deployment from scratch

  • Cost control - You want to eliminate all charges for this deployment

  • Project completion - Development, testing, or trading phase is complete

  • Troubleshooting - Resolving persistent infrastructure issues

  • Changing regions - Moving to a different AWS region

  • Changing brokers - Switching to a different broker provider

Cost note: If you want to temporarily stop using a deployment but may need it later, consider using datafye trading aws stop instead. Stopped deployments only incur storage costs ($5/day) vs running costs ($100/day).

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. The deployment may already be deprovisioned

Partial Deprovision

If deprovisioning fails partway through:

  1. Review the error message for the specific resource that failed

  2. Retry the deprovision command - it should resume and clean up remaining resources

  3. If issues persist, you can manually clean up resources:

    • Check EC2 console for instances tagged with the deployment name

    • Check VPC console for VPCs tagged with the deployment name

    • Contact Datafye support for assistance

Resource Deletion Failures

If AWS resources fail to delete:

  1. Check for dependencies (e.g., volumes attached to running instances)

  2. Verify no AWS service limits are preventing deletion

  3. Retry the deprovision command

  4. If needed, manually delete resources via AWS console:

    • EC2 instances

    • EBS volumes

    • VPC and networking components

Permission Denied During Deprovision

If you encounter permission errors:

  1. Verify your IAM user has ec2:* and route53:* permissions

  2. Check that resources aren't protected by AWS Organizations SCPs

  3. Ensure you have permission to delete resources in the region

Open Positions Remain

After deprovisioning, if you still have open positions:

  1. Log into your broker's platform directly (paper or live)

  2. Close positions manually through the broker interface

  3. Cancel any pending orders

  4. The Datafye deployment is independent of your broker positions


Last updated: 2025-10-22

Last updated