Hacker News new | ask | show | jobs
by haydenkshaw 3153 days ago
Would probably use CloudWatch Logs for this personally
3 comments

Yes if the goal is to archive stuff, event per event I'd use cloudwatch logs. You can create the stream you want in order to log to it.

It's probably cheaper but lambdas and s3 are equally dirt cheap so hey why not.

Edit: Two possibilities here. Either the choice of technology is deliberate and there's a reason I can't quite figure out, or AWS has reached that state where they do so much it's really really hard for people to know what service to use for each problem.

Which actually makes me wonder what am I doing right now that could be done easily using a pre-baked AWS solution?

I teach some AWS courses and that's something I always bring up: if you have a system you are thinking of building it always makes sense to see if AWS has a prebaked solution and evaluate it. The solution may not meet your needs but is likely to be available at a price/performance ratio (especially considering fully weighted operational costs) that will make it compelling if it does meet the requirements.
It sounds like a much easier solution for EC2 instances. However it's limited to AWS - hosted apps, if I'm not mistaken?
No, you can use cloudwatch anywhere you can install the AWS CLI—-including non AWS assets. Just point the log monitor at a file or folder with the right CLI commands and you can suck up logs in real time into cloudwatch.
Can you tail cloudwatch logs in real time, ideally from the command line?

For debugging situations, I'd like to send a request to my app server and then see the server response live, or with little delay.

Yes, I use it in just that way. I recommend installing awslogs[0] on your workstation. Then, to tail a log group, you'd run

   awslogs get <group_name> -w
The latency is pretty low and this generally works well. You can apply filters etc. as well if needed.

[0]: https://github.com/jorgebastida/awslogs