<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Listing AWS S3 buckets in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Listing-AWS-S3-buckets/m-p/60730#M69178</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to list S3 buckets name using python. I have installed boto3 module, aws-cli, configured aws credentials, and given following code at python scripts. I have 3 buckets in my S3 storage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import boto3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;s3 = boto3.resource('s3')&lt;/P&gt;&lt;P&gt;for bucket in s3.buckets.all():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'bucket.name'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got below output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bucket.name&lt;/P&gt;&lt;P&gt;bucket.name&lt;/P&gt;&lt;P&gt;bucket.name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i given 'aws s3 ls' and 'hadoop fs -Dfs.s3a.access.key="***********" -Dfs.s3a.secret.key="**************" -ls s3a://datasamplefiles/' through treminal it written bucket list as i expected but python code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to working cloudera along with AWS services. If anyone know where i am doing mistake please do let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Chandana&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 15:47:05 GMT</pubDate>
    <dc:creator>chandana204</dc:creator>
    <dc:date>2022-09-16T15:47:05Z</dc:date>
    <item>
      <title>Listing AWS S3 buckets</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Listing-AWS-S3-buckets/m-p/60730#M69178</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to list S3 buckets name using python. I have installed boto3 module, aws-cli, configured aws credentials, and given following code at python scripts. I have 3 buckets in my S3 storage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import boto3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;s3 = boto3.resource('s3')&lt;/P&gt;&lt;P&gt;for bucket in s3.buckets.all():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'bucket.name'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got below output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bucket.name&lt;/P&gt;&lt;P&gt;bucket.name&lt;/P&gt;&lt;P&gt;bucket.name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i given 'aws s3 ls' and 'hadoop fs -Dfs.s3a.access.key="***********" -Dfs.s3a.secret.key="**************" -ls s3a://datasamplefiles/' through treminal it written bucket list as i expected but python code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to working cloudera along with AWS services. If anyone know where i am doing mistake please do let me know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Chandana&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:47:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Listing-AWS-S3-buckets/m-p/60730#M69178</guid>
      <dc:creator>chandana204</dc:creator>
      <dc:date>2022-09-16T15:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Listing AWS S3 buckets</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Listing-AWS-S3-buckets/m-p/60762#M69179</link>
      <description>&lt;P&gt;I got the solution. I have given wrong print command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import boto3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;s3 = boto3.resource('s3')&lt;/P&gt;&lt;P&gt;for bucket in s3.buckets.all():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(bucket.name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chandana&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2017 19:19:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Listing-AWS-S3-buckets/m-p/60762#M69179</guid>
      <dc:creator>chandana204</dc:creator>
      <dc:date>2017-10-09T19:19:05Z</dc:date>
    </item>
  </channel>
</rss>

