Serverless functions remove the need to run a server process for every small unit of work. They do not remove architecture. AWS Lambda’s execution-environment documentation is a concrete reference for the traps that show up in design reviews.
Cold starts are a lifecycle, not a myth
Lambda runs a function inside an execution environment. For on-demand functions, initialization can happen when a new environment is needed. AWS documents an init phase, separate from invocation, and documents provisioned concurrency and SnapStart as ways to prepare environments ahead of traffic. SnapStart runs init when a version is published and restores a snapshot later. Provisioned concurrency initializes environments when it is configured and keeps initialized environments available. Those are specific controls with cost and behavioral tradeoffs. They are not a promise that latency disappears. AWS also notes that on-demand environments are sometimes initialized early, and that applications should not depend on that behavior. Lambda execution environment
Other limits that change the design
The same documentation says Lambda execution environments run invocations for up to 15 minutes by default. A workflow that needs to stay open longer is a different product choice, including the durable-function option AWS describes, or a service that is allowed to run continuously. Packaging a long data job or a model-training run as a short function fights the platform.
Shared fate is the other trap. The runtime, extensions, permissions, and environment variables share the execution environment. A secret in the environment is available to the function and its extensions. Least privilege still applies. A function that can reach every internal API because that was convenient will be the path an attacker uses if the function is compromised.
Portability
Vendor lock-in is real when business logic, queues, and authorization are written only in one provider’s event shape. The mitigation is boring: keep domain logic in testable code, and treat the function handler as an adapter. It is not a requirement to avoid Lambda. It is a requirement to know which behavior is yours and which behavior is the platform’s.
Kubernetes is the alternative when the team needs long-running processes, custom scheduling, or GPUs requested as cluster resources. It is not automatically cheaper or simpler. The overview of what Kubernetes will and will not do is the right comparison, not a slogan about “containers versus serverless.” Operators and GPU scheduling covers the cluster side.
