This is a simple repo I did to learn Terraform with LocalStack by myself
You can check the setup.sh script for installing Terraform and LocalStack CLI.
That script is designed for macOS with Homebrew.
Make sure LocalStack is running:
localstack startLearn: DynamoDB tables, primary keys, GSI (Global Secondary Index)
Creates a users table with email-based secondary index for alternative query patterns.
Learn: Message queues, FIFO vs standard queues, dead letter queues
Creates multiple SQS queues demonstrating different queue types and patterns.
Learn: Serverless functions, IAM roles, function deployment
Creates a Python Lambda function that processes events with different actions.
Learn: Pub/sub messaging, fan-out pattern, message filtering
Creates SNS topic with SQS subscriptions and demonstrates message routing with filter policies.
Learn: REST APIs, Lambda integration, API deployment
Creates a REST API with multiple endpoints backed by Lambda functions.
Each example is independent. Navigate to any example and run:
cd 01-dynamodb
terraform init
terraform applyFollow the instructions in each example's README.md for testing and cleanup.
The examples are ordered by complexity:
- Start with DynamoDB (simplest - just resource creation)
- Move to SQS (introduces multiple resources and relationships)
- Try Lambda (adds code deployment and packaging)
- Explore SNS (demonstrates resource integration)
- Build API Gateway (most complex - multiple services working together)
- Always run
terraform destroywhen done to clean up resources - Use
awslocalcommands to interact with LocalStack services - Check the README.md in each example for specific testing commands
- Each example includes outputs that show important resource information