AWS subnets for lambda synchronous invocations

DevOps Asked on August 22, 2021

Am I right in thinking giving a lambda using an API gateway 3 subnets each with a range of 16 would result in 2 subnets being used at once and 1 IP used for the API gateway that is in the same subnets resulting in a max of 31 invocations before the error code 429 is returned due to Too Many Requests.
This is my thinking as there should be no other resources using an ip address that will be in these subnets but I can see testing it as being complicated and taking a very significant amount of time with my current knowledge.

One Answer

I don't entirely understand your use-case, but it sounds like you are trying to limit the number of Lambda invocations by restricting its IP range.

There are two better ways to rate limit your application. Option one would be to use API Gateway request throttling:

Option two, Lambdas have a concurrency limit that can be set to achieve a similar behaviour to your approach:

Hope that helps with your design!

Answered by Woodland Hunter on August 22, 2021

Add your own answers!

Related Questions

Terraform foreach multiple map variables

1  Asked on January 16, 2021 by stravze


How to fetch PublishedPort from inspect

0  Asked on January 11, 2021 by executable


How to backup Amazon Cognito?

3  Asked on January 8, 2021 by richard-slater


Dedicated/Separate Git Repo as Terraform Remote Backend

1  Asked on October 10, 2020 by haneef-ibn-ahmad


Graylog – docker swarm fields

0  Asked on September 29, 2020 by wer-bn


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP