擅长:python、mysql、java
<p>我添加了以下代码并开始为我工作</p>
<pre><code>mws_vpc_sg.add_ingress_rule(peer= ec2.Peer.ipv4('172.30.0.0/15'), connection = ec2.Port.tcp_range(31000,655353))
</code></pre>
<p>这将产生</p>
<pre><code>MerchWebServicesSecurityGroup4BA36B9B:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: EC2 Services Security Group
GroupName: MerchWebServicesSecurityGroup
SecurityGroupEgress:
- CidrIp: 0.0.0.0/0
Description: Allow all outbound traffic by default
IpProtocol: "-1"
SecurityGroupIngress:
- CidrIp: 172.30.0.0/15
Description: from 172.30.0.0/15:31000-655353
FromPort: 31000
IpProtocol: tcp
ToPort: 655353
VpcId: vpc-839227e7
</code></pre>