localstack
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLocalStack Lifecycle Management
LocalStack容器生命周期管理
Manage the LocalStack container lifecycle including starting, stopping, and monitoring the local cloud environment.
管理LocalStack容器的生命周期,包括启动、停止和监控本地云环境。
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
- 使用自定义配置启动LocalStack
- 停止运行中的LocalStack实例
- 检查LocalStack的状态和健康情况
- 使用新设置重启LocalStack
- 查看LocalStack版本和配置
Common Commands
常用命令
Start LocalStack
启动LocalStack
bash
undefinedbash
undefinedBasic start
基础启动
localstack start -d
localstack start -d
Start with debug mode
启用调试模式启动
DEBUG=1 localstack start -d
DEBUG=1 localstack start -d
Start with Pro features (requires auth token)
启动专业版功能(需要授权令牌)
LOCALSTACK_AUTH_TOKEN=<token> localstack start -d
undefinedLOCALSTACK_AUTH_TOKEN=<token> localstack start -d
undefinedCheck Status
检查状态
bash
undefinedbash
undefinedCheck if LocalStack is running
检查LocalStack是否在运行
localstack status
localstack status
Check service health
检查服务健康状态
View running Docker container
查看运行中的Docker容器
docker ps | grep localstack
undefineddocker ps | grep localstack
undefinedStop LocalStack
停止LocalStack
bash
undefinedbash
undefinedGraceful stop
优雅停止
localstack stop
localstack stop
Force stop via Docker
通过Docker强制停止
docker stop localstack-main
undefineddocker stop localstack-main
undefinedView Logs
查看日志
bash
undefinedbash
undefinedFollow logs
实时查看日志
localstack logs -f
localstack logs -f
View last 100 lines
查看最后100行日志
localstack logs --tail 100
undefinedlocalstack logs --tail 100
undefinedConfiguration Options
配置选项
Key environment variables for LocalStack:
| Variable | Description | Default |
|---|---|---|
| Enable debug logging | |
| Enable persistence across restarts | |
| Auth token for Pro features | None |
| Port configuration | |
LocalStack的关键环境变量:
| 变量 | 描述 | 默认值 |
|---|---|---|
| 启用调试日志 | |
| 启用跨重启持久化 | |
| 专业版功能的授权令牌 | None |
| 端口配置 | |
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 is set for Pro features
LOCALSTACK_AUTH_TOKEN
- 容器无法启动:检查端口4566是否已被占用
- 服务不可用:确认Docker正在运行且有足够资源
- 授权错误:确保为专业版功能设置了
LOCALSTACK_AUTH_TOKEN