# Serverless

Serverless is a cloud operating model in which the provider manages the underlying servers while customers deploy applications or use services without provisioning and maintaining those servers.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/serverless-and-event-driven-design-principles

> Serverless shifts infrastructure operations to the cloud provider so engineers can focus on application behavior, data, and configuration. It can reduce operational work and align costs with usage, but scaling behavior, billing, execution limits, and customer responsibilities vary by service.

Practice exams covering Serverless: [AIF-C01 AWS Certified AI Practitioner](https://blowstack.com/practice-exams/aws-certified-ai-practitioner), [CLF-C02 AWS Certified Cloud Practitioner](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner), [DEA-C01 AWS Certified Data Engineer - Associate](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate), [DOP-C02 AWS Certified DevOps Engineer - Professional](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional), [SAA-C03 AWS Certified Solutions Architect - Associate](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate), [SAP-C03 AWS Certified Solutions Architect - Professional](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional).

## 6 key aspects of Serverless

Serverless removes server administration while preserving the need to design for workload fit, scaling limits, security, reliability, and cost.

1. **Provider-managed infrastructure**: The provider provisions and maintains the underlying servers. Engineers configure application-level resources instead of managing host operating systems and instance fleets.
2. **Multiple execution models**: Serverless includes functions, managed container execution, and supporting application services. Choose the model according to execution duration, packaging, runtime requirements, and operational needs.
3. **Service-specific elasticity**: Many serverless services adjust capacity to demand, but scaling remains subject to quotas and configuration. Container workloads may require explicit replica-scaling policies, and downstream systems must tolerate increased traffic.
4. **Usage-oriented billing**: Charges commonly reflect requests, execution duration, consumed capacity, or allocated resources. Scale-to-zero and zero idle compute charges are not universal properties, so evaluate each service's billing model.
5. **Resilient application design**: Store durable state outside replaceable execution environments. Use idempotent processing, bounded retries, and failure destinations or dead-letter queues where appropriate.
6. **Shared security and operational responsibility**: The provider manages infrastructure, but customers remain responsible for application security, permissions, data protection, and configuration. Monitoring, dependency updates, and cost controls are still necessary.

## Cloud services for Serverless

Amazon API Gateway can expose an API backed by AWS Lambda, while Amazon DynamoDB stores durable application state. Amazon SQS buffers background work so request handling does not depend on immediate completion of every task. Lambda can process short queue-driven operations, while AWS Fargate can run containerized workers or services that need longer execution or different runtime behavior. These services remove host administration, but engineers still configure permissions, retries, scaling limits, and monitoring. Queue consumers should tolerate duplicate delivery where applicable, and their throughput should be controlled to avoid overwhelming the database or other downstream dependencies.

- **[AWS Lambda](https://blowstack.com/tools/cloud-services-hub/aws-lambda)**: Runs functions without requiring customers to provision or maintain execution hosts. It suits API handlers, scheduled automation, and event processing, with a maximum execution duration of 15 minutes per invocation.
- **[AWS Fargate](https://blowstack.com/tools/cloud-services-hub/aws-fargate)**: Provides serverless compute for Amazon ECS tasks and Amazon EKS pods. It suits containerized services and jobs that need container-level packaging or longer execution, while customers configure resource requirements and workload scaling.
- **[Amazon API Gateway](https://blowstack.com/tools/cloud-services-hub/amazon-api-gateway)**: Provides managed API endpoints without requiring customers to operate API server infrastructure. It can route requests to Lambda and other backends, with authentication and throttling capabilities depending on the API type.
- **[Amazon DynamoDB](https://blowstack.com/tools/cloud-services-hub/amazon-dynamodb)**: Provides a serverless NoSQL database for durable application state without database server administration. On-demand capacity accommodates variable request traffic, while provisioned capacity offers explicitly configured throughput with optional automatic scaling.

## Serverless exam questions

Real practice exam questions on Serverless, with the correct answer and its explanation.

### Question 1 (AIF-C01)

**Question:**

A software company is building a documentation assistant using a foundation model in Amazon Bedrock. Each answer must respond to a user's current question, and the application must display portions of the answer as the model generates them rather than wait for the complete answer. Usage varies throughout the day. The company does not want to provision model-serving infrastructure or commit to dedicated model capacity. Assume the selected model supports the required capabilities. Which approach best meets these requirements?

**Correct answer:** Use Amazon Bedrock on-demand inference with streaming responses for each user question.

**Explanation:** On-demand inference supports requests triggered by current user activity without a commitment to dedicated model capacity. Streaming delivers portions of the generated answer incrementally. AWS manages the underlying model-serving infrastructure, combining online inference with a serverless operating model.

### Question 2 (DEA-C01)

**Question:**

A company runs operational analytics on a provisioned Amazon Redshift cluster. Queries arrive throughout the business day, but unpredictable 10-minute bursts require several times the normal query-processing capacity. The current cluster is sized for normal demand, so queries queue during these bursts.

The company is willing to migrate the warehouse. A data engineer must select a configuration that automatically increases compute capacity during bursts and reduces it afterward, without custom scaling automation. The normal operating capacity must not be sized for peak demand. Testing has established the compute capacity needed for both normal and peak workloads, and the necessary service quotas are available.

Which solution meets these requirements?

**Correct answer:** Migrate to Amazon Redshift Serverless. Set base capacity for normal demand and maximum capacity high enough to accommodate the tested peak workload.

**Explanation:** Redshift Serverless can automatically increase compute capacity as workload demand rises and reduce it as demand falls. A normal-demand base capacity and a sufficiently high maximum capacity allow this elasticity without sizing the normal operating capacity for peaks or implementing custom scaling automation.

### Question 3 (SAP-C03)

**Question:**

An insurer is refactoring the claims-review capability of a monolithic application. Other capabilities will remain unchanged. The replacement must validate a claim, request an external assessment, wait for the assessor's HTTPS callback, and then calculate a settlement. Assessments typically take 6–48 hours. Each validation or calculation operation requires less than 30 seconds of compute time.

The assessor immediately acknowledges each assessment request and later sends the result with a correlation identifier. The insurer can modify this integration to include an opaque callback token. The replacement must persist workflow progress, retry transient failures in individual processing steps, and route overdue assessments to manual review after 72 hours. Retried processing steps must not create duplicate business effects. The insurer does not want to manage compute hosts or pay for application compute that remains running while an assessment is pending.

Which design meets these requirements with the LEAST custom orchestration code?

**Correct answer:** Use an AWS Step Functions Standard Workflow with AWS Lambda functions for processing. Request the assessment through a Lambda task that uses the wait-for-task-token integration pattern, and pass the task token to the assessor. Have an authenticated callback handler complete the task when the result arrives. Configure task timeouts, Retry and Catch rules, and idempotency checks based on the claim and operation identifiers.

**Explanation:** A Standard Workflow durably maintains progress across a multi-day wait without keeping application compute running. The callback task remains pending until the assessor's result completes it. A task timeout and Catch path can route overdue assessments to manual review. Retry rules handle transient errors, while application-level idempotency checks prevent repeated task attempts from duplicating business effects.

### Question 4 (CLF-C02)

**Question:**

A development team has packaged a stateless application and its dependencies as a container image compatible with the AWS Lambda runtime interface. The application calculates a shipping quote in less than 2 seconds per request. The team wants to use event-driven function execution rather than operate a continuously running container service. Which recommendation meets these requirements without changing the application's packaging format?

**Correct answer:** Deploy the container image as an AWS Lambda function and invoke it for shipping-quote requests.

**Explanation:** Lambda supports deploying functions as compatible container images. The application can retain its packaging format while using Lambda's event-driven execution model instead of operating a continuously running container service.

### Question 5 (SAA-C03)

**Question:**

A manufacturer publishes equipment records continuously to an Amazon MSK topic. A data engineering team has Apache Spark transformation logic that flattens nested records, standardizes units, and removes invalid readings. The transformed records must be written to Amazon S3 within approximately 2 minutes of arrival under normal operating conditions. After a processing restart, the pipeline must resume from its saved processing progress. The team must not administer worker instances or maintain a compute cluster and wants to minimize changes to the Spark transformation logic.

Which solution best meets these requirements?

**Correct answer:** Implement an AWS Glue streaming ETL job that reads the MSK topic, applies the Spark transformations in micro-batches, and writes to Amazon S3. Configure an S3 checkpoint location and a processing window that supports the latency requirement.

**Explanation:** AWS Glue streaming ETL provides serverless Spark-based processing for sources including Amazon MSK. It can reuse the Spark transformation logic, process records in short micro-batches, and use checkpoints to recover processing progress after a restart without requiring the team to maintain worker instances or a cluster.

### Question 6 (DOP-C02)

**Question:**

A company uses an AWS Lambda function to submit verification jobs to an external provider. The provider immediately returns a job ID, completes verification 20 minutes to 2 hours later, and sends a signed callback containing the final result. A submission response does not indicate whether verification succeeded.

During demand spikes, thousands of verifications can be pending. The company must start fulfillment only after successful verification, route failed verifications to a rejection process, and route jobs with no final response within 3 hours to an exception process. The solution must retain a managed execution history for at least 30 days and must not keep compute running while waiting for the provider.

Which solution meets these requirements with the LEAST operational overhead?

**Correct answer:** Use a Standard Step Functions workflow with a Lambda callback task that uses .waitForTaskToken. Have the submission function durably associate the task token with the provider's job ID and then return. Have a callback-handler function validate the provider's signature and call SendTaskSuccess or SendTaskFailure with the associated token. Configure a 3-hour task timeout and catch failures and timeouts to route the workflow appropriately.

**Explanation:** A Standard workflow can durably suspend a callback task without keeping a Lambda invocation running. The submission function returns promptly, while the task remains pending until the authenticated callback handler supplies the task token. Success, failure, and timeout handling provide the required routing. Standard workflows retain execution history for 90 days after completion, satisfying the retention requirement.

## Practice Serverless in a full exam

Questions on Serverless in each practice exam, with every answer option and an explanation for each:

- [SAA-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-associate): 11 questions
- [AIF-C01](https://blowstack.com/practice-exams/aws-certified-ai-practitioner): 6 questions
- [DEA-C01](https://blowstack.com/practice-exams/aws-certified-data-engineer-associate): 6 questions
- [CLF-C02](https://blowstack.com/practice-exams/aws-certified-cloud-practitioner): 5 questions
- [SAP-C03](https://blowstack.com/practice-exams/aws-certified-solutions-architect-professional): 2 questions
- [DOP-C02](https://blowstack.com/practice-exams/aws-certified-devops-engineer-professional): 1 question

## What is Serverless

Serverless describes how infrastructure is operated, not the absence of servers. Physical and virtual servers still execute the workload, but the cloud provider manages their provisioning, maintenance, and replacement. Customers work with higher-level resources such as functions, container tasks, APIs, queues, and databases instead of administering individual hosts. The practical benefit is less infrastructure management, particularly for teams building applications with variable demand.

Serverless is broader than function as a service. Functions are one implementation, but managed container execution and services for messaging, storage, and workflow orchestration also apply the model. Conversely, running an application in a container does not automatically make it serverless. If the team must provision and patch the container hosts, it still manages server infrastructure.

AWS Lambda is appropriate for event-driven functions, such as processing an uploaded image, responding to an API request, or handling messages from a queue. AWS provisions execution environments and scales function execution within configured limits and service quotas. Each invocation has a maximum execution duration of 15 minutes, making Lambda unsuitable for a single uninterrupted job that must run longer. Functions can be packaged as container images, but they still follow Lambda's execution model rather than behaving like continuously running container services.

AWS Fargate is appropriate when an application should run as containers without managing the underlying compute instances. It supplies compute for Amazon ECS tasks and Amazon EKS pods. Examples include a continuously running web service, an existing containerized application, or a batch worker that needs longer execution than a function allows. Engineers still define container images, CPU and memory requirements, networking, permissions, and workload scaling. Fargate does not automatically determine how many application replicas are needed; scaling must be configured through the relevant orchestration mechanisms.

Consider an order-processing application. An API accepts an order and places a message on a managed queue. A Lambda function processes short tasks, while a Fargate task handles a lengthy document-generation job. A managed database stores order status. Durable state belongs in external storage because execution environments can be replaced, and local files should not be treated as durable shared storage. Where event delivery or retries can produce duplicates, handlers should be idempotent so repeated processing does not create duplicate charges or orders.

Serverless does not mean unlimited scaling, guaranteed zero idle cost, or automatic cost savings. Quotas, concurrency settings, database capacity, and downstream dependencies can restrict throughput. Some services can scale to zero, while continuously running containers and reserved execution capacity still incur charges. Compare total costs, including requests, execution time, provisioned resources, networking, logs, and supporting services. Steady, highly utilized workloads may be less expensive on other compute models.

The trade-offs include reduced host-level control, service-specific interfaces, startup latency, and more distributed troubleshooting. Teams must still secure application code, dependencies, identities, data, and configuration. They also need monitoring, retry policies, failure handling, and deployment controls. For exam scenarios, choose Lambda for short event-driven function execution and Fargate for container workloads that need managed compute without host administration; do not assume that every serverless option has the same scaling or billing behavior.

## Learn Serverless in lessons

13 short lessons on Serverless in 6 certification courses.

- AIF-C01: Serverless: on-demand inference compute (Premium), https://app.blowstack.com/lessons/serverless-on-demand-inference-compute-aif-c01
- DEA-C01: Serverless: execution and capacity tradeoffs (Premium), https://app.blowstack.com/lessons/serverless-execution-and-capacity-tradeoffs-dea-c01
- SAP-C03: Microservices and component delivery versus serverless (Premium), https://app.blowstack.com/lessons/microservices-and-component-delivery-versus-serverless-sap-c03
- CLF-C02: Serverless: choosing a compute execution model (Premium), https://app.blowstack.com/lessons/serverless-choosing-a-compute-execution-model-clf-c02
- SAA-C03: Containers and Serverless: packaging versus infrastructure management (Premium), https://app.blowstack.com/lessons/containers-and-serverless-packaging-versus-infrastructure-management-saa-c03
- DOP-C02: Serverless: scaling across service boundaries (Premium), https://app.blowstack.com/lessons/serverless-scaling-across-service-boundaries-dop-c02
