<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yoshiyuki Watanabe</title>
    <description>The latest articles on DEV Community by Yoshiyuki Watanabe (@yowatanabe).</description>
    <link>https://dev.to/yowatanabe</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2804521%2F83c48365-3e38-48c6-bea1-ea740c897614.jpeg</url>
      <title>DEV Community: Yoshiyuki Watanabe</title>
      <link>https://dev.to/yowatanabe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yowatanabe"/>
    <language>en</language>
    <item>
      <title>Why S3 list-buckets Returns a CreationDate That Doesn't Match the Actual Bucket Creation Date</title>
      <dc:creator>Yoshiyuki Watanabe</dc:creator>
      <pubDate>Sat, 08 Aug 2026 00:18:03 +0000</pubDate>
      <link>https://dev.to/aws-builders/why-s3-list-buckets-returns-a-creationdate-that-doesnt-match-the-actual-bucket-creation-date-a99</link>
      <guid>https://dev.to/aws-builders/why-s3-list-buckets-returns-a-creationdate-that-doesnt-match-the-actual-bucket-creation-date-a99</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;I manage multiple AWS accounts, and while taking inventory of S3 buckets and their creation dates across accounts with &lt;code&gt;list-buckets&lt;/code&gt;, I noticed that the &lt;code&gt;CreationDate&lt;/code&gt; returned by &lt;code&gt;aws s3api list-buckets&lt;/code&gt; didn't match the actual bucket creation date shown in the S3 console.&lt;/p&gt;

&lt;p&gt;I asked about this on AWS re:Post and got solid answers from the community.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://repost.aws/ja/questions/QUI9bguausRtiUasW3rfV_Cw/why-does-listbuckets-return-incorrect-creationdate-when-called-from-a-non-us-east-1-endpoint" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fa0.awsstatic.com%2Flibra-css%2Fimages%2Flogos%2Faws_logo_smile_1200x630.png" height="420" class="m-0" width="800"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://repost.aws/ja/questions/QUI9bguausRtiUasW3rfV_Cw/why-does-listbuckets-return-incorrect-creationdate-when-called-from-a-non-us-east-1-endpoint" rel="noopener noreferrer" class="c-link"&gt;
            Why does ListBuckets return incorrect CreationDate when called from a non-us-east-1 endpoint? | AWS re:Post
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            When I call `aws s3api list-buckets` from a regional endpoint other than `us-east-1` (e.g., `ap-northeast-1`), the `CreationDate` field returns an incorrect date that does not match the actual buck...
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frepost.aws%2Ffavicon-32x32.png" width="32" height="32"&gt;
          repost.aws
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Digging further, I found a GitHub Issue on &lt;code&gt;aws-cli&lt;/code&gt; with information about this exact issue.&lt;/p&gt;

&lt;p&gt;This article cross-references the re:Post answers with that Issue to lay out the cause and the workaround.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Symptom: CreationDate Changes When Called from a Non-us-east-1 Region
&lt;/h2&gt;

&lt;p&gt;Calling &lt;code&gt;list-buckets&lt;/code&gt; against the same bucket returns a different &lt;code&gt;CreationDate&lt;/code&gt; depending on which regional endpoint you use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Called via the ap-northeast-1 endpoint&lt;/span&gt;
aws s3api list-buckets &lt;span class="nt"&gt;--region&lt;/span&gt; ap-northeast-1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Buckets[?Name==`my-bucket`].CreationDate'&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text
&lt;span class="c"&gt;# 2026-06-04T02:48:47+00:00&lt;/span&gt;

&lt;span class="c"&gt;# Called via the us-east-1 endpoint&lt;/span&gt;
aws s3api list-buckets &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Buckets[?Name==`my-bucket`].CreationDate'&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text
&lt;span class="c"&gt;# 2023-07-05T08:39:18+00:00&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This bucket was created in ap-northeast-1, and the S3 console shows its creation date as &lt;code&gt;July 5, 2023, 17:39:18 (UTC+09:00)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tb4146km4hql6he3hlz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tb4146km4hql6he3hlz.png" alt="Creation date shown in the Creation date column of the S3 console bucket list" width="797" height="83"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In other words, the &lt;code&gt;us-east-1&lt;/code&gt; result matches the console, while only the &lt;code&gt;ap-northeast-1&lt;/code&gt; result is off from the actual creation date.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Cause: CreationDate Isn't the "Creation Date" — It's the "Last Replication Time in That Region"
&lt;/h2&gt;

