This repository contains sample projects that can be deployed on your local machine using LocalStack Pro.
Each example in the repository is prefixed with the name of the AWS service being used. For example, the elb-load-balancing
directory contains examples that demonstrate how to use the Elastic Load Balancing service with LocalStack. Please refer to the sub directories for more details and instructions on how to start the samples.
- Docker
awslocal
CLI- Serverless
- Terraform
make
&jq
Some of the samples require LocalStack Pro features. Please make sure to properly configure the LOCALSTACK_API_KEY
environment variable. You can find your API key in the LocalStack Pro dashboard and you can refer to our API key documentation for more details.
Sample Name | Description |
---|---|
Serverless Websockets | API Gateway V2 websocket APIs deployed via the Serverless framework |
RDS Database Queries | Running queries locally against an RDS database |
Neptune Graph Database | Running queries locally against a Neptune Graph database |
Lambda Event Filtering | Lambda event source filtering with DynamoDB and SQS |
Glacier & S3 select queries | Using Glacier API and running S3 Select queries locally |
Cloudwatch Metrics alarm | Triggering a Cloudwatch metrics alarm based on a failing Lambda |
EC2 with Docker backend | Running EC2 instances with Docker backend |
QLDB ledger queries | Running queries locally against a QLDB ledger |
Cognito with JWT | Running Cognito authentication and user pools locally |
Transfer API with S3 | Using the Transfer API to upload files to S3 |
Codecommit with Git repository | Using the Codecommit API to create and push to a Git repository |
Lambda Mounting and Debugging | Debugging Lambda functions locally |
IAM Policy Enforcement | Enforcement of IAM policies when working with local cloud APIs |
Lambda Hot Reloading | Hot reloading Lambda functions locally |
IoT Basics | Usage of IoT APIs locally |
REST API using Chalice | Deploying a REST API using the Chalice framework |
ECS ECR Container application | Pushing Docker images to ECR and running them locally on ECS |
Athena queries over S3 | Running Athena queries over S3 files locally |
Terraform resources | Deploying various AWS resources via Terraform |
Lambda Function URLs | Invoking Lambda functions via HTTP(s) URLs |
Sagemaker inference | Creating & invoking a Sagemaker endpoint locally with MNIST dataset |
MSK with Glue Schema Registry | Use of MSK, Glue Schema Registry, Glue ETL, and RDS |
AppSync GraphQL | Deploying a GraphQL API using AppSync |
Lambda XRay tracing | Using Lambda XRay tracing locally |
Mediastore Uploads | Using MediaStore API locally |
Serverless Lambda Layers | Using Lambda layers locally deployed via the Serverless framework |
Java Notification App | Notification app using AWS Java SDK, SNS, SQS, SES, deployed via CloudFormation |
Lambda Container images | Deploying Lambda functions as container images |
Glue crawler with RedShift | Glue Crawler to populate the Glue metadata store with the table schema of RedShift database tables |
API Gateway custom domain | Using API Gateway v2 endpoints using custom domain names, deployed via the Serverless framework |
CDK resources | Deploying various AWS resources via CDK |
Glue for ETL jobs | Using Glue API to run local ETL jobs |
Message Queue broker | Using MQ API to run local message queue brokers |
ELB Load Balancing | Using ELBv2 Application Load Balancers locally, deployed via the Serverless framework |
Reproducible ML | Train, save and evaluate a scikit-learn machine learning model using AWS Lambda and S3 |
To check out a single sample, you can use the following commands:
mkdir localstack-samples && cd localstack-samples
git init
git remote add origin -f git@github.com:localstack/localstack-pro-samples.git
git config core.sparseCheckout true
echo <LOCALSTACK_SAMPLE_DIRECTORY_NAME> >> .git/info/sparse-checkout
git pull origin master
The above commands use sparse-checkout
to only pull the sample you are interested in. You can find the name of the sample directory in the table above.