This repository is used to learn and test AWS services locally using LocalStack, without connecting to real AWS.
- Docker
- AWS CLI
- Linux / WSL / macOS
Run LocalStack using Docker:
docker run \
--rm -it \
-p 127.0.0.1:4566:4566 \
-p 127.0.0.1:4510-4559:4510-4559 \
-v /var/run/docker.sock:/var/run/docker.sock \
localstack/localstack- Keep this terminal running
- Open a new terminal for AWS CLI commands
aws configure --profile localstackUse dummy credentials:
- Access Key ID:
test - Secret Access Key:
test - Region:
us-east-1 - Output format:
json
Edit ~/.aws/config:
[profile localstack]
region = us-east-1
endpoint_url = http://localhost:4566✅ No .bashrc exports required
✅ AWS CLI automatically routes requests to LocalStack
aws s3 mb s3://terraform-state-bucket --profile localstackaws s3 ls --profile localstackExpected output:
terraform-state-bucket
aws s3 ls --profile localstack
aws ec2 describe-instances --profile localstack
aws ec2 describe-vpcs --profile localstack
aws ec2 describe-security-groups --profile localstack
aws ec2 describe-key-pairs --profile localstack
aws iam list-roles --profile localstack
aws lambda list-functions --profile localstack- All services run locally
- EC2 is mocked (no real VM)
- Safe for learning and experimentation
- No AWS costs involved
Press Ctrl + C in the Docker terminal.