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.

Amy Arambulo Negrette - Serverless Frenemies: Serverless Containers in Lambda and Fargate

96 views

Published on

Serverless Frenemies: Serverless Containers in Lambda and Fargate
Amy Arambulo Negrette

Virtual AWS Community Day | Midwest

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Amy Arambulo Negrette - Serverless Frenemies: Serverless Containers in Lambda and Fargate

  1. 1. twitter:nerdypaws | linkedin:/in/amycodes Serverless Frenemies: Lambda, Fargate, and Serverless Containers
  2. 2. twitter:nerdypaws | linkedin:/in/amycodes We’re going to talk about…. Functions as a Service. Containers. Serverless Containers. And the pains of using someone else’s computer.
  3. 3. twitter:nerdypaws | linkedin:/in/amycodes Who am I? Amy Arambulo Negrette I build Serverless Applications.
  4. 4. twitter:nerdypaws | linkedin:/in/amycodes It’s that time again… What is serverless?
  5. 5. twitter:nerdypaws | linkedin:/in/amycodes What is serverless? Cloud-Native, service-based application architecture. OR Using AWS Parts instead of Building your own Parts. What are the benefits of serverless?  No Server Management  Flexible Scaling  Pay for Value  Automated High Availability
  6. 6. twitter:nerdypaws | linkedin:/in/amycodes One more time… There are servers in serverless!
  7. 7. twitter:nerdypaws | linkedin:/in/amycodes How FaaS Works?  Your code gets built into a Container Image  Initial Invocation builds a new Cloud Managed Container from the Image  Every Subsequent Image spins up a new Container  Containers are destroyed once all executions are complete
  8. 8. twitter:nerdypaws | linkedin:/in/amycodes And that’s great! Except when it’s not.
  9. 9. twitter:nerdypaws | linkedin:/in/amycodes
  10. 10. twitter:nerdypaws | linkedin:/in/amycodes What is ELF? The Executable and Linkable Format is a common standard file format for executable files, object code, shared libraries, and core dumps. Or… It’s a file format used for Binary Files.
  11. 11. twitter:nerdypaws | linkedin:/in/amycodes Bring Your Own Container (Hypothetically speaking…)
  12. 12. twitter:nerdypaws | linkedin:/in/amycodes Pros: • All of your Dependencies • Your Own Security • Overall Control Cons: • No more Optimizations • Responsible for the “Glue” • More Work What would we get?
  13. 13. twitter:nerdypaws | linkedin:/in/amycodes  A Function-Ready Base Container o A Runtime Supported by the CSP o Required Middleware  A CSP that can run this Container like a FaaS o Horizontal Scaling o Event-based Triggers What do we need?
  14. 14. twitter:nerdypaws | linkedin:/in/amycodes Is Fargate the Answer?
  15. 15. twitter:nerdypaws | linkedin:/in/amycodes “AWS Fargate is a serverless compute engine for containers that works with both Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes Service (EKS). Fargate makes it easy for you to focus on building your applications. Fargate removes the need to provision and manage servers, lets you specify and pay for resources per application, and improves security through application isolation by design.” https://aws.amazon.com/fargate/
  16. 16. twitter:nerdypaws | linkedin:/in/amycodes  No Server Management  Flexible Scaling  Pay for Value  Automated High Availability How Serverless is it?
  17. 17. twitter:nerdypaws | linkedin:/in/amycodes  No Server Management  Flexible Scaling  Pay for Value  Automated High Availability How Serverless is it?  Deploy a zipped deployment package to Lambda via CFN/SAM  No Generic Lambda Container
  18. 18. twitter:nerdypaws | linkedin:/in/amycodes  A Suite to deploy FaaS in Kubernetes  Custom Base Containers  Deployable into Fargate OpenFaas  OpenFaaS Gateway (API Gateway)  FaaS-Fargate Provider (Terraform)  Prometheus Monitoring & Alerts  NATS Messaging Server (OSS)
  19. 19. twitter:nerdypaws | linkedin:/in/amycodes × No Server Management  Flexible Scaling  Pay for Value  Automated High Availability How Serverless is it?  Deploy a zipped deployment package to Lambda via CFN/SAM  No Generic Lambda Container  A Base Image Library #AWSWISHLIST
  20. 20. twitter:nerdypaws | linkedin:/in/amycodes × No Server Management  Flexible Scaling  Pay for Value  Automated High Availability How Serverless is it?  Horizontal Scaling to 1,000 Concurrent Invocations  Runtime Configuration Limits (15 min Timeout, 250 mb Deployment Package)  No Default Autoscaling Policy
  21. 21. twitter:nerdypaws | linkedin:/in/amycodes @nathankpeck offers a summary of Containerization, how to use Containers on AWS, and several tools for standard practices to use as quick starts or base templates. Containers on AWS
  22. 22. twitter:nerdypaws | linkedin:/in/amycodes × No Server Management × Flexible Scaling  Pay for Value  Automated High Availability How Serverless is it?  Horizontal Scaling to 1,000 Concurrent Invocations  Runtime Configuration Limits (15 min Timeout, 250 mb Deployment Package)  No Default Autoscaling Policy  A FaaS Like Template #AWSWISHLIST
  23. 23. twitter:nerdypaws | linkedin:/in/amycodes × No Server Management × Flexible Scaling ? Pay for Value  Automated High Availability How Serverless is it?  Availability as a Managed AWS Service  Availability as a Managed AWS Service
  24. 24. twitter:nerdypaws | linkedin:/in/amycodes Previously… In this talk.
  25. 25. twitter:nerdypaws | linkedin:/in/amycodes • Unpredictable Lambda Errors due to Missing Dependencies My Actual Problem: • Loses ALL Runtime management, including messaging and request features • Taken responsibility of ALL infrastructure, including Networking and Scaling Fargate as a Solution:
  26. 26. twitter:nerdypaws | linkedin:/in/amycodes • Unpredictable Lambda Errors due to Missing Dependencies My Actual Problem: • Creating a Custom Python Deployment Package using Virtual Environments (And Serverless framework and Docker) https://docs.aws.amazon.com/lambda/latest/dg/python-package.html My actual Solution:
  27. 27. twitter:nerdypaws | linkedin:/in/amycodes I mean… That’s fine?
  28. 28. twitter:nerdypaws | linkedin:/in/amycodes • I could re-use it! • My Security Team could Bless it! • I would know how it behaved BEFORE deployment If I had a Container… (#awswishlist)
  29. 29. twitter:nerdypaws | linkedin:/in/amycodes Fargate as a Solution … to a completely different problem: • Migrating from ECS to Serverless • More expensive than ECS when not taking the EC2 Orchestrator into account • Price comparisons should include the cost of the EC2
  30. 30. twitter:nerdypaws | linkedin:/in/amycodes • How Lambda Works • When Lambda Breaks • How Fargate Works • How Serverless is Fargate Really? What did we learn… • When is Fargate the Answer?
  31. 31. twitter:nerdypaws | linkedin:/in/amycodes QUESTIONS? You can also find me at: awschicago.slack.com midwestcommunityday.slack.com

×