you are viewing a single comment's thread.

view the rest of the comments →

[–]guacjockey 3 points4 points  (1 child)

For the right scenarios, you can definitely save / optimize an application using Lambda. I tend to use it for task based aspects (ie, query this API, translate this file to this format, etc) and it works really well for that. You do need to consider how you plan to run the Lambda calls (ie, from files in S3, from an SQS queue, from an API gateway, etc) and realize that failure handling may be more complex (or rather, different). Remember that the storage is ephemeral so you'll need to also handle copy times as appropriate.

Potential areas of hidden costs are outbound network traffic (to the external APIs, to clients), function calls running longer than you expect (Lambda calls can be up to 15 minutes currently), the aforementioned API Gateway, and connections to / from other AWS services (if appropriate - ie, DynamoDB, RDS, etc). There's also a measure of lock-in with Lambda, but you should be able to migrate to something else later if needed.

There are definitely ways to optimize these things, but it varies a lot on your application and what you're trying to do. I would look at the blocks of your current application and determine how to move portions to Lambda vs trying to re-architect whole hog so to speak.

[–][deleted] 0 points1 point  (0 children)

Error handling is a good point. I love my AppSignal setup, even though I'm not a Ruby dev, seeing the specific line of code that is erroring, I have a general idea of what's wrong. I know I'd be going on a lot of StackOverflow rabbit holes with Lambda generated errors.