Everything about Lambda function

Nadtakan Futhoem
2 min readJun 28, 2021
  1. An event source is a service that can be used to trigger the lambda function. If the invocation was asynchronous then lambda would automatically retry the event a future 2 more times.
  2. If you have a DLQ resource configured for your function, the event payload will be sent to DLQ. But if you don’t have DLQ configured, then the payload and event would just simply be deleted.
  3. You must attach your function to a private subnet that has access to a NAT instance or Gateway to reduce exposure to external threats. Don’t attach it to a public subnet, otherwise, it will become public and can get access easily via the internet.
  4. Be aware of your limits on your selected subnets, as functions will fail if those subnets run out of IP addresses or ENIs.
  5. The execution role of your lambda will need to have specific permission that allows it to operate within a VPC. These including allow lambda to create ENIs.
  6. Concurrency can be increased but bear in mind that having a limit can be a beneficial control to have in place as this will stop your costs from spiraling out of control if you allow it to continually scale.
  7. There are 2 limits for the concurrent executions of functions; account level and function level.
  8. Account-level limit is an unreserved account concurrency set to 1000 in the same region. Functions share a connection pool of 1000 connections.
  9. Function-level limit is a reserved concurrency, essentially reserved a pool from the unreserved account concurrency. so the reserved amount is then deducted from the unreserved limit.
  10. Reserved concurrency ensures that your function will continue to run even if another function has a surge of requests
  11. You might want to limit the number of times the function can run, as you may have a limitation on your downstream resources. that the function may call upon just because your function can scale rapidly that doesn’t mean the rest of your infrastructure can.
  12. Throttle will set your reserved concurrency to zero until you manually change the concurrency setting again. You can change it back using the pool of unreserved concurrency limit by setting a manual throttle limit greater than zero.
Nadtakan Futhoem — Sr. Software Engineer

--

--