deprovision

This guide shows you how to completely remove a Datafye Foundry deployment from AWS.

Prerequisites

Before you begin, ensure:

  • You have previously provisioned an AWS Foundry deployment

  • AWS credentials are configured (see AWS Setup)

Deprovision Command

Use the following command to deprovision your AWS Foundry deployment:

datafye foundry 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 foundry aws deprovision to see the complete parameter list and usage.

Example

Deprovision a Foundry deployment named my-dev-foundry:

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. Stop services - Gracefully stop all Datafye services

  4. Terminate EC2 instances - Delete all virtual machines

  5. Delete EBS volumes - Remove all data storage volumes

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

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

  8. Clean up metadata - Remove deployment tracking information

  9. Display status - Confirm successful deprovisioning

After Deprovisioning

Once deprovisioning completes:

  • All AWS resources for the deployment are permanently deleted

  • All data and configuration are gone

  • You stop incurring all charges related to this deployment

  • The deployment name becomes available for reuse

To create a new deployment: Run datafye foundry 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 or testing phase is complete

  • Troubleshooting - Resolving persistent infrastructure issues

  • Changing regions - Moving to a different AWS region

Cost note: If you want to temporarily stop using a deployment but may need it later, consider using datafye foundry 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 foundry 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


Last updated: 2025-10-22

Last updated