Skip to main content

Serverless Architecture

Event Driven AWS Lambda

Overview

Serverless architecture with AWS Lambda is an event-driven approach in which functions are executed in response to events from AWS services. These functions are Plain Old Java Objects (POJOs). that focus purely on business logic. When there are no incoming events, no functions are active. This results in zero compute costs.

The BCE pattern naturally fits serverless: Lambda handlers act as Boundaries receiving events, Controls process business logic as stateless operations, and Entities represent domain-specific event data extracted from AWS service payloads.

Business Components

Each Lambda function represents a cohesive business component organized in a BCE structure. Components are named after their domain responsibilities (e.g., order processing, payment handling, notification delivery).

The package structure follows: airhacks.[app-name].[component-name].[boundary|control|entity], ensuring clear separation of concerns and maintainable event-driven microservices.

Boundary

Lambda handler classes serving as the entry point for AWS events (EventBridge, SNS, SQS, etc.)

Control

Business logic processors implementing event handling workflows

Entity

Domain-specific event representations extracted from AWS events

Implementation Characteristics

Serverless Design Principles

Deployment with CDK

Testing Strategy

Documentation

Resources

Examples & References