|
| 1 | +# LocalStack AWS Samples |
| 2 | + |
| 3 | +A collection of AWS sample applications that can be deployed and tested with [LocalStack](https://localstack.cloud). |
| 4 | + |
| 5 | +Each sample includes up to four Infrastructure-as-Code deployment methods: |
| 6 | +- **Scripts** — AWS CLI shell scripts |
| 7 | +- **Terraform** — HashiCorp Terraform configurations |
| 8 | +- **CloudFormation** — AWS CloudFormation templates |
| 9 | +- **CDK** — AWS Cloud Development Kit apps |
| 10 | + |
| 11 | +## Samples |
| 12 | + |
| 13 | +| Sample | Language | Scripts | Terraform | CloudFormation | CDK | |
| 14 | +|--------|----------|---------|-----------|----------------|-----| |
| 15 | +| [apigw-custom-domain](apigw-custom-domain/) | python | ✓ | ✓ | ✓ | ✓ | |
| 16 | +| [apigw-websockets](apigw-websockets/) | javascript | ✓ | ✓ | ✓ | ✓ | |
| 17 | +| [appsync-graphql-api](appsync-graphql-api/) | python | ✓ | ✓ | ✓ | ✓ | |
| 18 | +| [athena-s3-queries](athena-s3-queries/) | python | ✓ | ✓ | ✓ | ✓ | |
| 19 | +| [cdk-for-terraform](cdk-for-terraform/) | — | | | | | |
| 20 | +| [cdk-resources](cdk-resources/) | javascript | | | | | |
| 21 | +| [chalice-rest-api](chalice-rest-api/) | python | ✓ | ✓ | ✓ | ✓ | |
| 22 | +| [cloudwatch-metrics-aws](cloudwatch-metrics-aws/) | python | ✓ | ✓ | ✓ | ✓ | |
| 23 | +| [codecommit-git-repo](codecommit-git-repo/) | python | ✓ | ✓ | | | |
| 24 | +| [cognito-jwt](cognito-jwt/) | python | ✓ | ✓ | ✓ | ✓ | |
| 25 | +| [ec2-docker-instances](ec2-docker-instances/) | python | ✓ | ✓ | ✓ | ✓ | |
| 26 | +| [ecs-ecr-app](ecs-ecr-app/) | python | ✓ | ✓ | ✓ | ✓ | |
| 27 | +| [elb-load-balancing](elb-load-balancing/) | javascript | ✓ | ✓ | ✓ | ✓ | |
| 28 | +| [emr-serverless-python-dependencies](emr-serverless-python-dependencies/) | python | | | | | |
| 29 | +| [emr-serverless-spark](emr-serverless-spark/) | java | ✓ | ✓ | ✓ | ✓ | |
| 30 | +| [glacier-s3-select](glacier-s3-select/) | python | ✓ | ✓ | ✓ | ✓ | |
| 31 | +| [glue-etl-jobs](glue-etl-jobs/) | python | ✓ | ✓ | ✓ | ✓ | |
| 32 | +| [glue-msk-schema-registry](glue-msk-schema-registry/) | python | ✓ | ✓ | ✓ | ✓ | |
| 33 | +| [glue-redshift-crawler](glue-redshift-crawler/) | python | ✓ | ✓ | ✓ | ✓ | |
| 34 | +| [iam-policy-enforcement](iam-policy-enforcement/) | python | ✓ | ✓ | ✓ | ✓ | |
| 35 | +| [iot-basics](iot-basics/) | python | ✓ | ✓ | ✓ | ✓ | |
| 36 | +| [lambda-cloudfront](lambda-cloudfront/) | python | ✓ | ✓ | ✓ | ✓ | |
| 37 | +| [lambda-container-image](lambda-container-image/) | python | ✓ | ✓ | ✓ | ✓ | |
| 38 | +| [lambda-debugging-sam-java](lambda-debugging-sam-java/) | — | | | | | |
| 39 | +| [lambda-debugging-sam-javascript](lambda-debugging-sam-javascript/) | — | | | | | |
| 40 | +| [lambda-debugging-sam-python](lambda-debugging-sam-python/) | python | | | | | |
| 41 | +| [lambda-debugging-sam-typescript](lambda-debugging-sam-typescript/) | — | | | | | |
| 42 | +| [lambda-event-filtering](lambda-event-filtering/) | javascript, python | ✓ | ✓ | ✓ | ✓ | |
| 43 | +| [lambda-function-urls](lambda-function-urls/) | javascript, python | ✓ | ✓ | ✓ | ✓ | |
| 44 | +| [lambda-layers](lambda-layers/) | javascript | ✓ | ✓ | ✓ | ✓ | |
| 45 | +| [lambda-php-bref-cdk-app](lambda-php-bref-cdk-app/) | javascript | | | | | |
| 46 | +| [lambda-s3-http](lambda-s3-http/) | python | ✓ | ✓ | ✓ | ✓ | |
| 47 | +| [lambda-xray](lambda-xray/) | python | ✓ | ✓ | ✓ | ✓ | |
| 48 | +| [mq-broker](mq-broker/) | python | ✓ | ✓ | ✓ | ✓ | |
| 49 | +| [multi-account-multi-region-s3-access](multi-account-multi-region-s3-access/) | — | | | | | |
| 50 | +| [neptune-graph-db](neptune-graph-db/) | python | ✓ | ✓ | ✓ | ✓ | |
| 51 | +| [rds-db-queries](rds-db-queries/) | python | ✓ | ✓ | ✓ | ✓ | |
| 52 | +| [rds-failover-test](rds-failover-test/) | python | ✓ | ✓ | ✓ | ✓ | |
| 53 | +| [reproducible-ml](reproducible-ml/) | python | ✓ | ✓ | ✓ | ✓ | |
| 54 | +| [route53-dns-failover](route53-dns-failover/) | python | ✓ | ✓ | ✓ | ✓ | |
| 55 | +| [sagemaker-inference](sagemaker-inference/) | python | ✓ | ✓ | ✓ | ✓ | |
| 56 | +| [stepfunctions-lambda](stepfunctions-lambda/) | python | ✓ | ✓ | ✓ | ✓ | |
| 57 | +| [terraform-resources](terraform-resources/) | — | | | | | |
| 58 | +| [testcontainers-java-sample](testcontainers-java-sample/) | — | | | | | |
| 59 | +| [transfer-ftp-s3](transfer-ftp-s3/) | python | ✓ | ✓ | ✓ | ✓ | |
| 60 | +| [web-app-dynamodb](web-app-dynamodb/) | python | ✓ | ✓ | ✓ | ✓ | |
| 61 | +| [web-app-rds](web-app-rds/) | python | ✓ | ✓ | ✓ | ✓ | |
| 62 | + |
| 63 | +## Quick Start |
| 64 | + |
| 65 | +```bash |
| 66 | +# Set AWS credentials for LocalStack |
| 67 | +export AWS_ACCESS_KEY_ID=test |
| 68 | +export AWS_SECRET_ACCESS_KEY=test |
| 69 | +export AWS_DEFAULT_REGION=us-east-1 |
| 70 | + |
| 71 | +# Deploy a sample |
| 72 | +bash lambda-function-urls/python/scripts/deploy.sh |
| 73 | + |
| 74 | +# Teardown |
| 75 | +bash lambda-function-urls/python/scripts/teardown.sh |
| 76 | +``` |
| 77 | + |
| 78 | +## Prerequisites |
| 79 | + |
| 80 | +- Docker |
| 81 | +- [LocalStack](https://localstack.cloud) (running on localhost.localstack.cloud:4566) |
| 82 | +- AWS CLI |
| 83 | +- Terraform (for Terraform deployments) |
| 84 | +- AWS CDK + Node.js (for CDK deployments) |
0 commit comments