Create an IAM execution role, write a minimal Python handler, zip and deploy it with aws lambda create-function, invoke synchronously, and clean up — all from the CLI.
Lambda runs your code in response to events — no server to provision, patch, or manage. Before deploying your first function, confirm you have the local tools you need: the AWS CLI, Python 3, and the zip command.
aws lambda list-functions --query 'Functions[*].FunctionName' --output tablepython3 --versionzip --version | head -1Lambda functions are designed for stateless processing: each invocation runs in its own function call scope, and AWS discards all in-memory state when the execution environment is recycled.
AWS may reuse an execution environment across invocations (warm starts), so module-level code outside the handler can persist between warm calls — but your handler must never rely on that persistence for correctness.
AWS manages capacity and scaling automatically; you pay only for the time your code actually runs, billed in 1 ms increments.
The first command lists any existing functions in your account (an empty table is fine).
The Python and zip checks confirm your local tools are ready for the packaging step.
The function list is empty or shows any functions you already have — either is correct.
python3 --version prints: Python 3.x.x (any 3.x version is fine).
zip --version prints a version information line.