3 ms·
If only I had a nickel for every blog post decrying an AWS Service for not being something it wasn't ever intended to be... I'll just go over his complaints ab
by sudosteph 8y ago
If only I had a nickel for every blog post decrying an AWS Service for not being something it wasn't ever intended to be...
I'll just go over his complaints about CloudWatch and Lambda:
> If you're using Lambda or Fargate, you have no choice but to use CloudWatch Logs, wherein searching for everything is absolutely terrible.
I can't speak to Fargate, but you can absolutely use lambda without CW Logs. Just don't give your lambda an IAM role that lets it write to CW, boom no more logs in CW. If you want to send it to another service, there are options too. I don't see why something like this couldn't run on a lambda: https://www.loggly.com/docs/python-http/ https://www.loggly.com/docs/python-http/
His example of diagnosing an error is equally silly.
> Find the fact that it encountered an error in the first place by looking at the invocation error CloudWatch dashboard. I also could set up a filter to run a continuous query on the logs and alert when something shows up, except that isn't natively supported—I need a third-party tool for that (such as PagerDuty).
False. It's trivial to set up a CloudWatch Alarm + SNS notifications on lambda failures. SNS can go to email, phone, whatever. I do it all the time. I've even got a little slack bot that listens to certain SNS notifications and then gives a link back to cloudwatch logs.
> Go diving into a variety of CloudWatch log groups and find the one named after the specific erroring function.
> Scroll manually through the many, many, many pages of log groups to find the specific invocation that threw an error.
Or just go to the lambda you're working on and click on the nice blue "monitoring" tab and link to the logs there.
> Realize that the JSON object that's retained isn't enough to troubleshoot with, cry in despair, and go write an article just like this one.
If you aren't logging what needs to be logged, that's kinda on you.
- idbehold 8y ago> I don't see why something like this couldn't run on a lambda: https://www.loggly.com/docs/python-http/ https://www.loggly.com/docs/python-http/ It would, but then you're also paying for the time it takes to flush those logs to the other service before the process exits.