LocalStack Lifecycle Management
Manage the LocalStack container lifecycle including starting, stopping, and monitoring the local cloud environment.
Capabilities
- Start LocalStack with custom configuration
- Stop running LocalStack instances
- Check LocalStack status and health
- Restart LocalStack with new settings
- View LocalStack version and configuration
Common Commands
Start LocalStack
# Basic start
localstack start -d
# Start with debug mode
DEBUG=1 localstack start -d
# Start with Pro features (requires auth token)
LOCALSTACK_AUTH_TOKEN=<token> localstack start -dCheck Status
# Check if LocalStack is running
localstack status
# Check service health
curl http://localhost:4566/_localstack/health
# View running Docker container
docker ps | grep localstackStop LocalStack
# Graceful stop
localstack stop
# Force stop via Docker
docker stop localstack-mainView Logs
# Follow logs
localstack logs -f
# View last 100 lines
localstack logs --tail 100Configuration Options
Key environment variables for LocalStack:
| Variable | Description | Default |
|---|---|---|
DEBUG | Enable debug logging | 0 |
PERSISTENCE | Enable persistence across restarts | 0 |
LOCALSTACK_AUTH_TOKEN | Auth token for Pro features | None |
GATEWAY_LISTEN | Port configuration | 4566 |
Troubleshooting
- Container won't start: Check if port 4566 is already in use
- Services unavailable: Verify Docker is running and has sufficient resources
- Auth errors: Ensure
LOCALSTACK_AUTH_TOKENis set for Pro features