Dockfield documentation · AWS

AWS V1 Operator Guide

Operator-facing guidance for preparing, exporting, assessing and recovering AWS infrastructure with Dockfield. This guide describes supported user workflows and prerequisites; it does not document internal implementation.

Release status: V1 is an evolving, AWS-only release candidate. Review the current scope and recovery coverage before relying on it for production recovery. A successful CLI run is not a production certification.

Overview

Dockfield V1 is focused on AWS. It can inspect a configured Primary environment, produce an infrastructure snapshot and recovery plan, report coverage and readiness, and provide an operator-controlled recovery workflow toward a configured Secondary environment.

Begin with the existing AWS V1 Scope and Recovery Strategies pages. Confirm each required resource and dependency is covered for your environment before proceeding.

The reverse-engineering export is an inventory and Terraform representation. It is not, by itself, a validated DR bundle or approval to apply infrastructure changes.

Prerequisites

  • A supported Linux or macOS operator environment with Python 3.11 or later.
  • AWS CLI v2 configured with a named source profile or an approved role-based identity. Use temporary credentials or IAM Identity Center where available.
  • For export, read-only access to the Primary account and network access to the required AWS APIs and HashiCorp provider registry.
  • For recovery planning and recovery, separately configured identities for source and destination accounts, with only the permissions required by the selected resource scope.
  • Terraform 1.14 or later and below 2.0 for the reverse-engineering output validation workflow.
  • A clean, access-controlled output directory with sufficient disk space. Treat exports and evidence as sensitive because they can contain resource identifiers and configuration details.
  • For cross-account recovery, both accounts and Regions must be reachable, required resource materials and quotas must be available, and destination prerequisites must be prepared.
Do not commit local account configuration, exported state, credentials, tokens or customer infrastructure reports to source control.

Installation profiles: Normal, Medium and Max

These names describe the customer's failure scope. They are operating profiles, not current CLI flags; the V1 CLI does not accept --profile normal|medium|max.

ProfileFailure scopeV1 status
NormalPrimary is the candidate failure domain. Recovery is toward Secondary.Closest to the current one-way Primary-to-Secondary workflow. Validate the exact resource set and readiness; V1 is not production-certified.
MediumEither Primary or Secondary may be the failed environment.Bidirectional recovery is not established by the current V1 CLI workflow. Treat the reverse direction as unqualified until independently tested and released.
MaxPrimary, Secondary and the AWS Organization are considered possible failure domains.Not a supported V1 installation profile. Organization and Control Tower recovery are outside current V1 scope.

Choose the intended failure scope before installation. Use independent, protected credentials and a trusted recovery destination for each direction you intend to operate.

Installation

Case 1: Normal

Use for a Primary-to-Secondary recovery design, with Primary as the candidate failure domain. Install the V1 package in an isolated virtual environment:

cd v1
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install -e .
cp config/accounts.example.json config/accounts.local.json

Complete the local account configuration using your approved source and destination identity method. Keep that file private. Verify the AWS identity before any discovery:

aws sts get-caller-identity --profile source-readonly
aws sts get-caller-identity --profile recovery-operator

Case 2: Medium

Install the same package and configure both directions only for assessment. The current V1 workflow does not certify reciprocal recovery. Do not infer that the first direction's successful planning means the reverse direction is safe.

Case 3: Max

Do not deploy this as an Organization-wide recovery mode in V1. Organization and Control Tower recovery are excluded from the current V1 scope. Wait for a release that explicitly supports and qualifies this scope.

After installation, use the CLI's available commands to inspect its current interface:

dockfield --help

Reverse engineering (export) from Primary (PROD)

Run the exporter from a controlled workstation or runner using a read-only source identity. Substitute your profile, account, Region and a new output path. The destination directory must not already contain files.

cd Presales
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
aws sts get-caller-identity --profile source-readonly
RUN="output/primary-YYYYMMDD-HHMM"
TMPDIR=/tmp python reverse_engineering.py   --source-profile source-readonly   --source-account <primary-account-id>   --regions <aws-region>   --workers 2   --output "$RUN"

Use an explicit Region list for the environment being inventoried. Keep concurrency conservative and follow AWS API throttling. Review the generated coverage and validation reports; an export can finish while still reporting unsupported or incomplete resources. Exit status 2 can indicate a completed export with coverage gaps.

