After getting in touch with AWS support and getting the usual limit of 5 EIPs increased. We were ready to allocate some addresses. Now I took a look in the console and the CLI and couldn't see an obvious way to recover an address. Let's take a look at the original article. There it is. 'Customers can recover their EIPs via CLI by using the allocate-address command and specifying the IP address using the -address parameter.'

Right now it's a CLI(API) only option and you need the -address option. Let's see if I can see that with auto-completion:

1

2

3

4

5

Doesn't look like it. On my Mac I use brew to manage many of my tools so a quick brew upgrade awscli later:

1

2

3

4

5

That looks better.

Just for fun, lets find the commit for this.

For anyone who is familiar with the CLI, it is build using python and so relies on boto and specifically botocore.

There are a few other things going on in this commit, but if you look through you can see changes to AllocateAddress sections, and specifically the addition of:

1

2

3

4

5

6

7

8

So with all the tools at hand; lets allocate our 21 addresses:

1

This was completed around 1700 on 28 August 2017.

As per set out in our method, we will now wait about (I'm only being semi-scientific here) one day.

Getting a listing of all our IP address can be achieved with AWS CLI and JQ. JQ is a neat tool that helps you manipulate JSON.

1

I'm doing this, as this account has some test hosts with EIP associations already, and I don't want to disturb those people.

Our 24 hours is up.

Let's release all our addresses:

1

2

3

4

Now we need to wait one hour and try and recover our first IPs.

One Hour

An hour has past, so let's try and recover our first 3 address.

We now need to add the -address option on to the allocate-address sub-command:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

Wow, look at that. All 3 were able to be rescued. Looks like we are off to a good start.
Now let's release these 3, and try again in 12 hours.

12 Hours

Now we are about 12 hours after we rescued our first 3 addresses. Let's try those original 3 plus the next 3 and see how we go.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

Oh no! All IP addresses are now unable to be rescued.

In another 12 hours we'll try again.

24 Hours

Well here we are at hour 24 (or there about). Let's try and recovery our original 1 hour, 12 hour and the 24 hour IP addresses.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

Oh no! Again we are unable to recover any IP addresses. While it's too early to draw any conclusions, I think the advice given in the AWS blog post is very true: 'The sooner customers try to recover their EIPs, the better are the chances of recovering them.'

We won't stop though. Let's keep going and see how we get on with our 48 hour addresses.

48 Hours

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

Oh well, I think you pretty much have to catch those IP addresses really quickly.

Raw data

Part 2 of our Testing the new EIP Recovery technical series.

Bulletproof Group Limited published this content on 01 September 2017 and is solely responsible for the information contained herein.
Distributed by Public, unedited and unaltered, on 04 September 2017 00:07:03 UTC.

Original documenthttps://www.bulletproof.net.au/one-week-likely-recover-released-eips/

Public permalinkhttp://www.publicnow.com/view/1D317DA4768C30A9AA8770230F29595AAF50E35F