Python on AWS Lambda

Download Python on AWS Lambda

Post on 14-Apr-2017

513 views

Category:

Technology

0 download

Embed Size (px)

TRANSCRIPT

<ul><li><p> 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.</p><p>Markku Lepist - Principal Technology Evangelist</p><p>Python on Lambda</p></li><li><p>User Application</p><p>Application Service</p><p>Middleware Service</p><p>Language Interpreter</p><p>Operating System</p><p>Host</p><p>Focus on Your Application</p></li><li><p>Move Up the Stack </p></li><li><p>Application</p><p>Architecture</p></li><li><p>Adrian Cockcroft, Technology Fellow at Battery Ventures</p><p>http://www.slideshare.net/adriancockcroft/goto-berlin</p><p>http://www.slideshare.net/adriancockcroft/goto-berlin</p></li><li><p>Amazon Web Services</p></li><li><p>Containers Docker launched in 2013</p><p>Cloud EC2 launched in 2006</p><p>Virtualization Since late 1990s</p><p>Bare Metal Since 1960s</p></li><li><p>Lambda Launched in 2015</p><p>Containers Docker launched in 2013</p><p>Cloud EC2 launched in 2006</p><p>Virtualization Since late 1990s</p><p>Bare Metal Since 1960s</p></li><li><p>Event driven, fully managed compute</p><p>All you need is code</p></li><li><p>Fast</p><p>events trigger code execution </p><p>in milliseconds at any scale</p></li><li><p>Cost &amp; Resource Efficient</p><p>100ms billing granularity</p><p>of compute chunks</p></li><li><p>Highly Requested by Customers Since Launch</p></li><li><p>Running Python on Lambda</p></li><li><p>Where can I use the AWS Python SDK ?</p><p>Your dev environment Amazon EC2 VM / Container AWS Lambda(install) (install) (pre-installed)</p></li><li><p>Programming model</p></li><li><p>Asynchronous Synchronous</p></li><li><p>handler_name event context</p></li><li><p> Print </p><p> Logger</p><p>AWS CloudWatch Logs</p></li><li><p>New Python lambda function from blueprint</p><p> Lambda console</p><p> Asynchronous triggered by S3 event</p><p> Debug &amp; logs in Cloudwatch</p><p> Identity and Access Management</p><p> Exceptions handling</p></li><li><p>New Python Hello World Lambda function </p><p> Unit tests in Lambda console</p><p> Synchronous called by us</p></li><li><p> Request ID (useful for troubleshooting)</p><p> Time remaining (before timed out function is killed)</p><p> Memory available</p><p> Info on calling client i.e Mobile app </p><p> etc</p></li><li><p>context</p><p>context.log_stream_name</p><p>context.log_group_name</p><p>context.aws_request_id</p><p>context.memory_limit_in_mb</p><p>context.get_remaining_time_in_millis()</p></li><li><p>Lets run the previous slide Context example</p></li><li><p>aws lambda create-function </p></li><li><p> pip install zip</p><p>setup.cfg</p><p>[install]</p><p>prefix= </p></li><li><p>aws.amazon.com/lambda</p><p>@markkulepisto</p></li></ul>