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 Requiredsoftware development
Offer to work on this project closes in 153 days!Submit A Proposal
Share this project with your friends