代码之家  ›  专栏  ›  技术社区  ›  Private

列表存储桶s3api没有显示我的存储桶创建日期?

  •  1
  • Private  · 技术社区  · 8 年前

    我想得到我的 s3 s3api . 但它并没有显示在aws控制台中显示的创建日期。

    当我尝试使用cli时,输出是这样的

    C:\Users\hero>aws s3api list-buckets
    {
        "Buckets": [
            {
                "CreationDate": "2018-09-12T11:32:04.000Z",
                "Name": "campaign-app-api-prod-serverlessdeploymentbucket-"
            },
            {
                "CreationDate": "2018-09-12T10:06:44.000Z",
                "Name": "s3-api-log-events"
            }
        ]
    }
    

    this is the my aws console

    s3api公司 . 是我的 CreationDate

    谢谢

    2 回复  |  直到 8 年前
        1
  •  2
  •   Private    7 年前

    web控制台中显示的“创建日期”字段与在中注册的实际创建日期一致 us-east-1

    当使用端点而不是 ,您收到的CreationDate实际上是根据bucket在该区域的上次复制时间最后修改的时间。在对bucket进行更改(例如编辑其bucket策略)时,此日期可能会更改。

    所以,为了得到 CreationDates s3 美国东部-1 .

    aws s3api list-buckets --region "us-east-1"

    签出这个 github issue

        2
  •  -1
  •   John Rotenstein    8 年前

    此python脚本:

    import boto3
    
    client=boto3.client('s3')
    
    response=client.list_buckets()
    

    s3cmd

    如果任何地方有一个bug,它就会在 ListBuckets 对AWS的API调用。这最好在AWS支持下提出。