Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Creating serverless architecture with aws lambdas

80 views

Published on

Cloud development has changed when AWS Lambda was introduced in 2014. Instead of provisioning and managing servers, developers were able to focus on their code, creating event-driven, on-demand functions. Harnessing automatically scalable, always available code. Using Lambda functions integration with other AWS services and step functions developers can create whole applications.
In this talk, I’ll show how to use Lambdas to create scalable, fault-tolerant applications using event-driven, cost-effective, serverless architecture.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Creating serverless architecture with aws lambdas

  1. 1. Sponsors Silver Sponsors Strategic Sponsor Media Partners
  2. 2. Creating serverless architecture with AWS Lambdas Dror Helper | http://helpercode.com | @dhelper
  3. 3. Consultant & software srchitect Developing software since 2002 Clean Coder & Test Driven Developer Pluralsight author https://www.pluralsight.com/authors/dror-helper B: http://helpercode.com T: @dhelper About.ME
  4. 4. cloud.developerdays.pl@DeveloperDaysPL Virtualization Evolution Physical servers Virtual Machines Containers Functions as a Service Monolith SOA Micro Services Serverless
  5. 5. cloud.developerdays.pl@DeveloperDaysPL AWS Lambda Introduced in 2014 Execution time < 5 min Allocated memory determines CPU Multiples Language Supported Triggered by AWS services
  6. 6. cloud.developerdays.pl@DeveloperDaysPL AWS Lambda (Python) def lambda_handler(event, context): print('Checking {} at {}'.format(SITE, event['time'])) try: if not validate(str(urlopen(SITE).read())): raise Exception('Validation failed') except: print('Check failed!') raise else: print('Check passed!') return event['time']
  7. 7. cloud.developerdays.pl@DeveloperDaysPL public async Task<string> FunctionHandler(S3Event evnt, ILambdaContext context) { var s3Event = evnt.Records?[0].S3; if(s3Event != null) return null; try { var response = await _s3Client .GetObjectMetadataAsync(s3Event.Bucket.Name, s3Event.Object.Key); return response.Headers.ContentType; } catch(Exception e) { context.Logger.LogLine($"Error reding object metadata" throw; } } AWS Lambda (C#)
  8. 8. cloud.developerdays.pl@DeveloperDaysPL Benefits of using FaaS No provisioning No server management fault tolerant Continuous scaling with usage Pay by usage – don’t pay for idle
  9. 9. cloud.developerdays.pl@DeveloperDaysPL Event Driven AWS Lambda Events Data Store Services
  10. 10. cloud.developerdays.pl@DeveloperDaysPL From Server to Serverless
  11. 11. cloud.developerdays.pl@DeveloperDaysPL Serverless Architecture Requires no management of Server hosts/processes Self auto-scales and auto-provisions, based on load Offers costs based on precise usage Has performance capabilities defined in terms other than host size / count Has implicit High Availability https://www.oreilly.com/programming/free/what-is-serverless.csp
  12. 12. cloud.developerdays.pl@DeveloperDaysPL DEMO: Serverless application
  13. 13. cloud.developerdays.pl@DeveloperDaysPL Serveless benefits Reduced operational costs Focus on business logic Development agility – quick and isolated Easier optimizations Different components scale independently Simple(r) deployments
  14. 14. cloud.developerdays.pl Serverless is not Perfect On the one hand… High availability Continuous scaling Pay as you go Reduce maintenance Easy to deploy to the cloud No need for orchestration However… Need to factor cold starts There are hard/soft limit It’s not always cheaper Still need monitoring/auditing Diffcult to debug on your machine* Actually – implicit orchastration
  15. 15. cloud.developerdays.pl@DeveloperDaysPL Lambda Orchestration
  16. 16. cloud.developerdays.pl@DeveloperDaysPL Takeaways • Lambda is easy! • Enable rapid development  reduced costs • Many applications can be serverless • Continuously monitor and optimize We’re just getting started
  17. 17. cloud.developerdays.pl @DeveloperDaysPL Thank you  Dror Helper | http://helpercode.com | @dhelper
  18. 18. Sponsors Silver Sponsors Strategic Sponsor Media Partners

×