Best practices when working with the serverless framework

Why this talk?

Because we have all met this guy

Because we have all been burned by a framework

Because nobody knows what the future will hold

Best practices when adopting frameworks (and this time, the serverless framework)

What are we building?


  • list all available meme templates
  • search through existing meme templates
  • create a meme using an existing template
  • create a meme from a custom image url



  • slack!
  • issue commands using a /memebot slash command


Goal: Decouple our business logic from the serverless framework as much as possible


Code Walkthrough

Layout our project

- bot/
   |--- src/
         |--- container.js <===== our dependency injection container
         |--- functions/
                  |------- memebot_slack_command.js
         |--- lib/
                  |------- config/...
                  |------- exceptions/...
                  |------- logger.js
                  |------- meme_api_manager.js
                  |------- memebot_api.js
                  |------- slack_api_manager.js
- spec/

Thank you!