# Serverless and application integration

Lambda, API Gateway, SQS, SNS, Step Functions and EventBridge — what "serverless" means on the exam and where each service belongs.

Foundational notes for **AWS Certified Cloud Practitioner (CLF-C02)**. Read them in order the first time through, then use them as a revision sweep before you book.

**11 study points.** Everything here is exam-oriented: each point is a fact or a distinction that CLF-C02 items are built on. Test yourself against the [practice exam](/aws/practice-exam/) once you can explain a section without re-reading it.

## Serverless

Serverless computing means you run code without provisioning or managing any servers. AWS takes care of the infrastructure, scaling, patching, and availability for you. You simply write your application logic and deploy it. The name "serverless" doesn't mean there are no servers; it means you never have to think about them. This lets developers focus entirely on building features rather than managing infrastructure.

AWS Lambda is the core serverless compute service on AWS. It runs your code in response to events, such as an HTTP request, a file upload to S3, or a message arriving in an SQS queue. You upload your function code, define a trigger, and Lambda handles everything else, including scaling to handle thousands of concurrent requests. You pay only for the compute time your function actually consumes, measured in milliseconds, making it extremely cost-effective for intermittent workloads.

AWS Elastic Beanstalk is a Platform-as-a-Service that makes it easy to deploy and manage applications written in Java, .NET, Python, Node.js, PHP, Ruby, Go, and Docker. You upload your code and Beanstalk automatically handles capacity provisioning, load balancing, auto-scaling, and health monitoring. While it abstracts away much of the infrastructure complexity, you still retain full control over the underlying AWS resources if you need to customize them.

Amazon API Gateway is a fully managed service for creating, publishing, and managing RESTful and WebSocket APIs at any scale. It acts as the "front door" for your backend services, whether they run on Lambda, EC2, or any web application. API Gateway handles throttling, authorization, monitoring, and versioning. For example, if you build a mobile app that calls a Lambda function, API Gateway provides the HTTPS endpoint that the app communicates with.

AWS Step Functions lets you coordinate multiple AWS services into serverless workflows using visual state machines. Instead of writing complex code to manage the flow between Lambda functions, Step Functions provides a drag-and-drop interface where you define each step, its inputs, outputs, and error handling. For example, an order processing workflow might include steps for validating payment, updating inventory, and sending a confirmation email, all orchestrated by Step Functions.

Amazon DynamoDB, while discussed in the Database section, is also a key part of the serverless ecosystem. Because it scales automatically and requires no server management, it pairs naturally with Lambda and API Gateway to build fully serverless applications. A common pattern is: API Gateway receives a request, triggers a Lambda function, which reads or writes data to DynamoDB. This entire stack requires zero server management and scales from zero to millions of requests.

AWS SAM (Serverless Application Model) is an open-source framework that simplifies building and deploying serverless applications. It extends CloudFormation with a simplified syntax specifically designed for Lambda functions, API Gateway endpoints, and DynamoDB tables. With a SAM template and a single command, you can package and deploy your entire serverless application. This makes it much easier to manage serverless projects as they grow in complexity.

Amazon EventBridge is a serverless event bus service that makes it easy to connect applications using events from your own apps, SaaS providers, or AWS services. It allows you to build event-driven architectures where components react to changes rather than constantly polling for updates. For example, when a new customer signs up in your SaaS application, EventBridge can trigger a Lambda function to send a welcome email and another to update your analytics dashboard.

Amazon SNS (Simple Notification Service) is a serverless pub/sub messaging service that delivers messages to subscribing endpoints. It can push notifications to SMS, email, Lambda functions, SQS queues, and HTTP endpoints, but notably does not support FTP. SNS is commonly used to fan out notifications to multiple subscribers simultaneously. For example, when an order is placed, SNS can notify the shipping system, the billing system, and the customer via email all at once.

AWS Fargate, while mentioned in Compute, is also a serverless technology because it lets you run containers without managing any EC2 instances. Combined with ECS or EKS, Fargate provides a serverless container experience. If your application is already containerized with Docker but you don't want to manage a Kubernetes cluster or EC2 fleet, Fargate is the bridge between traditional containers and fully serverless architectures.

The key benefit of serverless is that it shifts operational responsibility almost entirely to AWS. You don't patch operating systems, you don't manage capacity, and you don't pay for idle resources. However, serverless does come with trade-offs: cold starts can add latency to infrequently called Lambda functions, there are execution time limits (15 minutes for Lambda), and debugging distributed serverless applications can be more complex. Understanding these trade-offs helps you decide when serverless is the right choice.

---

## Where to go next

- Back to the [AWS Cloud Practitioner overview](/aws/cloud-practitioner/).
- Look up any service you could not name in the [AWS services glossary](/aws/services-glossary/).
- Sit the [80-item practice exam](/aws/practice-exam/) once two or three note pages are solid.
