Follow AWS Lambda Logs on a CLI
How to pipe all of your Lambda output to a terminal for faster debugging.
AWSLambdaCloudWatchCLI

Logs are stored in Cloud Watch against individual resources. Each resource will have its own set of logs. To see the Lambda resources you can run:
bash
aws logs describe-log-groups --log-group-name-prefix "/aws/lambda/" --profile <your-profile-if-applicable>
This will give you some output like the following:
bash
"logGroups": [
{
"logGroupName": "/aws/lambda/SomeStackName-HelloHandler2E4FBA4D-9tI",
"creationTime": 1736804429554,
"metricFilterCount": 0,
"arn": "arn:aws:logs:eu-west-2:012839728923:log-group:/aws/lambda/SomeStackName-HelloHandler2E4FBA4D-9tI:*",
"storedBytes": 1504,
"logGroupClass": "STANDARD",
"logGroupArn": "arn:aws:logs:eu-west-2:012839728923:log-group:/aws/lambda/SomeStackName-HelloHandler2E4FBA4D-9tI"
},
...
]
Look at the logGroupName for the name of the function that you want to follow, then run this command:
bash
aws logs tail "/aws/lambda/<logGroupName>" --follow --profile <your-profile-if-applicable>
It’s also possible to find the function's name through the online interface if you’re struggling.