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

The Life of a Serverless Microservice on AWS

The Life of a Serverless Microservice on AWS

In this 60 minute session we will develop, test, deploy and operate a production ready microservice using the AWS ecosystem. The combination of AWS Lambda and Amazon API Gateway allows us to operate a REST endpoint without the need of any virtual machines. We will use Amazon DynamoDB as our database, Amazon CloudWatch for metrics and logs, and AWS CodeCommit and AWS CodePipeline as our delivery pipeline. Production ready includes:
* automated testing
* API authentication
* logs (collection and alerts)
* monitoring (metrics and alerts)
* continuous build and deploy pipeline
This will be a hands-on session with live coding and sharing of practical experience. I promise: there will be no servers!

Conference: https://devopsconference.de/session/the-life-of-a-serverless-microservice-on-aws/

Michael Wittig

June 14, 2016
Tweet

More Decks by Michael Wittig

Other Decks in Technology

Transcript

  1. Michael Wittig • Author of Amazon Web Services in Action

    (Manning) • AWS Consultant • tecRacer [email protected] @hellomichibye
  2. Serverless • only pay when function is executed – $0,0000002

    + $0,000000208 / 100 ms – $1 := 2,5 mio invocations • 100% managed – no under/over provisioning – no boot time, no patching, no SSH – no load balancing
  3. Serverless Events • File uploaded • E-Mail received • Database

    changed • Manual invoked • HTTP API called • Cron
  4. CI & CD • AWS CodePipeline – build, test, and

    deploy your code – product integrations • Solano Labs – CI as a Service
  5. CI & CD • download sources • install dependencies: npm

    install • run tests: make test • bundle artifact: zip • deploy using CloudFormation – create / update stack
  6. Service • Amazon API Gateway – REST API as a

    Service • AWS Lambda – code execution – event triggered • Amazon DynamoDB – Key-Value- / Document-Store
  7. Service 1. check input 2. map input to JSON 3.

    call Lambda function 4. map output 5. check output • 100% managed
  8. Service • implement interface • success / failure • limited

    memory • limited execution time • 100% managed
  9. Service • read / write by key • replicated •

    eventual consistent • 99% managed – except scaling
  10. Logs & Monitoring CI & CD Test Git Deploy Profile

    Auth Locatio n Bundle JSON JS git push GET /profile/michael HTTP/1.1 PUT /loc/michael HTTP/1.1 Services Log s Metr ics Alertin g Alertin g Dev User Code • Service dependencies • Authentitcation
  11. Pittfals • CodePipeline / CodeCommit only available in us-east-1 at

    the moment • Soft limits – Concurrent Lambda invocations (100) – API Gateway RPS (1000) • CloudFormation, CodePipeline and Solano Labs has limitations