amazon-web-services - "DBInstanceClass" property of resource type "AWS::RDS::DBInstance"
问题描述
For the below MySQL database instance, created with below template:
DbInstance:
Type: "AWS::RDS::DBInstance"
Properties:
DBSubnetGroupName: { "Ref": "DbSubnetGroup" }
MultiAZ: "true"
AvailabilityZone: { "Ref": "DbAvailabilityZone" }
AllocatedStorage: 8
StorageType: "gp2"
DBInstanceClass: "db.t2.micro"
DBName: "someapp"
Engine: "MySQL"
EngineVersion: "5.6"
MasterUsername: { "Ref": "DbUsername" }
MasterUserPassword: { "Ref": "DbPassword" }
VPCSecurityGroups:
- { "Ref": "DbSecurityGroup" }
Tags:
- Key: "Name"
Value: { "Fn::Join": ["", [ { "Ref": "AWS::StackName" }, "-db" ] ] }
DbSecurityGroup:
Type: "AWS::EC2::SecurityGroup"
Properties:
GroupDescription: "someapp DB Security Group"
VpcId: { "Ref": "VpcId" }
SecurityGroupIngress:
- IpProtocol: "tcp"
FromPort: "3306"
ToPort: "3306"
SourceSecurityGroupId: { "Ref": "EC2InstanceSecurityGroup" }
DbSubnetGroup:
Type: "AWS::RDS::DBSubnetGroup"
Properties:
DBSubnetGroupDescription: "someapp DB Subnet Group"
SubnetIds: { "Ref": "DbSubnets" }
Tags:
- Key: "Name"
Value: { "Fn::Join": ["", [ { "Ref": "AWS::StackName" }, "-db-subnet-group" ] ] }
my understanding is,
RDS is a computer(EC2 instance), where an EC2 instance will be launched on every subnet of "DbSubnetGroup"
.
This computer is of "db.t2.micro"
EC2 instance type.
Each computer will host a MySQL database instance(someapp
).
Multiple subnets in "DbSubnetGroup"
can be in same or different availability zones, because MultiAZ: "true"
If this is the right understanding then,
Is DbSecurityGroup
assigned to each EC2 instance type(DBInstanceClass
) of "db.t2.micro"
?
解决方案
RDS 是一台计算机(EC2 实例),其中将在“DbSubnetGroup”的每个子网上启动一个 EC2 实例。
是的,这是正确的,RDS 托管在 EC2 实例上,但您不需要管理这些实例。
这台计算机属于“db.t2.micro”EC2 实例类型。
是的,RDS 实例类型由用户在配置时选择。因此,如果您选择了微类型,那么 EC2 实例应该是相同的类型。
每台计算机将托管一个 MySQL 数据库实例(someapp)。
是的,EC2 实例将托管数据库。
"DbSubnetGroup" 中的多个子网可以位于相同或不同的可用区,因为 MultiAZ: "true"
如果您选择了多可用区数据库,则将使用不同的可用区来设置主数据库和辅助数据库。它们不会在同一个 AZ 中,因为它不会提供 AZ 冗余。
如果这是正确的理解,
DbSecurityGroup 是否分配给“db.t2.micro”的每个 EC2 实例类型(DBInstanceClass)?
是的,安全组将分配给 RDS 设置中的每个 EC2 实例。
推荐阅读
- android - GraphQL 突变在更新时返回 null
- azure - VNET 中的 Azure 功能仍然需要功能访问密钥吗?
- c# - 从 API 请求访问令牌时请求无效:C#、Azure 函数、OAuth
- vue.js - 如何使用具有 export default () {} 的代码汇总 .js 文件?
- process - BPM 人工任务调度
- symfony - Symfony 将所有字段值大写
- vba - 在列表框中插入单词标题,包括带有 VBA 的数字
- mqtt - 我如何发布和订阅图像(在 python 中使用 mqtt)
- c# - 在不添加网络凭据的情况下发送 Asp.Net 电子邮件
- c - rtspsrc 内部数据流错误 gstreamer c-appliaction