This export command performs discovery and writes local output; it does not apply Terraform or mutate AWS. Protect the output as sensitive data and do not use it as a recovery plan without the separate planning, review and recovery steps.

ARD (optional): how to enable it

ARD is optional. The current V1 CLI does not expose an ARD enablement command or a supported feature flag. Do not add guessed configuration keys or CLI switches.

Until an ARD-enabled release documents its prerequisites and commands, use the existing ARD product page for capability context and treat enablement as unavailable in this V1 operator workflow. Before enabling it in a later release, confirm its supported inputs, permissions, data handling, outputs and operational cost in that release's documentation.

Security scanning

Use the previously scoped open-source security scanning stack. Pin tool versions in your controlled environment and review each tool's license and upstream maintenance status before commercial redistribution.

ToolOperator useExample CLI
TFLint + AWS rulesLint Terraform and apply AWS-specific rules.tflint --init && tflint --recursive
OPA / ConftestEvaluate approved policy rules against Terraform plan JSON.terraform show -json plan.tfplan > plan.json
conftest test plan.json --policy policy/
GitleaksCheck a working tree for accidentally committed secrets.gitleaks dir .
Semgrep CERun static analysis rules against source files.semgrep scan --config auto .
Google OSV-ScannerCheck supported dependency manifests and lockfiles for known vulnerabilities.osv-scanner scan source -r .
GrypeScan a built image, filesystem or SBOM for known vulnerabilities.grype dir:.
Dockfield Security EngineDockfield's security assessment layer; follow the command and scope documented by the specific released build.Use only the documented command shipped with that release.

Run the checks in CI or an isolated review environment. Save machine-readable reports with the release evidence, set severity thresholds in policy, and investigate findings before approving a plan or image.

V1 integration note: the current bundled artifact-trust command invokes Checkov and Trivy. Those tools are excluded by the agreed scanner policy, so this command must not be presented as the approved Dockfield scanning workflow until the bundle is changed. The commands above describe the agreed standalone toolchain; they do not claim that V1 currently orchestrates every tool.

Excluded from the agreed stack: Trivy/tfsec, KICS, Checkov and Terrascan.

Recovery to Secondary (DR)

Start with a fresh discovery snapshot, create a recovery plan, inspect coverage, run preflight, then review the complete plan and its hash before any recovery action.

dockfield fidelity-discover   --config config/accounts.local.json   --output out/primary-fidelity.json

dockfield fidelity-plan   --config config/accounts.local.json   --snapshot out/primary-fidelity.json   --target dr-1   --region <recovery-region>   --output out/dr-1-fidelity-plan.json

dockfield fidelity-coverage   --plan out/dr-1-fidelity-plan.json   --output out/dr-1-fidelity-coverage.json

dockfield fidelity-preflight   --config config/accounts.local.json   --plan out/dr-1-fidelity-plan.json   --output out/preflight.json

Review the plan, coverage and preflight evidence with the service owners. Resolve unsupported resources, missing materials, unresolved references, destination limits and data readiness gaps before considering execution.

The recovery command makes AWS changes. Run it only after the exact plan has been reviewed, the destination is confirmed, change approval is in place and the displayed plan hash has been independently checked.
dockfield fidelity-recover   --config config/accounts.local.json   --plan out/dr-1-fidelity-plan.json   --approve-plan-hash <reviewed-plan-hash>   --journal out/dr-1-fidelity-journal.json

dockfield fidelity-coverage   --plan out/dr-1-fidelity-plan.json   --journal out/dr-1-fidelity-journal.json   --output out/dr-1-fidelity-coverage.json

Recovery does not automatically promote application traffic. Validate workloads and data with the responsible service teams, then perform traffic changes through your separately approved operational procedure.

ARC manual failover

AWS Application Recovery Controller (ARC) routing controls are not operated by the current Dockfield V1 recovery command, and ARC is outside the current V1 managed scope. This is a separate AWS operator procedure for applications whose ARC cluster, routing controls, health checks, DNS records and safety rules have already been configured and tested.

How routing-control health checks work

