Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudformation stack creation fails due to insufficient Elastic IPs #243

Closed
MikeTheCanuck opened this issue Jun 23, 2019 · 6 comments
Closed
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MikeTheCanuck
Copy link
Contributor

When creating a new stack based on our CloudFormation stack templates, I have repeatedly run into situations where the stack creation fails and rolls back, claiming some combination of failures to do with the VPC and its resources, e.g.:

Screen Shot 2019-06-23 at 11 25 13

@MikeTheCanuck MikeTheCanuck added the bug Something isn't working label Jun 23, 2019
@MikeTheCanuck
Copy link
Contributor Author

I've learned that this problem has a viable (if frustrating) explanation:

  • the resources that repeatedly CREATE_FAILED are Internet Gateway and VPC

When digging through the Stacks in CloudFormation, I finally noticed the Deleted filter (whose stacks are hidden from the default filter) and was able to find a single, repeated type of error from this morning's repeated failures:

Screen Shot 2019-06-23 at 12 16 49

@MikeTheCanuck
Copy link
Contributor Author

MikeTheCanuck commented Jun 23, 2019

Well, it appears that we're allocating "too many" Elastic IPs in our account/region:
hashicorp/terraform#6018 (comment)

And this will be a problem, since we've already got 4 of the 5 allowable addresses allocated:
Screen Shot 2019-06-23 at 12 37 41

This is where the limit is documented:
https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-eips

@MikeTheCanuck
Copy link
Contributor Author

MikeTheCanuck commented Jun 25, 2019

So for us to continue developing a test-vs-staging-vs-production infrastructure (plus all the one-off deploys from other teams), we're likely to need to request an increase in the Elastic IPs limit on our account - otherwise, only one test stack can be deployed at a time, making it very hard for multiple engineers to work simultaneously.

Requesting an increase to these limits has one somewhat-mystifying question we need to resolve:
https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=vpc

Are we currently rate-limited on "EC2-Classic Elastic IP Addresses" or "New VPC Elastic IP Addresses"?

@MikeTheCanuck MikeTheCanuck added the help wanted Extra attention is needed label Jun 25, 2019
@MikeTheCanuck MikeTheCanuck changed the title Cloudformation stack creation fails on VPC, InternetGateway resources Cloudformation stack creation fails due to insufficient Elastic IPs Jun 29, 2019
@MikeTheCanuck
Copy link
Contributor Author

Here's how to request an increase:
https://stackoverflow.com/questions/24275080/aws-eip-limit-increase

@DingoEatingFuzz
Copy link
Contributor

I just mentioned this in #239, but I'll say it here also.

I don't think we need separate VPCs in order to have isolated test/staging/production environments.

Budget aside, as long as we have separate ECS clusters and ALBs, then we have isolation.

Including budgets, it's important to be aware that a single NAT gateway costs ~$30/mo.

@danieldn
Copy link

Will merge this with #239

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants