https://goblinfish-code.blogspot.com/2025/06/local-aws-api-gateway-development-with_01470362335.html
While trudging through my day-to-day activities, I had an inspiration about how to implement local #API access for #AWS #APIGateway code using #Python #LambdaFunctions for back-end logic, by overriding #FastAPI and #Flask #decorators.
https://goblinfish-code.blogspot.com/2025/06/local-aws-api-gateway-development-with.html
Anyway, as I continue down this path, what this means is "if I'm going to execute Lambdas", the correct response is to optimize around execution speed and concurrence, while reducing memory footprints as much as possible.
Except, because of how the local Lambda runtime works, the default memory assigned to the container is going to be far in excess of the running Lambda in AWS.
So, if you're going to properly emulate the running Lambda, the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE
for the container has to be set to the lowest amount of RAM the function can use, and the function needs to be as efficient as it can be about memory usage, and run concurrently as possible.
TLDR; write efficient code, use stuff that doesn't need a bunch of RAM.
Why do I feel like Lambda functions are like the new shiny versions of CGI scripts from the 1990s?