How Do I Change the EC2 Instance for My Hybrid Deployment Agent?
Question
I'm migrating to a new AWS account and my current EC2 instances running the Fivetran Hybrid Deployment (HD) agents are on the old account. What steps should I take to change the EC2 instance, ensuring everything works correctly?
Environment
Installation environment: AWS EC2 Container: Docker, Kubernetes and Podman
Answer
To migrate your Fivetran HD agent to a new EC2 instance, follow these steps:
- Ensure all syncs have completed running on the EC2 instance.
- Stop and remove the container on the old EC2 instance before proceeding, as running two instances with the same agent token can cause conflicts.
- Create a new EC2 instance in your new AWS account and ensure it meets the requirements outlined in the Prerequisites for the container set up.
- Before installing the agent on the new EC2 instance, copy the entire
$HOME/fivetran/datadirectory from your old instance to the new one. This directory contains pricing sample data indata/_samplesthat you must preserve. Usescp,rsync, or S3 to transfer the full directory structure. For more information, see Is It Safe to Delete Files From the data/_samples Directory?. - On the new EC2 instance, use the same token from the existing agent to run the installation command so that Fivetran recognizes the agent correctly.
- Confirm that the agent shows as Online in your Fivetran dashboard under Account Settings > Hybrid Deployment Agents.
- Verify that the
$HOME/fivetran/data/_samplesdirectory is present on the new instance. - Ensure your network and IAM roles are configured correctly:
- Ensure outbound access to Fivetran service endpoints on port 443.
- If your connectors use an IAM role for authentication, recreate and attach this role to your new EC2 instance. For more information, see How to Use an IAM Role Assigned to an EC2 Instance in AWS With Hybrid Deployment.
- Once your new instance is online and syncing properly, shut down the old EC2 instance.
The $HOME/fivetran/data directory contains both temporary in-flight processing files and persistent pricing sample data. Fivetran tracks sync state in the cloud, but you must migrate the data/_samples subdirectory to avoid billing impact and SAMPLE_NOT_FOUND errors. Do not delete or skip transferring this directory during migration.