# Rebuilding Spot Instances

## Cancelling existing spot requests

1. Login to aws console
2. Top menu: Services -> EC2
3. Left sidebar: Spot Requests
4. Select all the spot requests you want to cancel.
5. Click the cancel button on the top
6. Cancelling the spot request does not terminate the instances that are currently running.That is the next step.

## Killing spot instances

1. Login to aws console
2. Top menu: Services -> EC2
3. Left sidebar: Instances -> Instances
4. Sort by name
5. Those without a name are Spot instances
6. Select them all and terminate

## Creating new spot request

### Navigation to spot requests wizzard

1. Login to aws console
2. Top menu: Services -> EC2
3. Left sidebar: Instances -> Spot Requests
4. Blue button: Request Spot Instances

### Spot requests Wizzard

1. Step 1: Choose an Amazon Machine Image (AMI)
   1. click: my amis
   2. search for audenti\_spot\_worker\_ami OR search by ami id if you know it
   3. pick the one with latest timestamo
2. Step 2: Choose an Instance Type
   1. pick: c3.xlarge OR c4.xlarge
3. Step 3: Configure Instance Details
   1.  Input: number of instances desired -

       _upper limited by other resource usage(more usage higher limit) and per instance_

       type availability
   2. Input: Maximum Price
   3. Check: Persistent request
   4. Select: Network - audienti\_vpc
   5. Select: Subnet - audienti\_worker\_...
4. Step 4: Add Storage
   1. Leave as is
5. Step 5: Tag Spot Request
   1. Leave as is or tag as desired, example: 10 c3.xlarge at 0.5
6. Step 6: Configure Security Group
   1. Click: Select an existing security group
   2. Click: audienti\_workers\_securitygroup
7. Step 7: Review Spot Instance Request
   1. Click: Lunch
   2. Select: Choose an existing key pair
   3. Select: audienti\_aws\_servers\_useast1
   4. Click: I acknowledge ...
   5. Click: Request Spot Instances
