Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Saving Money on Serverless: Common Mistakes and How to Avoid Them

Yan Cui
April 30, 2024

Saving Money on Serverless: Common Mistakes and How to Avoid Them

Join us in this insightful webinar as we delve into the world of serverless architecture, exploring common pitfalls that often lead to unnecessary costs. Yan Cui, AWS Serverless Hero, and Alex de Boutray, VP of Engineering at Theodo, will navigate through key strategies and best practices to optimize your serverless infrastructure.

This session is a must-attend for cloud enthusiasts, developers, and decision-makers seeking actionable insights to maximize cost efficiency in their serverless environments. Gain practical knowledge, learn from real-world examples, and equip yourself with the tools to avoid common pitfalls and save money on your serverless journey.

Yan Cui

April 30, 2024
Tweet

More Decks by Yan Cui

Other Decks in Technology

Transcript

  1. Yan Cui AWS Serverless Hero Independent Consultant Developer Advocate @

    Lumigo Alex de Boutray VP of Engineering @ Theodo
  2. How to keep CloudWatch Logs cost under control 1. Do

    structured logging. DEBUG INFO WARN ERROR Detailed events for debugging application. General information that highlights progress of application. Potential problems, but doesn’t stop application from working. Issues that require immediate attention.
  3. How to keep CloudWatch Logs cost under control 1. Do

    structured logging. Log at INFO or above in production. DEBUG INFO WARN ERROR Detailed events for debugging application. General information that highlights progress of application. Potential problems, but doesn’t stop application from working. Issues that require immediate attention.
  4. How to keep CloudWatch Logs cost under control 1. Do

    structured logging. Log at INFO or above in production. 2. Sample DEBUG logs in production. e.g. 5% of invocations.
  5. How to keep CloudWatch Logs cost under control 1. Do

    structured logging. Log at INFO or above in production. 2. Sample DEBUG logs in production. e.g. 5% of invocations. 3. Set log retention to 30 days.
  6. CloudWatch Logs AWS Lambda AWS Lambda stdout asynchronously invokes any

    log aggregation service double paying for logs
  7. ?

  8. ? ?

  9. Law I. Make Cost a Non-functional Requirement. Law II. Systems

    that Last Align Cost to Business. Law III. Architecting is a Series of Trade-offs. Law IV. Unobserved Systems Lead to Unknown Costs. Law V. Cost Aware Architectures Implement Cost Controls. Law VI. Cost Optimization is Incremental. Law VII. Unchallenged Success Leads to Assumptions.
  10. Law I. Make Cost a Non-functional Requirement. Law II. Systems

    that Last Align Cost to Business. Law III. Architecting is a Series of Trade-offs. Law IV. Unobserved Systems Lead to Unknown Costs. Law V. Cost Aware Architectures Implement Cost Controls. Law VI. Cost Optimization is Incremental. Law VII. Unchallenged Success Leads to Assumptions.
  11. IOT core AppSync API Gateway Messages Connection Time $2 per

    million $0.08 per million mins $0.25 per million mins $1 per million $0.08 per million mins $1 per million
  12. IOT core AppSync API Gateway Messages Connection Time $2 per

    million $0.08 per million mins $0.25 per million mins $1 per million $0.08 per million mins $1 per million Momento - - Data Transfer $0.5 / GB EC2 rates EC2 rates EC2 rates
  13. ? ?

  14. ? ?

  15. 1. Overlooking monitoring and logging costs 2. Not having billing

    alarms 3. Not reading documentations 4. Over-provisioning 5. Missing caching 6. Synchronous lambda-to-lambda calls 7. Poor architecture design