Listing & Inspecting
aws lambda list-functionsLists Lambda functions in the current region.
aws lambda get-function --function-name my-functionShows a function's configuration, code location, and current state.
aws lambda get-function-configuration --function-name my-functionShows just the configuration — memory, timeout, env vars, runtime — without the code download URL.
Invoking
aws lambda invoke --function-name my-function --payload '{"key":"value"}' response.jsonInvokes a function synchronously with a JSON payload, writing its response to a local file.
aws lambda invoke --function-name my-function --invocation-type Event response.jsonInvokes asynchronously — returns immediately with a 202, without waiting for the function to finish.
cat response.jsonViews the invocation result saved by a previous invoke command.
Deploying Code
zip -r function.zip .Packages a function's code and dependencies into the zip format Lambda expects.
aws lambda update-function-code --function-name my-function --zip-file fileb://function.zipDeploys new code to an existing function without changing its configuration.
aws lambda update-function-configuration --function-name my-function --timeout 30 --memory-size 512Updates a function's timeout or memory allocation without touching its code.
aws lambda publish-version --function-name my-functionPublishes an immutable, numbered version of the function's current code and config — the basis for safely pointing an alias at a specific known-good version.
Environment Variables
aws lambda update-function-configuration --function-name my-function --environment "Variables={LOG_LEVEL=debug}"Sets environment variables available to the function at runtime.
Don't put secrets directly in environment variables
Lambda environment variables are visible to anyone with read access to the function's configuration. For actual secrets, store them in Secrets Manager or Parameter Store and fetch them at cold start instead.
Logs
aws logs tail /aws/lambda/my-function --followStreams a function's CloudWatch Logs live — the fastest way to watch invocations as they happen.
aws logs tail /aws/lambda/my-function --since 1hShows logs from the last hour without streaming.
See AWS Lambda Handler Error for a step-by-step debugging sequence.