is it possible to aggregate a bunch of different l...
# help
m
is it possible to aggregate a bunch of different lambda function logs into one log stream? some way to have one log stream for my app?
a
It's possible with this API, but read the bullet points listed there: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudWatchLogs.html#putLogEvents-property
What do you need it for? Maybe it's better to write to dynamodb or elasticsearch or something
i think the aws console lets you search through all streams, so if you log something you can search for, should be easy to find
it doesn't let you search over multiple log groups, though, it seems
f
@Mischa Spiegelmock u could setup CloudWatch subscription to trigger Lambda or Kinesis, and re-write them to a different log group
m
yeah... sounds kinda overkill
f
That said, i feel think this is a tooling problem.
yeah definitely overkill
in SST Console, u can see all ur functions, clicking on one of them would start tailing for its logs
we want to improve on that.. but haven’t had got time to get to it
m
my main use case is going to a specific point in time and wanting to see logs for the whole app at that time. i can always go hunt down the specific function in cloudwatch logs I'm talking about on prod mostly, for debugging
i guess what i'm wondering is it possible to either have an aggregate cloudwatch log group (with or without subscriptions) or maybe have all the functions write to the same log group?
f
that’s not possible afaik
m
ah well
f
sounds like a 3rd party logging service is probably the easiest.. or take on the burden to dump the log to s3 and search using Athena, or dump the log to Elastic Search… 🥲
m
late to the party here, but couldn't you just query it with cloudwatch insights? it lets you select a bunch of log groups at once.. and you can save the query/selected logs