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

Server Side Serverless in Swift

Server Side Serverless in Swift

Full stack developers hate to switch programming languages, tools, frameworks. It's a lost of time. What if you could use your front end favourite language - Swift - to build your backend resources, such as API, or any type of cloud-based processing ? And what if I add you don't even need to deploy a virtual machine to do so ? All serverless. During this session, you will learn WHY and HOW you can deploy your Swift code on AWS Lambda.

Transcript

  1. Sébastien Stormacq, Developer Relations, AWS @sebsto Server-Side, Serverless, Swift A

    hitchhiker guide
  2. Server-Side

  3. Identity Management API Gateway Database Object Storage Access Serverless Backend

  4. Serverless

  5. None
  6. Serverless No server to manage Scale with usage Built in

    availability & fault tolerance Pay for the value
  7. AWS Lambda

  8. AWS Lambda Supported Languages AWS Lambda Package and Deploy

  9. AWS Lambda How to trigger a function ? AWS Lambda

    REST API Gateway Trigger
  10. AWS Lambda How to trigger a function ? AWS Lambda

    GraphQL API Gateway Trigger
  11. AWS Lambda How to trigger a function ? AWS Lambda

    A message Queue Trigger
  12. AWS Lambda How to trigger a function ? AWS Lambda

    Databases Trigger
  13. AWS Lambda How to trigger a function ? AWS Lambda

    On Schedule Trigger
  14. None
  15. AWS Lambda Supported Languages AWS Lambda ?

  16. AWS Lambda Custom Runtime

  17. AWS Lambda Custom Runtime AWS Lambda Continuous loop bootstrap Handler

    code GET /next POST /response Invoke Unit of deployment Bootstrap shared across all your functions Handle code is specific to your function
  18. AWS Lambda Supported Languages AWS Lambda ?

  19. Swift AWS Lambda Runtime

  20. Swift AWS Lambda Runtime Add dependency

  21. Swift AWS Lambda Runtime Handler Code - Closure

  22. Swift AWS Lambda Runtime Handler Code - Closure

  23. Swift AWS Lambda Runtime Handler Code - Closure

  24. Swift AWS Lambda Runtime Handler Code - EventLoopLambdaHandler

  25. Swift AWS Lambda Runtime Handler Code - ByteBu ff erLambdaHandler

  26. How to build and package?

  27. Swift-based AWS Lambda functions How to compile for AWS Lambda

    runtime?
  28. Swift-based AWS Lambda functions How to package for AWS Lambda

    runtime? Lambda.zip
  29. How to get started?

  30. https://github.com/sebsto/slam

  31. Demo : create a new function

  32. Deploy the function

  33. Deploy your AWS Lambda Function AWS Console

  34. Deploy your AWS Lambda Function AWS CLI

  35. Deploy your AWS Lambda Function Meet SAM

  36. Deploy your AWS Lambda Function SAM Template

  37. Deploy your AWS Lambda Function SAM & SLaM

  38. Deploy your AWS Lambda Function Infrastructure AWS Lambda API Gateway

    Trigger
  39. Calling other AWS Services

  40. Soto Project The community-driven Swift SDK for AWS https://github.com/soto-project

  41. Access to Amazon S3 First de fi ne the return

    type
  42. Access to Amazon S3 Second, use Soto to call ListBuckets

  43. Demo : AWS Lambda w/ Soto

  44. Recap

  45. Serverless

  46. None
  47. None
  48. None
  49. None
  50. https://github.com/sebsto/swift-lambda-hello-world

  51. Wanna learn more? AWS EMEA Online Summit - June 9th

    https://aws.amazon.com/events/summits/online/emea/agenda/
  52. What are you going to build ?

  53. Thank you Fill in an anonymous survey Get a chance

    to win a $25 AWS Service Credit To redeem on your account https://eventbox.dev/survey/FLVKZ13 @sebsto