Create one routing control for each application cell or endpoint you want to include in traffic routing, for example Primary and Secondary. In the ARC console, open each routing control and create its associated routing-control health check. Then configure Route 53 DNS records for the application name and associate each record with the matching health-check ID: the Primary record points to the Primary endpoint and uses the Primary control's health check; the Secondary failover record points to the Secondary endpoint and uses the Secondary control's health check.

The ARC routing-control health check is not a probe of the application's live health. ARC changes the health-check state when an operator changes the routing control from On to Off or vice versa. Your application monitoring and readiness checks must independently confirm that the destination is healthy and ready to receive traffic. Configure and test the DNS failover policy, TTL behavior, routing-control safety rules and failback before an incident.

Desired traffic destinationPrimary controlSecondary control
Primary is servingOnOff
Secondary is serving after failoverOffOn

Prerequisites

  • ARC cluster, control panel, Primary and Secondary routing controls, and their health checks already exist.
  • Route 53 records for both endpoints are associated with the correct health checks and failover policy.
  • Destination readiness is confirmed outside ARC, including application, data and capacity checks.
  • Operator has permission to list and update the controls and has recorded the cluster's regional endpoint URL and its AWS Region.
  • Safety rules and an approved incident/change record are in place. Keep a tested failback procedure.

Inspect controls and current state

Use a regional ARC cluster endpoint. Set ARC_ENDPOINT_URL to one of the five endpoint URLs for this cluster and ARC_ENDPOINT_REGION to that endpoint's Region. Replace the ARNs and profile with the values for your environment.

aws route53-recovery-cluster list-routing-controls   --control-panel-arn <control-panel-arn>   --region "$ARC_ENDPOINT_REGION"   --endpoint-url "$ARC_ENDPOINT_URL"   --profile <arc-operator-profile>

aws route53-recovery-cluster get-routing-control-state   --routing-control-arn <primary-routing-control-arn>   --region "$ARC_ENDPOINT_REGION"   --endpoint-url "$ARC_ENDPOINT_URL"   --profile <arc-operator-profile>

aws route53-recovery-cluster get-routing-control-state   --routing-control-arn <secondary-routing-control-arn>   --region "$ARC_ENDPOINT_REGION"   --endpoint-url "$ARC_ENDPOINT_URL"   --profile <arc-operator-profile>

Fail over traffic from Primary to Secondary

After confirming Secondary readiness and getting the required approval, change the two control states together in one batch: Primary Off, Secondary On. This updates the associated ARC health checks, allowing the configured Route 53 failover records to direct new DNS resolution toward Secondary. The command returns no useful response body; verify both routing-control states afterward and independently check DNS resolution and application health.

aws route53-recovery-cluster update-routing-control-states   --update-routing-control-state-entries '[{"RoutingControlArn":"<primary-routing-control-arn>","RoutingControlState":"Off"},{"RoutingControlArn":"<secondary-routing-control-arn>","RoutingControlState":"On"}]'   --region "$ARC_ENDPOINT_REGION"   --endpoint-url "$ARC_ENDPOINT_URL"   --profile <arc-operator-profile>

Fail back to Primary

Only after Primary is restored, tested and approved as the destination, reverse the pair in one batch: Primary On, Secondary Off. Then verify both states, DNS and application behavior.

aws route53-recovery-cluster update-routing-control-states   --update-routing-control-state-entries '[{"RoutingControlArn":"<primary-routing-control-arn>","RoutingControlState":"On"},{"RoutingControlArn":"<secondary-routing-control-arn>","RoutingControlState":"Off"}]'   --region "$ARC_ENDPOINT_REGION"   --endpoint-url "$ARC_ENDPOINT_URL"   --profile <arc-operator-profile>
Do not force an override of ARC safety rules as a routine step. If a safety rule blocks the change, stop and investigate the rule and current states. AWS supports explicit safety-rule overrides for break-glass situations, which require separate authorization and careful review. ARC changes traffic routing; it does not replicate data, restore workloads or prove that the selected account is healthy.

Support boundaries and related pages

  • AWS V1 Scope: current resource-family coverage.
  • Recovery Strategies: recovery strategy overview.
  • ARD: product capability context; no V1 CLI enablement path is currently documented.

Always check the release notes and the exact package version before using commands in a production change window. Command availability and supported resource coverage can change between releases.