Search code examples
amazon-web-servicesaws-lambdaamazon-rdsaws-vpcchalice

Error "Client.NetworkInterfaceLimitExceeded" in AWS Lambda API Calls


Background:

I have 2 web services implemented through Chalice framework on AWS lambda. Both framework points to the same RDS (MySQL) database backend.

Problem:

User can't login to apps these two days in the afternoon for a few hours. (Those who has login will be logout).

Each API call creates a "CreateNetworkInterface" event in CloudTrail. Many API calls ended up with Error code "Client.NetworkInterfaceLimitExceeded". How can I increase the limit?

Clue In "5 Things you should know before using Lambda" by Sergej Jakovljev, he mentioned about limitation in Using Amazon RDS with Lambda (point 2). I use VPN of 4 subnets (2 public & 2 private). The RDS is in the 2 subnets. What are the specific steps to increase ENI points?

Any help would be greatly appreciated. Thanks!


Solution

  • 350 is the documented default limit for elastic network interfaces. You will need to submit a request to increase the limit.

    Network interfaces per region 350

    This limit is the greater of either the default limit (350) or your On-Demand Instance limit multiplied by 5. The default limit for On-Demand Instances is 20. If your On-Demand Instance limit is below 70, the default limit of 350 applies. To increase this limit, submit a request or increase your On-Demand Instance limit.

    https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_vpc