- Go to the lambda function
- Click on Monitoring Tab
-
Find the most recent log where the function ran without errors.
-
Record the timestamp
-
Go to the S3 buckets where SAM packages are uploaded. This is the bucket you mention when using the following command
sam package --template-file contact.yaml --s3-bucket lambda-code-sam --output-template-file output.yaml
-
Download the file
-
Unzip and find the proper function code. Fix your app.