amazon-web-services - AWS 中 SecurityGroup 的 HTTPS 和 ICMP 入口规则

标签 amazon-web-services aws-cloudformation aws-security-group

我正在尝试为 SecurityGroup 创建 cloudformation 模板。我很难在文档 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group-ingress.html 上查看正确的详细信息

附上我需要做什么的快照:

enter image description here

创建此 cloudformation 模板需要帮助

最佳答案

根据您的输入,这里有一个示例。

请随意调整您认为合适的名称和描述。

SimpleSecurityGroup:
  Type: "AWS::EC2::SecurityGroup"
  Properties:
    GroupDescription: "Sample description"
    GroupName: "Sample-SG"
    VpcId: 'INSERT_VPC_ID_HERE'
    SecurityGroupIngress: 
      - 
        CidrIp: '10.X.X.X/24'
        IpProtocol: "icmp"
      - 
        SourceSecurityGroupId: 'sg-xxxxxxx'
        IpProtocol: "tcp"
        FromPort: 443
        ToPort: 443

请引用AWS::EC2::SecurityGroupIngress有关更多详细信息的文档。

关于amazon-web-services - AWS 中 SecurityGroup 的 HTTPS 和 ICMP 入口规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76907663/

相关文章:

node.js - 在亚马逊ec2中的端口80上提供 Node Web应用程序

amazon-web-services - 如何根据环境给出云形成的单独变量

amazon-web-services - 当 AWS 安全组在入站或出站规则中被指定为源/目标时,它是否只看到私有(private)地址?

mysql - 无法在 AWS-mysql 中创建表并抛出错误代码 1044。拒绝用户 'user1' @'%' 访问数据库 'mysqlDB'

node.js - 对 AWS SQS 执行 5000 多个 promise 的 AWS Lambda 函数极其不可靠

amazon-web-services - AWS API Gateway部署的API无法解析请求正文

aws-cloudformation - 如何使用 CloudFormation 设置 AWS CacheCluster 的描述?

amazon-web-services - 从ALB切换到NLB后健康检查失败?

android - 在gradle构建期间检索AWS数据

amazon-web-services - EC2 实例自动重新启动并取消我的弹性 IP 和目标组的关联