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


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 | | @dhelper
  3. 3. Consultant & software srchitect Developing software since 2002 Clean Coder & Test Driven Developer Pluralsight author B: T: @dhelper About.ME
  4. 4. Virtualization Evolution Physical servers Virtual Machines Containers Functions as a Service Monolith SOA Micro Services Serverless
  5. 5. AWS Lambda Introduced in 2014 Execution time < 5 min Allocated memory determines CPU Multiples Language Supported Triggered by AWS services
  6. 6. 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. 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. 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. Event Driven AWS Lambda Events Data Store Services
  10. 10. From Server to Serverless
  11. 11. 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
  12. 12. DEMO: Serverless application
  13. 13. 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. 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. Lambda Orchestration
  16. 16. 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. @DeveloperDaysPL Thank you  Dror Helper | | @dhelper
  18. 18. Sponsors Silver Sponsors Strategic Sponsor Media Partners