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 (27 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 SnapApplication Load BalancerAWS FargateAmazon Bedrock
AI-Powered ChatBot with Bedrock Agent, OpenSearch, and ECS

Create a serverless AI ChatBot using Bedrock agent, OpenSearch, Lambda, and ECS with ALB in AWS.

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 WebSocket APIApplication Load BalancerAWS Fargate
WebSocket API integration with ALB and Amazon ECS

Creates a WebSocket API and integrates with ECS Fargate using ALB.

Created with SnapAPI GatewayAWS Fargate
API Gateway to AWS Fargate

Create an API Gateway endpoint to access an AWS Fargate service

Created with SnapVPCAmazon CognitoAPI GatewayVPC LinkAWS Fargate
Cognito to API Gateway private REST API

Create an API Gateway private REST API with private integration.

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 SnapAPI GatewayVPC LinkApplication Load BalancerAWS Fargate
API Gateway to ECS Fargate cluster

Create an API Gateway endpoint to an ECS Fargate cluster.

Created with SnapAmazon API GatewayVPC LinkNLBAWS Fargate
Amazon API Gateway to AWS Fargate via VPC Link and Network Load Balancer

This pattern connects a public API Gateway to a private Network Load Balancer to ECS Fargate cluster. It keeps the private subnet resources safe.

Created with SnapPrimary Cluster AWS FargatePrimary RegionSecondary RegionPrimary Amazon Auroraread/writeSecondary Cluster AWS FargateSecondary Amazon Aurorareadread
Amazon Aurora Serverless Primary to Secondary Global Database

Create an Aurora Serverless Global database to replicate across regions

Created with SnapAWS FargateAurora Serverless
AWS Fargate to Aurora Serverless

Create an AWS Fargate service that interacts with Aurora Serverless

Created with SnapAWS FargateAmazon DynamoDB
AWS Fargate to DynamoDB

Create an AWS Fargate service that puts to DynamoDB

Created with SnapAWS FargateEventBridge
AWS Fargate to Amazon EventBridge

Create an AWS Fargate service that sends events to EventBridge

Created with SnapAWS FargateS3
AWS Fargate to Amazon S3

Create an AWS Fargate service that reads and writes to S3

Created with SnapAWS FargateSecrets Manager
Secrets Manager with Fargate

Use AWS Secrets Manager to inject secrets into AWS Fargate Containers.

Created with SnapAWS FargateStep Functions
AWS Fargate to AWS Step Functions

Create an AWS Fargate service that invokes Step Functions

Created with SnapAWS FargateSNSSQS
AWS Fargate to SNS to SQS

Create an AWS Fargate service that sends to SNS then SQS

Created with SnapAWS FargateSNS
AWS Fargate to Amazon SNS

Create an AWS Fargate service that interacts with SNS

Created with SnapAWS FargateSQS
AWS Fargate to Amazon SQS

Create an AWS Fargate service that interacts with SQS

Created with SnapAWS FargateSQS
AWS Fargate to Amazon SQS

Create an AWS Fargate service that interacts with SQS

Created with SnapAWS Fargate
AWS Fargate

Deploying an AWS Fargate service

Created with SnapVPCAmazon CognitoAPI GatewayVPC LinkAWS Fargate
Cognito to API Gateway private REST API

This pattern shows how to authenticate and authorize requests to a private REST API Gateway with Amazon Cognito.

Created with SnapAmazon EventBridgeAWS Fargate
Schedule Jobs with AWS Fargate

Create a scheduled AWS Fargate Task running on AWS ECS Cluster and EventBridge Rule using Serverless Framework

Created with SnapCentral API GatewayVPC LinkAPI GatewayAWS LambdaAPI GatewayVPC LinkAWS Fargate
Multi-Account Setup with Private API Gateway

Create Private REST API Gateway in multiple accounts and integrate with the central account

Created with SnapRoute53ALBFargate
Route53 to ALB to ECS Fargate

This pattern shows how to deploy a containerized Web API as an ECS fargate service, and expose it with a custom domain using Route53

Created with SnapAmazon S3Amazon EventBridgeAWS FargateEventRule
Amazon S3 to AWS Fargate

Start an AWS Fargate Task when a file is uploaded to S3

Created with SnapStep FunctionsAWS Fargate
Manage a container task

This workflow uses Step Functions to trigger a SNS notification on success or failure of a Fargate task.

Created with SnapAWS Step FunctionsAWS LambdaAWS Fargate
AWS Step Functions to AWS Lambda or Amazon ECS

Create a Step Functions workflow to invoke either a Lambda function or ECS Fargate task.