Python on AWS Lambda: Practical Applications

Slides:



Advertisements
Similar presentations
Running Your Startup on Amazon Web Services Alex Iskold Founder/CEO AdaptiveBlue Feature Writer ReadWriteWeb.
Advertisements

Ivan Pleština Amazon Simple Storage Service (S3) Amazon Elastic Block Storage (EBS) Amazon Elastic Compute Cloud (EC2)
Amazon Web Services (aws) B. Ramamurthy. Introduction  Amazon.com, the online market place for goods, has leveraged the services that worked for their.
Management Framework for Amazon EC2 Speaker: Frank Bitzer
© 2014 Amazon Web Services, Inc. and its affiliates. All rights reserved. Developing on AWS © 2014 Amazon Web Services, Inc. and its affiliates. All rights.
Nikolay Tomitov Technical Trainer SoftAcad.bg.  What are Amazon Web services (AWS) ?  What’s cool when developing with AWS ?  Architecture of AWS 
Cloud: a New Paradigm for Developers Svetlin Nakov Telerik Software Academy academy.telerik.com.
SENG 422 Lab 4 Cloud Computing Time: ELW B220 from (4:00 - 6:50) every Tuesday TA: Philip Baback Alipour Ph.D. Candidate in Electrical, Computer Engineering.
Google App Engine Danail Alexiev Technical Trainer SoftAcad.bg.
What is a “modern” application? Ulrich (Uli) Homann Chief Architect, Microsoft Services Microsoft Corporation.
Introduction to Amazon Web Services (AWS)
Cloud: a "New" Paradigm for Developers Telerik Software Academy Web Services and Cloud.
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
The Blue Book pages 19 onwards
Cloud Computing Amazon Web Services - introduction Keke Chen.
Amazon Web Services BY, RAJESH KANDEPU. Introduction  Amazon Web Services is a collection of remote computing services that together make up a cloud.
AWS Simple Icons v15.9 AWS Simple Icons: Usage Guidelines Check to make sure you have the most recent set of AWS Simple Icons This version was last updated.
Some Design Notes Iteration - 2 Method - 1 Extractor main program Runs from an external VM Listens for RabbitMQ messages Starts a light database engine.
Conversing in the Cloud Ryan Kupfer, Scott Wetter, Bryan Welfel, Shekhar Pradhan.
Server to Server Communication Redis as an enabler Orion Free
AWS Amazon Web Services Georges Akpoly CS252. Overview of AWS Amazon Elastic Compute Cloud (EC2) Amazon Simple Storage Service (S3) Amazon Simple Queue.
How* to Win the #BestMicrosoftHack Shahed Chowdhuri Sr. Technical WakeUpAndCode.com *Hint: Use the Cloud.
CLOUD WITH AMAZON. Amazon Web Services AWS is a collection of remote computing services Elastic Compute Cloud (EC2) provides scalable virtual private.
Cloud Computing is a Nebulous Subject Or how I learned to love VDF on Amazon.
Cloud services Amazon Web Service (AWS) Intro and usage.
Launch Amazon Instance. Amazon EC2 Amazon Elastic Compute Cloud (Amazon EC2) provides resizable computing capacity in the Amazon Web Services (AWS) cloud.
1 NETE4631 Using Google Web Services Lecture Notes #6.
Cloud Computing from a Developer’s Perspective Shlomo Swidler CTO & Founder mydrifts.com 25 January 2009.
Amazon Web Services. Amazon Web Services (AWS) - robust, scalable and affordable infrastructure for cloud computing. This session is about:
Moving to the cloud As easy as 1, 2, …4? Kevin Dermody Project Manager - Multimedia Services - HEAnet.
Autocloud by Bryan Rosander. Motivation Cloud computing makes vast computing resources available at a reasonable price on an as-needed basis Configuring.
242: Get Your Head in the Cloud!
Platform as a Service (PaaS)
Introduction to Cloud Computing
AWS Simple Icons v AWS Simple Icons: Usage Guidelines
Going Serverless with AWS Lambda
AWS Solution Architect Associate Exam associate-dumps.html Free AWS Solution Training Exam Question.
Deploying Web Application
Security Group Amazon RDS Mysql Media Request S3
Platform as a Service (PaaS)
Platform as a Service (PaaS)
Tulika Chaudharie / Harikharan Krishnaraju
Introduction to Amazon Web Services Overview of AWS Services
What are the most popular services offered by Amazon Web Services..?Amazon Web Services
Continuous Deployment tool
Welcome to AWS Certification Exam
Acutelearn Amazon Web Services Training Classroom Training Instructor led trainings at Acutelearn premises Corporate Training Custom tailored trainings.
Amazon AWS Solution Architect Associate Exam Dumps For Full Exam Info Visit This Link:
AWS Certified Advanced Networking – Specialty Exam Dumps For Full Exam Info:
2018 Amazon AWS DevOps Engineer Professional Dumps - DumpsProfessor
Amazon AWS Certified Solutions Architect Professional Dumps For More Info About Exam Visit This Link:
AWS Administrator overview  SV Trainings AWS Training –provides real time and placement oriented Amazon Web Services (AWS) Online Training. Our AWS Course.
Introduction to Cloud Computing
Google App Engine Danail Alexiev
“No Server is easier to manage than no server”
AWS(AMAZON WEB SERVICES - CLOUD)
Cloud Computing BY: Udit Jain.
AWS Cloud Computing Masaki.
Image Magick in the Cloud Scalable Image Processing Service
Web Server Design Week 16 Old Dominion University
The Blue Book pages 19 onwards
Deploying Your First Full Stack Application to the Cloud
Building Serverless Enterprise Applications
Amazon Web Services.
Cloud Security AWS as an example.
FaaS на AWS очима дотнетчика
Cloud Security AWS as an example.
DIBBs Brown Dog BDFiddle
IoT Security and Privacy
Presentation transcript:

