If I use aws lambda on the cloud, console.log output is routed to cloudwatch. But where does it go if I use sam local start-api
?
Because I can't find it in cloudwatch
Asked
Active
Viewed 2,467 times
10

user2741831
- 2,120
- 2
- 22
- 43
-
I think it also goes to the stdout (your command prompt/terminal/console) – petey Nov 17 '20 at 00:13
-
@petey Really..? – jtlz2 Mar 14 '22 at 14:21
1 Answers
6
The sam local start-api documentation shows that you can control the log file that runtime logs are sent to with the command line option:
-l, --log-file filename

jarmod
- 71,565
- 16
- 115
- 122
-
didn't notice it at first since it had some prefixin front of the output – user2741831 Nov 16 '20 at 15:11