We decided to hide some EC2 instances in private subnets (VPC). Theyβre accessible via bastion hosts or via API (API Gateway & Lambda). Works well, but thereβs one weird issueβββcold lambda start time is over 10s sometimes. We experienced even 15s. This is not acceptable and Iβm seeking for answers to my questions.
Does increased memory size help? Is this huge cold start time VPC related? Is there a difference when we do use another language? Read More...
Itβs fragile and kind of terrible. Letβs look at it. We have a function named lambda. It has one argument named action (enum with allowed values data, exception or timeout). First thing we would like to do is to validate input via schema. Then we would like to return custom error message (and status code) if itβs invalid or do other things based on the action argument value.
Hereβs the code, just to demonstrate how it works. Read More...