Think Big, Start Small, Scale Fast: Develop a Marketplace app using AWS Lambda

Think Big, Start Small, Scale Fast: Develop a Marketplace app using AWS Lambda

Are you planning to develop a new Cloud app? Serverless might be right for you! In this talk, we'll show you what it takes to run an app using a serverless architecture based on AWS Lambda, from design and deployment, to testing, debugging, and most importantly – how to scale. We'll go beyond the basics to demonstrate real use cases, best practices, and explain why serverless might be a good fit for you.

Talk is available online: https://www.youtube.com/watch?v=XfpskCjfBBw

023594dc361cab87c8e40d03ba0f3b18?s=128

sebastianhesse

September 07, 2018
Tweet

Transcript

  1. 1.

    Think Big, Start Small, Scale Fast Develop a Marketplace app

    using AWS Lambda SEBASTIAN HESSE | SOFTWARE ENGINEER | K15T SOFTWARE | @SEEEBIII
  2. 6.
  3. 10.

    Long Running Tasks Perform bigger tasks, e.g. to initialize data.

    Our Use Cases For Serverless Scheduled Tasks Schedule functions for cleaning up data or other tasks. Webhooks Receive webhooks from Jira, Confluence, etc. and process them.
  4. 13.

    Local Machine Execute and debug + test your code on

    your local machine. Cloud Upload your code to the cloud and test it there. Testing & Debugging
  5. 15.

    Quick code updates Wrote our own library lambda-updater to quickly

    update the Lambda code. Write tests Writing unit and integration tests can already identify lots of problems. Real environment No service mocks, latencies don't explode and a better feeling about the execution. Why?!
  6. 16.

    Quick code updates Wrote our own library lambda-updater to quickly

    update the Lambda code. Write tests Writing unit and integration tests can already identify lots of problems. Real environment No service mocks, latencies don't explode and a better feeling about the execution. Why?!
  7. 17.

    Quick code updates Wrote our own library lambda-updater to quickly

    update the Lambda code. Write tests Writing unit and integration tests can already identify lots of problems. Real environment No service mocks, latencies don't explode and a better feeling about the execution. Why?!
  8. 24.
  9. 25.
  10. 30.

    Programming Language Java for background functions, NodeJS for functions which

    are performance relevant. Function Scope One scope per function. For example, one webhook receiver function, one email sending function, etc. Consider
  11. 49.
  12. 50.

    Collect tenant information from database. < 1 sec 350ms /

    100 issues Retrieve all issues from a project in Jira. Find issues matching your configuration. < 1 sec Example: Retrieve 800 Issues For Sync Perform further steps and update issue data. 350ms / 1 issue 10 sec Store relevant information in database.
  13. 53.

    Solution #3 Use AWS Step Functions to define an execution

    order of your functions. AWS Step Functions
  14. 54.

    Example Step Function "Retrieve issues": { "Type": "Task", "Resource": "arn:aws:lambda:...",

    "Next": "All issues?", "Retry": [ { ... } ] } Retrieve issues All issues? Process issues Failed START END
  15. 56.

    Examples Webhooks Webhooks are not 100% reliable. Catch up missed

    webhooks every day. Weekly Updates Send a status update every week and let your customers know about some numbers. Clean Up Clean up data in your environment, e.g. in your database.
  16. 58.

    Monitoring Enable monitoring and notification about failures. Learn from it

    and adapt your architecture. Failures Functions can fail quite easily and you might never know, because you don't check the logs or any metrics.
  17. 60.

    Trade Offs Potentially less operational costs, but more complex architecture.

    Please Remember Scalability Consider scalability for all of your services. Function Scope Focus on one scope per function. Think about the use case of a function.