<?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>topic Re: Unable to access S3 objects from Databricks using IAM access keys in both AWS and Azure Databric in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/38003#M5484</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/84418"&gt;@Obulreddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We haven't heard from you since the last response from &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/48731"&gt;@KaKa&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;​, and I was checking back to see if her suggestions helped you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or else, If you have any solution, please share it with the community, as it can be helpful to others.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2023 07:35:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-07-20T07:35:49Z</dc:date>
    <item>
      <title>Unable to access S3 objects from Databricks using IAM access keys in both AWS and Azure Databricks</title>
      <link>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/37094#M5482</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;We are trying to connect to Amazon S3 bucket from both Databricks running on AWS and Azure using IAM access keys directly through Scala code in Notebook and we are facing&amp;nbsp;&lt;STRONG&gt;com.amazonaws.services.s3.model.AmazonS3Exception: Forbidden;&lt;/STRONG&gt;&amp;nbsp;with status code as &lt;STRONG&gt;403&lt;/STRONG&gt;. But by using the same credentials we were able to access it from AWS CLI.&lt;/P&gt;&lt;P&gt;Sample code that we ran in Notebook&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;org&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;apache&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;spark&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;sql&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;SparkSession&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val&lt;/SPAN&gt; &lt;SPAN&gt;spark&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SparkSession&lt;/SPAN&gt;&lt;SPAN&gt;.builder&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; .appName(&lt;/SPAN&gt;&lt;SPAN&gt;"S3 Access"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; .getOrCreate()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Set AWS access key and secret key&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;spark.conf.set(&lt;/SPAN&gt;&lt;SPAN&gt;"spark.hadoop.fs.s3a.access.key"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"***********"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;spark.conf.set(&lt;/SPAN&gt;&lt;SPAN&gt;"spark.hadoop.fs.s3a.secret.key"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"**********************"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Set the S3 endpoint URL if needed&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;spark.conf.set(&lt;/SPAN&gt;&lt;SPAN&gt;"spark.hadoop.fs.s3a.endpoint"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"s3.us-east-2.amazonaws.com"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Read a file from the S3 bucket into a DataFrame&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;val&lt;/SPAN&gt; &lt;SPAN&gt;df&lt;/SPAN&gt;&lt;SPAN&gt; = spark.read.parquet(&lt;/SPAN&gt;&lt;SPAN&gt;"s3://&amp;lt;parquet_file_path&amp;gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df.show()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Obul.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Jul 2023 12:36:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/37094#M5482</guid>
      <dc:creator>Obulreddy</dc:creator>
      <dc:date>2023-07-06T12:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access S3 objects from Databricks using IAM access keys in both AWS and Azure Databric</title>
      <link>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/37730#M5483</link>
      <description>&lt;P&gt;need to create instance profile. read more details following url :&amp;nbsp;&lt;A href="https://docs.databricks.com/aws/iam/instance-profile-tutorial.html" target="_blank"&gt;https://docs.databricks.com/aws/iam/instance-profile-tutorial.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;hope it work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 06:21:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/37730#M5483</guid>
      <dc:creator>KaKa</dc:creator>
      <dc:date>2023-07-17T06:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access S3 objects from Databricks using IAM access keys in both AWS and Azure Databric</title>
      <link>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/38003#M5484</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/84418"&gt;@Obulreddy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We haven't heard from you since the last response from &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/48731"&gt;@KaKa&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;​, and I was checking back to see if her suggestions helped you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or else, If you have any solution, please share it with the community, as it can be helpful to others.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, Please don't forget to click on the "Select As Best" button whenever the information provided helps resolve your question.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 07:35:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/38003#M5484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-07-20T07:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access S3 objects from Databricks using IAM access keys in both AWS and Azure Databric</title>
      <link>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/38007#M5485</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;&lt;/P&gt;&lt;P&gt;from my site clearly, no more concerns&lt;/P&gt;&lt;P&gt;tks very much&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2023 07:43:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/unable-to-access-s3-objects-from-databricks-using-iam-access/m-p/38007#M5485</guid>
      <dc:creator>KaKa</dc:creator>
      <dc:date>2023-07-20T07:43:39Z</dc:date>
    </item>
  </channel>
</rss>

