第31天:为应用开发配置私有 RDS 实例
发布: (2026年1月4日 GMT+8 17:02)
4 分钟阅读
原文: Dev.to
Source: Dev.to
实验信息
Nautilus 开发团队正在开发一个新功能,需要可靠且可扩展的数据库解决方案。为方便开发和测试,他们需要一个新的私有 RDS 实例。该实例将存储关键的应用数据,必须使用 AWS 免费套餐进行部署,以在初始开发阶段降低成本。团队选择 MySQL 作为数据库引擎,因为它与现有系统兼容。DevOps 团队负责设置此 RDS 实例,确保其配置正确并可供开发团队使用。
任务
Provision a Private RDS Instance: Create a new private RDS instance named nautilus-rds using a sandbox template; it must be a db.t3.micro type instance.
Engine Configuration: Use the MySQL engine with version 8.4.x.
Enable Storage Autoscaling: Enable storage autoscaling and set the threshold value to 50 GB. Keep the rest of the configurations as default.
Instance Availability: Ensure the instance is in the *available* state before submitting this task.
步骤‑逐‑步骤解决方案(AWS 控制台)
步骤 1:打开 RDS 控制台
- 前往 AWS Console → RDS。
- 点击 Create database。
步骤 2:选择数据库创建方式
- 选择 Full configuration(不要选择 Easy create)。
步骤 3:引擎配置
- Engine type: MySQL
- Engine version: MySQL 8.4.x(选择可用的最新 8.4 选项)
✔ 满足引擎要求。
步骤 4:模板
- 选择 Sandbox(开发/测试)。
步骤 5:数据库实例设置
- DB instance identifier:
nautilus-rds - Credentials:
- 用户名:保持默认(例如
admin) - 密码:自动生成或手动设置。
- 用户名:保持默认(例如
步骤 6:实例配置
- DB instance class:
db.t3.micro
✔ 符合免费套餐资格,也是实验要求的实例类型。
步骤 7:存储配置
- 保持默认存储类型。
- Enable storage autoscaling
- Maximum storage threshold: 50 GB(必须设置)。
步骤 8:连接性(PRIVATE 为关键)
- VPC: 默认或已有的(保持默认)。
- Public access: No(必须为私有)。
- Subnet group: 默认。
- Security group: 默认(或已有的)。
✔ 确保 RDS 实例为私有。
步骤 9:其他配置
- 其余设置保持默认。
- 除非模板已启用,否则无需更改备份或监控设置。
步骤 10:创建数据库
- 点击 Create database。
等待实例可用(非常重要)
- 前往 RDS → Databases。
- 选中
nautilus-rds。 - 等待 Status = Available(通常 5–10 分钟)。
🚫 在状态为 Creating、Modifying 或 Backing‑up 时 不要 提交。
资源与后续步骤
- 完整代码仓库: KodeKloud Learning Labs
- 更多深度阅读: Whispering Cloud Insights – 技术文章
- 讨论区: DEV Community – 分享想法和提问
致谢
- 所有实验均来自:KodeKloud
- 感谢提供这些宝贵资源。