I'm working with CDK/CloudFormation and recently started getting this error when attempting to create a new stack:
The maximum number of addresses has been reached.
Looking in the AWS Management Console, there is a limit of 40 VPC IP addresses and there are exactly 40 in the list - but some of these have neither an Associated Instance ID nor an Association ID set:
My understanding is the ones that have neither of these set aren't being used for anything so would like to make them usable to get past the error on stack creation. But unsure how to do this - would "Release Elastic IP address" do the trick or do they need to remain in the account but be marked as reusable in some other way?
CodePudding user response:
The maximum number of addresses has been reached.
You get this error because you do associate public IP addresses to your instances. As you may know, the number of public IPv4 ip addresses is limited. This means that AWS, by default, allows you to allocate at most 5 Elastic IPs per region. This is a soft limit, you can ask for an increase. There are ways around having to attach public IP addresses to everything, so it is not really recommended to ask for an increase.
But unsure how to do this - would "Release Elastic IP address" do the trick or do they need to remain in the account but be marked as reusable in some other way?
First you have to dissociate the IP address from the instance. Afterwards, you will be able to press Release Elastic IP address
. So yes, that would do the trick.