DEV Community

GargeeBhatnagar for AWS Community Builders

Posted on

Cross Region Transfer of Data from EFS to EFS Using AWS DataSync

“ I have checked the documents of AWS to transfer the data between an elastic file system in cross-region. AWS Datasync service makes easy and secure transfer of data from efs to efs. In terms of cost, the solution is cheaper and secure.”

AWS DataSync is an online data movement and discovery service that simplifies data migration and helps you quickly, securely and easily transfer your file or object data to, from and between AWS storage services.

In this post, you will experience the cross region transfer of data from efs to efs using aws datasync. Here I have created a vpc, efs, ec2 and datasync across regions.

Prerequisites

You’ll need an Amazon Virtual Private Cloud for this post. Getting started with amazon VPC provides instructions on how to create a VPC. For this blog, I assume that I have a VPC created in both regions.

Architecture Overview

Image description
The architecture diagram shows the overall deployment architecture with data flow, two aws regions, vpc, efs, ec2 and aws datasync.

Solution overview

The blog post consists of the following phases:

  1. In N.Virginia, Create of VPC Peering Connection to Connect with Oregon Region VPC
  2. In N.Virginia and Oregon Region, Create of Amazon Elastic File System
  3. In N.Virginia and Oregon Region, Launch of EC2 for DataSync Agent Instance and Windows Activate Agent
  4. In Windows Activate Instance, Connect through RDP and Login to AWS Console in Oregon Region, Creation of VPC Endpoint and Creation of AWS DataSync Agent
  5. In the Oregon Region, Creation of Locations and Tasks in AWS DataSync. Also Transfer of Data from EFS of One Region to EFS of Another Region

In two aws regions of same account, I have a vpc created with subnets, route tables, internet gateway and nat gateway as below →

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 1: In N.Virginia, Create of VPC Peering Connection to Connect with Oregon Region VPC

  1. Open the console of VPC, choose peering connection to create a peering between two region vpc. Also accept peering connections in the Oregon region.

Image description

Image description

Image description

Image description

Image description

Image description

Phase 2: In N.Virginia and Oregon Region, Create of Amazon Elastic File System

  1. Open the ec2 console, Create a security group for both region efs with required rule permission. Also create an elastic file system in both regions.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 3: In N.Virginia and Oregon Region, Launch of EC2 for DataSync Agent Instance and Windows Activate Agent

  1. Open the ec2 console, Create a security group for both regions ec2 instances with required rule permission. Also launch of instances in both regions for datasync agent.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 4: In Windows Activate Instance, Connect through RDP and Login to AWS Console in Oregon Region, Creation of VPC Endpoint and Creation of AWS DataSync Agent

  1. Open the VPC console, create a vpc endpoint to access private connections. Also open the datasync service, create of aws datasync agent with activation key.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 5: In the Oregon Region, Creation of Locations and Tasks in AWS DataSync. Also Transfer of Data from EFS of One Region to EFS of Another Region

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Clean-up

In Both Regions: Delete of VPC, EC2, EFS, AWS DataSync.

Pricing

I review the pricing and estimated cost of this example.

Cost of Elastic Compute Cloud = $1.06

Cost of Elastic File System = $0.05

Cost of Virtual Private Cloud = $0.05

Cost of AWS DataSync (DataSync fee for data copied) $0.0125 per GB = $0.0

Total Cost = $1.16

Summary

In this post, I showed “how to cross region transfer of data from efs to efs using aws datasync”.

For more details on AWS DataSync, Checkout Get started AWS DataSync, open the AWS DataSync console. To learn more, read the AWS DataSync documentation.

Thanks for reading!

Connect with me: Linkedin
Image description

Top comments (0)