Shell script to redeploy existing ec2 instance




Jian Chen Australia


OpenApr 25, 2018
Hello -

Looking for a someone who can do the following in shell scripting(Bash). We are in process of moving our EC2 instance that are running in dedicated tenancy to default tenancy. We need to create and image and launch new instance but make sure to keep the same IP address and the MAC address of the network interface card.

Assume that the API Key or the EC2 instance role has full admin privileges.

Need shell functions that do below(which can be called at a later point)

1) Take input for instance-id then gather all the tags (we usually have name, cust, role), gather the security-groups attached to that instance, ENI-id(network interface ID), VPC-id, subnet-id, IP address

2) For the Network interface ID of instance-id passed, change the termination behavior so 'Delete on termination is UNCHECK' (if we check from console)

3) Shutdown the instance, make sure its in stopped state

4) Create an image of above instance, make sure image creation is in success state

5) terminate the above instance, make sure its in terminated state. Make sure the Network Interface ID still exist. If this does not exit script... THIS SHOULD EXIST AS WE MADE SURE 'DELETE ON TERMINATION' IS UNCHECKED

6) launch new instance from image created in step# 4 with all parameters gathers in step#1. One thing to note here is, we need to make sure TO attach the Network interface ID that we kept from deleting.

We need to make sure to have good error checking for each function as well as good loggin....

Skills & Expertise Required

software development 

Offer to work on this project closes in 94 days!

Submit A Proposal

Share this project with your friends

Similar Projects

Wordpress Developer Needed

I am looking to build an ecommerce site where users can sign up and sell there own products. I have template already on wordpress and i am looking for help to set up the pages correctly and improve more

Fixed, $250.00

Explain Google Cloud to me

I have a Google Cloud Account as the backend for an app and would like someone to give me a lesson on Skype (using screen sharing etc) on how it works.

Hourly, $10.00

Looking for Kolox panel script expe...

I have vultur vps with centos 7, already installed the kolxo script but i need to do the some basic configuration like DNS template, resource, clients, PHPini, configuration, and other mod more

Hourly, $10.00

eLearning Developer - instructional...

I need to hire an instructional designer who can develop 1-2 eLearning modules.
Each module duration is 6-8 minutes and materials will be provided

The 1-2 modules will be used as more

Hourly, $16.00

Developer needed for creating an An...

I'm looking for someone who can develop an android app like Snap Chat but this app should have only 1 feature of Snap Chat which is FaceSwap

Fixed, $300.00

Here are our top professional picks for you to hire

AV System Programmer
software development Embedded Systems 
$34 /hr
Sr Data Engineering Analyst | Big Data Engineer
Java Hadoop Hive 
$9 /hr
Embedded Software / Automotive / IoT
Embedded C Embedded Linux Embedded Systems 
$15 /hr
Software Developer
Golang mysql Microservices 
$20 /hr
Accounting Excel Excel VBA 
Software Engineer
software development Google Spreadsheets API 
$45 /hr
United States
software development Spring Framework Wordpress 
Web Developer
Website Development Web Search Microsoft SQL Server 
$3 /hr
CEO - Expedite Informatics Pvt Ltd
software development Software Testing Mobile App Development 
$25 /hr
To view more profile join Toogit

Get Started