AWS - VPC 创建日期

AWS - VPC 创建日期

您能否告诉我如何检查 VPC 何时创建?或者如何通过 cli 在 cloudtrail 中检查谁创建了 vpc?

我尝试使用 cloudtrail 并在事件名称中搜索 CreateVpc,但没有找到任何东西。

答案1

如果您碰巧同时创建了 NAT 网关,我知道很多人都这样做,您可以从中获取 CreateTime:https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-nat-gateways.html

使用aws ec2 describe-nat-gateways,例如:

{
  "NatGateways": [
    {
      "NatGatewayAddresses": [
        {
          "PublicIp": "198.11.222.333",
          "NetworkInterfaceId": "eni-9dec76cd",
          "AllocationId": "eipalloc-89c620ec",
          "PrivateIp": "10.0.0.149"
        }
      ],
      "VpcId": "vpc-1a2b3c4d",
      "Tags": [
              {
                  "Value": "IT",
                  "Key": "Department"
              }
      ],
      "State": "available",
      "NatGatewayId": "nat-05dba92075d71c408",
      "SubnetId": "subnet-847e4dc2",
      "CreateTime": "2015-12-01T12:26:55.983Z"
    },
    {
      "NatGatewayAddresses": [
        {
          "PublicIp": "1.2.3.12",
          "NetworkInterfaceId": "eni-71ec7621",
          "AllocationId": "eipalloc-5d42583f",
          "PrivateIp": "10.0.0.77"
        }
      ],
      "VpcId": "vpc-11aa22bb",
      "Tags": [
              {
                  "Value": "Finance",
                  "Key": "Department"
              }
      ],
      "State": "available",
      "NatGatewayId": "nat-0a93acc57881d4199",
      "SubnetId": "subnet-7f7e4d39",
      "CreateTime": "2015-12-01T12:09:22.040Z"
    }
  ]
}

相关内容