Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

Serverless Patterns Collection

Submit a pattern
Filters (69 templates)
IaC Framework

Language

Services

Use serverless patterns to quickly build integrations using AWS SAM and CDK templates. Filter by pattern and copy the template directly into your application.

Created with SnapAmazon MQAWS Lambdaevent source mapping
Event driven Amazon MQ for ActiveMQ message processing using AWS Lambda

This sample project demonstrates event driven message processing from an Amazon MQ for ActiveMQ queue using an AWS Lambda function written in Java.

Created with SnapApplication Load BalancerAWS Fargate
Deploying Spring Boot App on Amazon ECS/AWS Fargate with Application Load Balancer

This sample project deploys a Java 21 Spring Boot App on Amazon ECS Fargate with Application Load Balancer to route traffic between two ECS Tasks.

Created with SnapAPI Gateway HTTP APIAmazon EventBridge
API Gateway HTTP API to Amazon EventBridge

Create an HTTP API endpoint that directly integrates with Amazon EventBridge

Created with SnapAPI Gateway REST APIAWS Lambda
Amazon API Gateway canary deployment

Create a serverless app using API Gateway and Lambda. Then create an API Gateway canary deployment

Created with SnapVPCHTTP APIAWS LambdaRDS proxy instanceAmazon Aurora
Amazon API Gateway HTTP API to AWS Lambda to RDS Proxy

Create an HTTP API endpoint that calls a Lambda function to RDS Proxy.

Created with SnapAmazon API Gateway HTTP APIAWS Step Functionssynchronous Express Workflow
Amazon API Gateway HTTP API to AWS Step Functions Express Workflow

Create an API Gateway HTTP API endpoint that starts a Step Functions synchronous Express Workflow.

Created with SnapAPI Gateway REST APIAWS LambdaAmazon Bedrock
Amazon API Gateway to AWS Lambda to Amazon Bedrock

Make a request to Bedrock via API Gateway using Java and CDK

Created with SnapAPI Gateway REST APIAWS LambdaAmazon Bedrock
Invoking Amazon Bedrock Mistral 7B LLM using Java based AWS Lambda

This project deploys an Amazon API Gateway REST API with an AWS Lambda, written in Java, to call Amazon Bedrock API for Mistral 7B Instruct V0.2.

Created with SnapAmazon API GatewayAWS LambdaAmazon Cognito
Amazon Cognito user management using Amazon API Gateway and AWS Lambda

Deploys Amazon Cognito user pool, Amazon API Gateway REST API with AWS Lambda integration for user creation, confirmation & token retrieval in Java.

Created with SnapAPI GatewayAWS LambdaAmazon DynamoDB
Amazon API Gateway to AWS Lambda to Amazon DynamoDB

Make a request to API Gateway that saves data in DynamoDB.

Created with SnapAmazon API GatewayAWS LambdaAmazon EventBridgeAWS LambdaEventRule
Amazon API Gateway to AWS Lambda to Amazon EventBridge

Make a request to API Gateway that sends an event to EventBridge via Lambda.

Created with SnapAPI GatewayAWS LambdaMemoryDB
Lambda to MemoryDB

Create Lambda Functions to interact with MemoryDB.

Created with SnapVPCREST APIAWS LambdaRDS Postgres
REST API with Amazon API Gateway, Amazon RDS and AWS Lambda with SnapStart

A pattern to show how to use Lambda SnapStart with relational databases.

Created with SnapAmazon API GatewayAWS LambdaAmazon S3
Upload file up to 5GB to Amazon S3 bucket using presigned URL

This project deploys Amazon API Gateway with AWS Lambda integration. The Java based Lambda function generates presigned S3 URL.

Created with SnapAmazon API GatewayAWS LambdaAmazon S3 Bucket
Upload file to Amazon S3 bucket using presigned URL

Amazon API Gateway with AWS Lambda integration to showcase how to upload a file up to 5GB to Amazon S3 bucket using a presigned S3 URL.

Created with SnapAPI GatewayAWS Lambda with SnapStartAmazon DynamoDB
API Gateway to Lambda with SnapStart deployed with Terraform

Create a Java Lambda function with SnapStart deployed with Terraform

Created with SnapAmazon API GatewayAWS LambdaAmazon DynamoDB
Synchronous REST API with Lambda SnapStart

This pattern demonstrates how to create a synchronous REST API using API Gateway, AWS Lambda and DynamoDB.

Created with SnapAmazon API Gateway REST APIAWS Lambda
Hello World AWS Lambda and Amazon API Gateway REST API

