Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Top 8 mistakes developer teams make in their first serverless project

724 views

Published on

Your development team is about to embark on its first fully serverless project. You want to get productive quickly and extract the most benefit from the AWS serverless ecosystem you are moving into. Find out the common pitfalls to avoid and ensure you get off on the best possible footing.

Published in: Technology
  • Be the first to comment

Top 8 mistakes developer teams make in their first serverless project

  1. 1. @paulswail 8 mistakes teams make when starting with serverless PAUL SWAIL Independent Cloud Architect, Winter Wind Software Belfast, 24th January 2020
  2. 2. @paulswail MISTAKE #1 AWS Console Driven Development
  3. 3. @paulswail ProblemsnotusingInfrastructure-as-Code ❌ Deployments not repeatable ❌ No version control of configuration changes ❌ Slow for new starts to get set up ❌ IaC seen as tool for Ops/Systems Engineers, not Developers
  4. 4. @paulswail Useadeployment frameworkfromday1
  5. 5. @paulswail MISTAKE #2 (Trying to) Run everything locally
  6. 6. @paulswail Usecloudresourcesindevelopmentenvironment ✓ Consistency across team ✓ Closer representation of production ✓ Fewer “worked on my machine” bugs at integration time ✓ Infrastructure-as-Code isn’t an afterthought
  7. 7. @paulswail PERSONALAWSACCOUNT Give each developer a sandboxed
  8. 8. @paulswail MISTAKE #3 Putting Lambda functions inside a VPC “for security”
  9. 9. @paulswail ProblemswithVPC-enabledLambdafunctions ❌ No more secure than standard IAM-protected functions ❌ Slower cold starts ❌ More network config to manage ❌ No internet access
  10. 10. @paulswail MISTAKE #4 The Lambda of God
  11. 11. @paulswail Multi-purposeLambdafunction ❌ More IAM permissions = less secure ❌ No granular deployments ❌ Larger filesize = slower cold starts ❌ Hard to find logs in CloudWatch
  12. 12. @paulswail Prefersingle-purposeLambdafunctions
  13. 13. @paulswail MISTAKE #5 Premature abstraction into microservices
  14. 14. @paulswail Structuringyourfirstserverlessproject ❖ Start with a monorepo ❖ Create 1 or 2 services ❖ Don’t overly worry about code duplication
  15. 15. @paulswail MISTAKE #6 Testing the wrong things
  16. 16. @paulswail IntegrationTests>UnitTestsforLambdas 🍒 Unit tests optional nice-to-have 🔥 For each test case, write 1 test & run in 2 modes: - INTEGRATION - ACCEPTANCE (h/t Yan Cui’s Production-Ready Serverless course)
  17. 17. @paulswail IntegrationMode Fast workflow No mocking of cloud services
  18. 18. @paulswail AcceptanceMode Post deployment Runs in CI/CD pipeline Catches config errors (IAM permissions, etc)
  19. 19. @paulswail MISTAKE #7 Only using synchronous patterns
  20. 20. @paulswail Synchronousflow 👎 Slow client response time 👎 Write your own error and retry handling 👎 Complex Lambda code
  21. 21. @paulswail Asynchronousflow 👍 Fast API response time 👍 Uses built-in retry behaviour 👍 Single-purpose Lambda functions
  22. 22. @paulswail MISTAKE #8 Expecting too much from cloud services
  23. 23. @paulswail Selectingcloudservices… ➡ Overwhelming number of AWS services ➡ Primitive vs higher-level application services ➡ Event-driven architectures make it easy to integrate with 3rd party services
  24. 24. NEWSLETTER: serverlessfirst.com BLOG: winterwindsoftware.com LINKED IN: linkedin.com/in/paulswail TWITTER: @paulswail THANK YOU!

×