Git Product home page Git Product logo

ec2c's Introduction

What is EC2C                         alt text

Pronounced "Easy to see" EC2C stands for EC2 Copy : Copy/migrate EC2 instances from one AWS account to another AWS account from the comfort of a commnad line.

Problem

Migrating EC2 instances from one AWS account to another is a disjointed process that involves creating an AMI , waiting for it to be available and then changing permissions on it so that AMIs are available in the target account. This becomes tedious when there are multiple EC2 instances that needs to be migrated. Automation of this task involves wrapping AWS CLI commands with right flags into a bash or powershell script. Terraform can perform these tasks in a semi disjointed way but it involves state managemnent of entire infrastructure and the blast radius is quiet high for any misconfigurations. EC2C is laser focused zero dependency CLI tool to migrate EC2 instances in a fool proof way.

What can EC2C do

  1. Shows you a list of EC2 instances from the AWS account and chosen Region as per AWS credentials
  2. Creates Amaxzon Machine Images for chosen EC2 instances.
  3. Waits untill the images are in "available" status. Time taken depends on time taken for a snapshot to be created. Depends on the size of disk. For timeliness timeout occurs after 40 minutes.
  4. Asks for target AWS account number. Thsi is the AWS account where you would want the EC2 instances to be migrated.
  5. Changes permissions on newly created images. Adds the target account as a shared account for the image.

Prerequisites

  1. AWS credentials from source account with appropriate persmissions to create an AMI
  2. Target AWS account number

How to get it

Chose the right artifact for your CPU architecture and OS type from https://github.com/bit-cloner/ec2c/releases

wget https://github.com/bit-cloner/ec2c/releases/download/0.9.1/ec2c-0.9.1-linux-amd64.tar.gz
tar -xvzf ec2c-0.9.1-linux-amd64.tar.gz

How to use it

chmod +x ./ec2c
./ec2c

Future improvements

  1. Have an import mode so that the same CLI can be used to launch EC2s from shared AMI images
  2. Handle KMS keys and permissions propogation to target account
  3. Another Other features/ bugs , please file an issue
  4. Code optimization to take advantage of go routines and functions

Support:

welldone



Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.