Create a simple Lambda function connected to a REST API.

Created with SnapAPI GatewaySQSLambda
API Gateway HTTP API to SQS to Lambda

Create an Amazon API Gateway HTTP API that integrates with an Amazon SQS queue.

Created with SnapAPI Gateway WebSocket APISQSAWS Lambda
API Gateway WebSocket API to SQS to AWS Lambda

Create an API Gateway WebSocket API that sends events to SQS and then to Lambda

Created with SnapAmazon EventBridgeAWS Step FunctionsAmazon SQS
EventBridge to Step Functions with SQS failure

Step Functions workflow to send failure events to SQS

Created with SnapAmazon Kinesis Data StreamsAWS Lambda
Kinesis Data Stream to Lambda with error handling

Create a Java Lambda function with Event Source as Kinesis Data source

Created with SnapCloudFrontLambda URLs
CloudFront to Lambda URLs

Front AWS Lambda Function URLs with Amazon CloudFront

Created with SnapAmazon DynamoDBAWS Lambda
DynamoDB Stream to AWS Lambda using CDK in Kotlin

Create an AWS Lambda function that receives DynamoDB change items.

Created with SnapAmazon DynamoDBAWS LambdaEventBridge
DynamoDB to Lambda to EventBridge

Send DynamoDB table changes to EventBridge via Lambda.

Created with SnapAmazon DynamoDBAWS Lambda
DynamoDB to Lambda

Invoke a Lambda function from changes to a DynamoDB table using event-based filters

Created with SnapAmazon EventBridgeAmazon CloudWatch Logs
Amazon EventBridge to Amazon CloudWatch Logs

Create an EventBridge rule that sends events to CloudWatch Logs.

Created with SnapAmazon EventBridgeAmazon Kinesis FirehoseAmazon S3
Amazon EventBridge to Amazon Data Firehose to Amazon S3 using Java CDK

Sets up EventBridge, Data Firehose, and a S3 bucket for event delivery with dynamic partitioning based on metadata.

Created with SnapAmazon SQSAmazon EventBridge PipesAmazon EventBridge
Amazon SQS to Amazon EventBridge Bus using Amazon EventBridge Pipes

This pattern uses SQS and triggers EventBridge events directly with optional filtering supported.

Created with SnapAmazon SQSAmazon EventBridge PipesAWS Step Functions
Amazon SQS to AWS Step Functions using Amazon EventBridge Pipes

This pattern invokes a Step Functions workflow from an SQS queue with optional filtering supported.

Created with SnapAmazon EventBridge Schedulerecs
Amazon EventBridge Scheduler to run Amazon Elastic Container Service task

Simple pattern that create an Amazon EventBridge Scheduler to run task in Amazon Elastic Container Service cluster every 15 minutes.

Created with SnapAmazon EventBridge SchedulerAWS Lambda
Amazon EventBridge Scheduler to AWS Lambda

Creates an EventBridge schedule to invoke a Java-based Lambda function every 5 minutes

Created with SnapAmazon EventBridge SchedulerAWS Lambda
Amazon EventBridge Schedule to Lambda

Creates an EventBridge schedule to run a Lambda every 5 minutes

Created with SnapAmazon EventBridge SchedulerAWS Lambda
Amazon EventBridge Schedule to Lambda

Creates an EventBridge schedule to run a Lambda every 5 minutes

Created with SnapAmazon EventBridge SchedulerAmazon SNS
Amazon EventBridge Scheduler to send messages to Amazon SNS

Simple pattern that publishes a message to an SNS topic every 5 minutes

Created with SnapEventBridgeAWS LambdaSchedule
Scheduled EventBridge rule for Lambda

Create an scheduled EventBridge rule that invokes a Lambda function

Created with SnapAmazon EventBridge SchedulerSystems Manager State Manageronceevery 5 mins
EventBridge Scheduler to Start State Manager Association

This pattern will create an EventBridge Scheduler to start State Manager Association once in AWS Systems Manager every 5 minutes.

Created with SnapAmazon EventBridgeAmazon SNS
Amazon EventBridge to Amazon SNS

Create an Amazon EventBridge rule that invokes an Amazon SNS topic.

Created with SnapKinesis FirehoseAWS LambdaKinesis Firehose
Kinesis Firehose Data transformation with Lambda

Transform incoming source data and deliver the transformed data to destinations.

Created with SnapKinesis Data FirehoseLambdaKinesis Data FirehoseS3
Kinesis Firehose Data Transformation with Lambda

Transform incoming source data and deliver the transformed data to S3.