Python on AWS Lambda: Practical Applications Brian Morton Chief Information Officer - DVIDS

Online, searchable archive for DoD public media 1.5 million images 300K+ videos Fully open source stack* All content copyright free Publicly accessible API

*Classic City Computing Partnership

AWS Basic Glossary AWS = Amazon Web Services (the cloud) EC2 = Elastic Compute (virtual hosts) S3 = Simple Storage Service (storage in the cloud) ELB = Elastic Load Balancer (Haproxy in the cloud) SES = Simple Email Service (email in the cloud) SQS = Simple Queue Service (RabbitMQ in the cloud) RDS = Relational Database Service (Mysql in the cloud) Lambda = “Serverless” compute

AWS Lambda “Function” as infrastructure Uses spare cycles on AWS compute nodes (EC2 virtualization hosts) Bills in 100ms increments of CPU time based on memory profile allocated Runs in response to many types of events (S3 file delivery, SNS/SQS, SES) Designed to run up to 100 concurrent instances by default (can be exceeded) Languages currently supported: Java, Node.JS, Python More info: https://aws.amazon.com/lambda/faqs/

Lambda Example virtualenv zip import MySQLdb import PIL import django

Practical Application 1: Image Resizing https://bitbucket.org/dvids/awslambda-python-resize-image Performs read/write with S3 bucket Reads original image from bucket path Performs resizing according to json config in package Can be overridden through event arguments Writes resized images back to bucket Could be called from S3 upload, API Gateway, Simple Email Service and others

Allocated Used Image Size Memory (MB) Price per 100ms ($) Time (ms) Cost Total Cost 2604482 128 0.000000208 n/a 192 0.000000313 256 0.000000417 210 17000 0.00007089 170.136 320 0.000000521 13000 0.00006773 162.552 384 0.000000625 10900 0.000068125 163.5 448 0.000000729 9500 0.000069255 166.212 512 0.000000834 8500 576 0.000000938 229 7800 0.000073164 175.5936 640 0.000001042 7200 0.000075024 180.0576 1152 0.000001875 4200 0.00007875 189 1216 0.00000198 5200 0.00010296 247.104 1280 0.000002084 3800 0.000079192 190.0608 1344 0.000002188 3400 0.000074392 178.5408 1408 0.000002292 3600 0.000082512 198.0288 1472 0.000002396 3300 0.000079068 189.7632 1536 0.000002501 3200 0.000080032 192.0768 Asset count 2400000

Practical Application 2: Social Data Mining https://github.com/rokclimb15/aws-lambda-python-twitter-search Searches Twitter for posts containing words or hashtags Topic and item count can be overridden through event args Returns number of Tweets, input topic, and length of time to search Wired to API Gateway with public endpoint Next logical step might be storage in Solr or RDS for analysis Could be called from API endpoint, or perhaps SES?

Sample Application: ETL Data Processing Following diagram shows ETL data processing pipeline S3 file upload triggers Lambda Initial function parses file, writes records to SQS Each SNS from queue instantiates a new Lambda Processing function does work (validation, lookup, soundex, etc) Data written to RDS or Redshift

1. File upload to S3 bucket 2. Parsing/validate Lambda invoked 3. Records queued to SQS 4. SNS notifications instantiate processing Lambdas 5. Processed data written to persistent storage

Questions: bmorton@dvidshub.net