AWS ‐ CP ‐ Module 3 ‐ Serveless Computing - rFronteddu/general_wiki GitHub Wiki

Objectives

  • Describe the differences between unmanaged, managed, and serverless compute services in AWS.
  • Describe the customer and AWS responsibilities regarding serverless computing.

EC2 are VMs that you can provision on AWS. EC2 offers a great control and requires you to manage those instances over time. AWS is responsible for the security of the cloud while the Customer is responsible for the security in the cloud. Some responsibilities are shared such as network and firewall configurations, identity, access and more.

Unmanagedservices (like EC2): AWS takes care of physical infrastructure, you're responsible for setting up, securing, and maintaining the OS, network configurations, and applications on your instances. AWS only takes care of the physical hardware.

Managed: AWS handles much of the operational overhead, you might still need to perform some provisioning or configuration depending on the service.

Fully-managed services/serverless (such as lambda) eliminate the need to provision/manage servers. The underlying infrastructure is fully managed by AWS.

The term serverless means that your code runs on servers, but you do not need to provision or manage these servers. Serverless computing scales automatically and can adjust the applications' capacity by modifying the units of consumptions, such as throughput and memory.

AWS Lambda

  • Recall what Lambda is and its core functionality as a serverless compute service.
  • Identify the key components of Lambda, such as triggers, functions, and scaling.

AWS Lambda is serverless (also known as function as a service) compute service that runs code in response to events without the need to provision or manage servers. It automatically manages the underlying infrastructure, scaling resources based on the volume of requests. Charges apply only when your code is running. You can also run code for virtually any type of application or backend service, all with zero administration. The maximum duration of a Lambda is 15 minutes.

How AWS Lambda works 1 You upload your code to Lambda. 2 You set your code to trigger from an event source, such as AWS services, mobile applications, or HTTP endpoints. 3 Lambda runs your code only when triggered. 4 You pay only for the compute time that you use.

Lambda is ideal for building responsive, event-driven applications.

The key components of AWS Lambda are the function, triggers, and runtimes.

Containers

In AWS, you can also build and run containerized applications. Containers provide a reliable way to package your application’s code and dependencies into a single, portable unit, making them ideal for workflows that require high security, reliability, and scalability.

  • ECS - Elastic Container Service: streamlined and integrated orchestrator. It supports Docker containers.

    • With EC2: Ideal if you need control over infrastructure.
    • With Fargate: Serverless option-- no server management.
  • Amazon EKS: is a (more complex) fully managed Kubernetes orchestrator.

    • With EC2: Best for full control. Ideal for large, complex workloads.
    • With Fargate: Serverless option.
  • Amazon ECR -- Elastic Container Registry: Is a fully managed container image registry to store container images.

  • Containers can run in EC2 or Fargate. In EC2, you manage the VM that run the containers.

  • Fargate: is a serverless compute engine for containers (you do not need to provision or manage servers). Works both with both ECS and EKS. Fargate manages your server infrastructure for you. You pay only for the resources that are required to run your containers.

Putting it together:

  • Upload container image to ECR Choose an orchestration service (ECS or EKS)
  • Select compute platform to run your container (EC2 or Fargate)

Additional Compute Services

  • Describe how Elastic Beanstalk streamlines environment provisioning and management.
  • Explain how AWS Batch manages large-scale computing tasks and automatically adjusts resources based on demand.
  • Identify how Amazon Lightsail streamlines web application setup and management without the need for complex infrastructure.
  • Describe how AWS Outposts extends AWS services to on-premises environments, supporting hybrid cloud architectures.
  • Elastic Beanstalk: Fully managed service that streamlines deployment/management/scaling of web applications.

  • Batch: Fully manage service to run batch computing workloads.

  • Lightsail: Provides virtual private servers, storage, db, and networking at predictable monthly price. AWS experience without complexity of full Management Console.

  • Outpost: Fully managed hybrid cloud that extends AWS infra and service to on-premises data centers.

  • Containers on AWS: The AWS Containers Services page provides an overview of the AWS container offerings, including services for container image storage, orchestration, and compute. These offerings are designed to streamline the deployment and management of containerized applications.

  • Amazon Elastic Container Registry: The Amazon ECR is a fully managed service for storing, managing, and deploying container images securely at scale.

  • Amazon Elastic Container Service: Amazon ECS is a fully managed service that streamlines the deployment, management, and scaling of containerized applications on AWS.

  • Amazon Elastic Kubernetes Service: Amazon EKS is a fully managed Kubernetes service that streamlines running Kubernetes clusters on AWS and on premises. It automates infrastructure management and integrates with AWS networking, security, and storage services.

  • AWS Fargate: Fargate is a serverless compute engine for running containers without managing servers. It is integrated with Amazon ECS and Amazon EKS.

  • AWS Elastic Beanstalk: Elastic Beanstalk is a fully managed service for deploying and scaling web applications without managing infrastructure.

  • AWS Batch: AWS Batch is a fully managed service for efficiently running large-scale batch computing jobs on AWS.

  • What is Amazon Lightsail: Lightsail is a simplified cloud platform offering VPS, containers, and databases with predictable pricing.

  • What is AWS Outposts? AWS Outposts extends AWS infrastructure and services to on-premises locations for low-latency, local data processing.

  • Choosing a modern application strategy: The AWS Decision Guide for Modern Application Strategy helps organizations determine the most suitable development approach—serverless or Kubernetes—based on their operational model, team structure, and workload requirements.