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 (106 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 MQ for RabbitMQ Region 1Amazon MQ for RabbitMQ Region 2Message federation
Multi-Region message replication with Amazon MQ for RabbitMQ

Replicate messages from one Region to another in Amazon MQ for RabbitMQ

Created with SnapApplication Load BalancerAWS Lambda
Application Load Balancer to Lambda

Create an Application Load Balancer with Lambda as target using Terraform

Created with SnapApplication Load BalancerAWS LambdaAWS Lambdarule:(api/service1)rule:(api/service2)
Application Load Balancer (path-based-route) to AWS Lambda

Create an Application Load Balancer with path-based routing using AWS Lambda as target

Created with SnapAmazon EventBridge ruleAWS LambdaAmazon EC2
AMI de-registration with AWS Lambda and retention in Amazon EC2 Recycle Bin

This project demonstrates a pattern to deregister and retain expired AMI and its snapshot with AWS Lambda and Amazon EC2 Recycle Bin

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 APIAmazon EventBridge
API Gateway REST API to Amazon EventBridge

Create an REST API endpoint that directly integrates with Amazon EventBridge

Created with SnapAmazon API Gateway REST APIAWS LambdaAmazon BedrockAmazon S3
Serverless Text-to-Image Generation with Amazon Bedrock Nova Canvas

Serverless text-to-image generation using Amazon API Gateway, AWS Lambda and Amazon Bedrock's Nova Canvas model for submitting prompts and S3 storage for images.

Created with SnapAmazon API Gateway REST APIAWS Lambdavalidate
Amazon API Gateway data validation

Creates an Amazon API Gateway with request validation, rejecting invalid requests before AWS Lambda invocation using model schema validation.

Created with SnapAPI GatewayAmazon DynamoDB
API Gateway REST API to DynamoDB

Create an Amazon API Gateway REST API that integrates with an Amazon DynamoDB table

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 SnapAWS WAFAmazon CloudFrontAmazon API GatewayAWS LambdaLambda@EdgeAuthorizerGet unique keyRetrieve unique key for headerValidate key
Protect Amazon API Gateway with Amazon CloudFront and AWS WAF

Provision an Amazon API Gateway (with Amazon CloudFront and AWS WAF) using Terraform

Created with SnapAPI Gateway HTTP APIAWS Lambda
Amazon API Gateway HTTP API to AWS Lambda

Creates an Amazon API Gateway HTTP API and an AWS Lambda function

Created with SnapAPI Gateway REST APIAWS LambdaAmazon Bedrock
Serverless Generative AI with Amazon Bedrock Nova Micro

This pattern demonstrates how to create a serverless API leveraging Amazon Bedrock Nova Micro through AWS Lambda.

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

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

Created with SnapAPI GatewayAWS LambdaQLDB
API Gateway to Lambda to QLDB

Create an API Gateway REST API that uses a Lambda function to call QLDB

Created with SnapAmazon S3(presigned URL)AWS LambdaAmazon RekognitionAmazon SNS
Content safety image moderation using Amazon S3 and AWS Lambda

Securely upload images to Amazon S3 and detect inappropriate content with Amazon Rekognition

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 S3AWS LambdaAmazon TranscribeAmazon S3
Subtitle generation using Amazon API Gateway and AWS Lambda

This pattern creates an AWS Lambda function which will invoke Amazon Transcribe for speech-to-text conversion, and stores results in Amazon S3

Created with SnapAmazon API GatewayAWS LambdaAmazon DynamoDB
Amazon API Gateway to AWS Lambda using OpenAPI

Create a Lambda backed REST API using OpenAPI specification, with Lambda Powertools

Created with SnapAmazon API Gateway
Amazon API Gateway with a HTTP integration in Terraform

Create a REST API Gateway with a public HTTP endpoint integration

Created with SnapAPI Gateway REST APIAWS Step FunctionsAmazon DynamoDB
Amazon API Gateway, AWS Step Functions, to Amazon DynamoDB CRUD API

Create a CRUD API with AWS Step Functions.

Created with SnapAPI GatewaySQS
API Gateway HTTP API to SQS

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

Created with SnapAPI GatewayVPC LinkApplication Load BalancerAWS Fargate
API Gateway to Private ALB and ECS Cluster via VPC Link

Create an API Gateway endpoint to an ECS Fargate cluster.

Created with SnapAmazon API GatewayAmazon SNS
API WebSocket to SNS with request validation

Create a WebSocket API to send notification via SNS topic with request validation

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 SnapElastic Container Service
Enabling Service Discovery for AWS Fargate

Provision Amazon Elastic Container Service (ECS) resources and deploy ECS service with integration of Cloud Map

Created with SnapAmazon CloudWatchAmazon Kinesis FirehosemetricsAmazon S3metrics
Amazon CloudWatch Metric Streams to Amazon Data Firehose

Create CloudWatch Metric stream using Amazon Data Firehose and save them in Amazon S3

Created with SnapAmazon EventBridgeAWS LambdaScheduleAmazon EventBridgeUserCreated24 Hours Later
Delayed Amazon EventBridge events with Amazon EventBridge Scheduler

Setup future Amazon EventBridge events with Amazon EventBridge Scheduler

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 DynamoDBAWS Lambda
DynamoDB to Lambda

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

Created with SnapAmazon DynamoDBAmazon DynamoDB StreamsAWS Lambda
Amazon DynamoDB Stream to AWS Lambda with filters

This pattern demonstrates how a Lambda function can get triggered when there is a new event in a DynamoDB stream using filters.

Created with SnapEventBridgeCloudWatch Logs
EventBridge to CloudWatch Logs

Create an EventBridge rule that sends events to CloudWatch Logs

Created with SnapAmazon EventBridge (Central)Amazon EventBridge (Fan-in)
Amazon EventBridge fan-in

Aggregate events from multiple EventBridge event busses to a central bus

Created with SnapEventBridgeAWS LambdaAmazon SNS
EventBridge to Lambda to SNS

Create an EventBridge rule with SNS topic as target which has a Lambda function as subscription.

Created with SnapEventBridgeAWS Lambda
EventBridge to Lambda

This pattern creates a Lambda function that publishes an event to EventBridge.

Created with SnapAmazon DynamoDB StreamsAmazon EventBridge PipesAmazon SQS
Amazon DynamoDB Streams to Amazon SQS queue using Amazon EventBridge Pipes

This pattern creates an Amazon EventBridge Pipe to deliver messages from an Amazon DynamoDB Stream to Amazon SQS.

Created with SnapAmazon DynamoDBAmazon EventBridge PipesAWS Step FunctionsStream
Amazon DynamoDB Stream to AWS Step Functions

Invoke AWS Step Functions workflow from a Amazon DynamoDB stream message

Created with SnapAmazon SQSAmazon EventBridge PipesAWS Step Functions
Invoke AWS Step Functions state machine from Amazon SQS messages using Amazon EventBridge Pipes

This pattern shows how to use Amazon EventBridge Pipes to launch an AWS Step Functions state machine with a message coming from an Amazon SQS Queue.

Created with SnapAmazon SQS queueAmazon EventBridge PipeAmazon EventBridge Bus
Amazon SQS to Amazon EventBridge event bus using Amazon EventBridge Pipes

This pattern creates an Amazon EventBridge Pipe to deliver messages from an Amazon SQS queue to Amazon EventBridge Event Bus.