<?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: Autoloader: Cross-account bucket Assume role access denied in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/autoloader-cross-account-bucket-assume-role-access-denied/m-p/109236#M43254</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/95043"&gt;@deng_dev&lt;/a&gt;&amp;nbsp;, Greetings!&lt;BR /&gt;In the above error message, you will see a request ID in it, so can you please share that Request ID with the AWS Team to check why this request is getting denied as this looks like a permission issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if this helps and leave a like if this information is useful, followups are appreciated.&lt;BR /&gt;Kudos&lt;BR /&gt;Ayushi&lt;/P&gt;</description>
    <pubDate>Thu, 06 Feb 2025 15:40:50 GMT</pubDate>
    <dc:creator>Ayushi_Suthar</dc:creator>
    <dc:date>2025-02-06T15:40:50Z</dc:date>
    <item>
      <title>Autoloader: Cross-account bucket Assume role access denied</title>
      <link>https://community.databricks.com/t5/data-engineering/autoloader-cross-account-bucket-assume-role-access-denied/m-p/109098#M43222</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hi everyone!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have a Databricks instance profile role that has permission to assume a role in another AWS account to access an S3 bucket in that account.&lt;/P&gt;&lt;P&gt;When I try to assume the role using &lt;EM&gt;&lt;STRONG&gt;boto3&lt;/STRONG&gt;&lt;/EM&gt;, it correctly reads the Databricks AWS credentials, assumes the role, and is able to read the S3 file without any errors.&lt;/P&gt;&lt;P&gt;However, when I try to use this role in a &lt;STRONG&gt;&lt;EM&gt;cloudFiles&lt;/EM&gt;&lt;/STRONG&gt; stream, it fails with an&lt;BR /&gt;&lt;STRONG&gt;AccessDenied error.java.nio.file.AccessDeniedException: &amp;lt;bucket&amp;gt; getFileStatus on &amp;lt;bucket&amp;gt; AmazonS3Exception: Forbidden; request: HEAD &amp;lt;bucket&amp;gt; customer-info {} Hadoop 3.3.6, 403 Forbidden&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;Here is sample code I am using:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;options_dict = {
    "cloudFiles.roleArn": role_arn,
    "cloudFiles.format": "json",
    "cloudFiles.schemaLocation": &amp;lt;schema_path&amp;gt;,
    "cloudFiles.includeExistingFiles": "true",
    "multiLine": "true"
}
df = (spark.readStream
              .format("cloudFiles")
              .options(**options_dict)
              .load("&amp;lt;bucket&amp;gt;")
              )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 08:16:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/autoloader-cross-account-bucket-assume-role-access-denied/m-p/109098#M43222</guid>
      <dc:creator>deng_dev</dc:creator>
      <dc:date>2025-02-06T08:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Autoloader: Cross-account bucket Assume role access denied</title>
      <link>https://community.databricks.com/t5/data-engineering/autoloader-cross-account-bucket-assume-role-access-denied/m-p/109236#M43254</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/95043"&gt;@deng_dev&lt;/a&gt;&amp;nbsp;, Greetings!&lt;BR /&gt;In the above error message, you will see a request ID in it, so can you please share that Request ID with the AWS Team to check why this request is getting denied as this looks like a permission issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if this helps and leave a like if this information is useful, followups are appreciated.&lt;BR /&gt;Kudos&lt;BR /&gt;Ayushi&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 15:40:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/autoloader-cross-account-bucket-assume-role-access-denied/m-p/109236#M43254</guid>
      <dc:creator>Ayushi_Suthar</dc:creator>
      <dc:date>2025-02-06T15:40:50Z</dc:date>
    </item>
  </channel>
</rss>

