Serverless Architecture with AWS Lambda

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →
Matt Chung
November 27, 2015

Serverless Architecture with AWS Lambda

Lessons learned from utilizing AWS Lambda cron feature.

Matt Chung

November 27, 2015

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

21 slides
  1. Agenda • Brief background about me • Use Case /

    Problem • Live Demo • Lessons Learned
  2. About Me Roots in systems and networking. Primary focus is

    software development • Engineer @ Cisco Systems • Director.Technical Operations @ Fox Networks (NewsCorp / 21st Century Fox) • Python / DevOps @ Whalerock Industries
  3. What problem are we trying to solve? • Scheduled tasks

    • Existing solutions • Cron • Celery beat • RQ
  4. What is AWS Lambda "... a compute service where you

    can upload your code to AWS Lambda and the service can run the code on your behalf using AWS infrastructure."1 -- AWS Developer Guide 1 https:/ /forums.aws.amazon.com/message.jspa?messageID=619362
  5. Attending AWS re:Invent 2015 • Python / Django shop -

    Celery Beat with single instance scheduler • Lambda as Cron: Scheduling Invocations in AWS Lambda • Using CloudWatch to trigger alarm • SNS topic to trigger AWS Lambda There's got to be an EASIER way
  6. A few Core Principles • Pre-production (i.e "DEV", "QA") and

    production environments • Application logging • Monitoring / Notifications • Easy to deploy
  7. Live Demo • Trigger web performance tests on a scheduled

    basis using SpeedCurve API. Sample application • Build • Deploy • Execute
  8. How to separate environments Each function is its own "environment"

    • DeploySpeedCurve-dev • DeploySpeedCurve-staging • DeploySpeedCurve-production
  9. Example code var path = require('path'); path.parse(logfileToUpload) .... TypeError: Object

    #<Object> has no method 'parse' Worked locally, but NOT on AWS Lambda
  10. Resources How to create a deployment package http:/ /docs.aws.amazon.com/lambda/latest/dg/lambda-python-how- to-create-deployment-package.html

    AWS Lambda Limits http:/ /docs.aws.amazon.com/lambda/latest/dg/limits.html Supported Language Versions http:/ /docs.aws.amazon.com/lambda/latest/dg/current-supported- versions.html

More Decks by Matt Chung

Other Decks in Programming