Serverless

  • Lambda – AWS Lambda is a compute service where you can upload your code and create a Lambda function. AWS Lambda takes care of provisioning and managing the servers that you use to run the code. You don’t have to worry about operating systems, patching, scaling, etc.
    • Lambda scales out (not up) automatically
    • Lambda functions are independent, 1 event = 1 function
    • Lambda is serverless
    • Lambda functions can trigger other lambda functions, 1 event can = x functions if functions trigger other functions
  • Lambda Triggers
    • API Gateway
    • AWS IoT
    • Alexa Skills Kit
    • Alexa Smart Home
    • Application Load Balancer
    • CloudFront
    • CloudWatch Logs
    • CodeCommit
    • Cognito Sync Trigger
    • DynamoDB
    • EventBridge (CloudWatch Events)
    • Kinesis
    • S3
    • SNS
    • SQS
  • Serverless Application Model (SAM) – CloudFormation extension optimized for serverless applications
  • Container
    • A container is a package that contains an application, libraries, runtime, and tools required to run it. A bundle that contains an application and all of it’s dependencies.
    • Run on a container engine like Docker
    • Provides the isolation benefits of virtualization with less overhead and faster starts than VMs
    • Containerized applications are portable and offer a consistent environment
  • Elastic Container Service (ECS) – A managed container orchestration service that lets you run and scale containerized applications. It eliminates the need to manage your own orchestration, tooling, or clusters. You can create clusters to manage fleets of container deployments using EC2 instances or Fargate instances. Additionally, it defines rules for CPU and memory requirements and monitors resource utilization (at the cluster level).
    • Cluster – Logical collection of ECS resources – either ECS EC2 instances or Fargate instances
    • Task Definition – Defines your application. Similar toa  Dockerfile but for running containers in ECS. Can contain multiple containers.
    • Container Definition – Inside a task definition, it defines the individual containers a task uses. Controls CPU and memory allocation and port mappings.
    • Task – Single running copy of any containers defined by a task definition. One working copy of an application (e.g. DB and wed containers)
    • Service – Allows task definitions to be scaled by adding tasks. Defines minimum and maximum values.
    • Registry – Storage for container images (e.g. Elastic Container Registry (ECR) or Docker Hub). Used to download images to create containers.
    • Fargate – Serverless compute engine for containers that works with both ECS and EKS.
      • Eliminates need to provision and manage servers
    • Elastic Kubernetes Service (EKS) – K8s is open-source software that lets you deploy and manage containerized applications at scale
      • Containers are grouped in pods (similar to task in ECS)
      • Supports EC2 and Fargate
    • Elastic Container Registry – The managed docker container registry in AWS. It allows you to store, manage, and deploy container images. It is integrated with ECS and EKS and works with on-premises deployments. Additionally, it is highly available and integrated with IAM. Lastly, you pay for storage and data transfer.