&lt;p&gt;The investigation revealed that the meaning of the &lt;code&gt;CreationDate&lt;/code&gt; returned by &lt;code&gt;list-buckets&lt;/code&gt; depends on which regional endpoint you call it from.&lt;/p&gt;

&lt;p&gt;All S3 bucket creation operations appear to be mastered in &lt;code&gt;us-east-1&lt;/code&gt; and then replicated globally.&lt;/p&gt;

&lt;p&gt;When you call &lt;code&gt;list-buckets&lt;/code&gt; against an endpoint other than &lt;code&gt;us-east-1&lt;/code&gt;, the &lt;code&gt;CreationDate&lt;/code&gt; you get back isn't the actual creation date — it's &lt;strong&gt;the last replication time for that region&lt;/strong&gt; (i.e., the timestamp of the most recent sync, such as a bucket policy change).&lt;/p&gt;

&lt;p&gt;Only when you call the &lt;code&gt;us-east-1&lt;/code&gt; endpoint do you get the original creation date registered at the master. The S3 console also reads from the &lt;code&gt;us-east-1&lt;/code&gt; data, which is why the console date always matches the &lt;code&gt;us-east-1&lt;/code&gt; endpoint's result.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;aws-cli&lt;/code&gt; GitHub Issue includes the following explanation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;All bucket creations are mastered in us-east-1, then replicated on a global scale - the resulting difference is that there are no "replication" events to the us-east-1 region.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;When using an endpoint other than us-east-1, the &lt;code&gt;CreationDate&lt;/code&gt; you receive is actually the last modified time according to the bucket's last replication time in this region. This date can change when making changes to your bucket, such as editing its bucket policy.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Source: &lt;a href="https://github.com/aws/aws-cli/issues/3597#issuecomment-424167129" rel="noopener noreferrer"&gt;aws/aws-cli#3597&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The official AWS documentation for the &lt;code&gt;Bucket&lt;/code&gt; data type's &lt;code&gt;CreationDate&lt;/code&gt; field also includes this line:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Date the bucket was created. This date can change when making changes to your bucket, such as editing its bucket policy.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Source: &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_Bucket.html" rel="noopener noreferrer"&gt;Amazon S3 API Reference - Bucket&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;However, this sentence alone doesn't make it clear that the behavior varies by region — it's an easy detail for many users to miss.&lt;/p&gt;

&lt;p&gt;I confirmed this myself: after editing a bucket policy, only the &lt;code&gt;CreationDate&lt;/code&gt; returned via the &lt;code&gt;ap-northeast-1&lt;/code&gt; endpoint changed. Changing &lt;code&gt;Block public access&lt;/code&gt; produced the same result.&lt;/p&gt;

&lt;p&gt;It seems any bucket-level configuration change — not just bucket policy edits — can trigger this replication timestamp update.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# After the configuration change&lt;/span&gt;
aws s3api list-buckets &lt;span class="nt"&gt;--region&lt;/span&gt; ap-northeast-1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Buckets[?Name==`my-bucket`].CreationDate'&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text
&lt;span class="c"&gt;# 2026-08-06T21:20:49+00:00&lt;/span&gt;

aws s3api list-buckets &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Buckets[?Name==`my-bucket`].CreationDate'&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text
&lt;span class="c"&gt;# 2023-07-05T08:39:18+00:00&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Workaround: Explicitly Specify the us-east-1 Endpoint
&lt;/h2&gt;

&lt;p&gt;To get the accurate creation date, explicitly call the API with &lt;code&gt;--region us-east-1&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws s3api list-buckets &lt;span class="nt"&gt;--region&lt;/span&gt; us-east-1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--query&lt;/span&gt; &lt;span class="s1"&gt;'Buckets[?Name==`my-bucket`].CreationDate'&lt;/span&gt; &lt;span class="nt"&gt;--output&lt;/span&gt; text
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This result matches the creation date shown in the S3 console.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;CreationDate&lt;/code&gt; returned by &lt;code&gt;list-buckets&lt;/code&gt; has a quirk: calling it from any endpoint other than &lt;code&gt;us-east-1&lt;/code&gt; returns the last replication time for that region, not the actual bucket creation date.&lt;/p&gt;

&lt;p&gt;If you need the accurate creation date, explicitly specify &lt;code&gt;--region us-east-1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I lost some time myself before figuring this out. I hope this article saves someone else from the same trap.&lt;/p&gt;

&lt;p&gt;Thank you for reading this far!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>s3</category>
      <category>beginners</category>
      <category>sre</category>
    </item>
  </channel>
</rss>
