<?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: User: anonymous is not authorized to perform: sqs:receivemessage on resource in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/user-anonymous-is-not-authorized-to-perform-sqs-receivemessage/m-p/57042#M30717</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This time I ran into a different error. The SQS service is not found.&lt;BR /&gt;Here's what I'm wondering&lt;/P&gt;&lt;P&gt;1. I set the IAM policy in the file notification mode guide in autoloader to the S3 instance profile, how should I write the policy for SQS?&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2024 08:38:25 GMT</pubDate>
    <dc:creator>rt-slowth</dc:creator>
    <dc:date>2024-01-12T08:38:25Z</dc:date>
    <item>
      <title>User: anonymous is not authorized to perform: sqs:receivemessage on resource</title>
      <link>https://community.databricks.com/t5/data-engineering/user-anonymous-is-not-authorized-to-perform-sqs-receivemessage/m-p/56912#M30687</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from pyspark.sql import functions as F
from pyspark.sql import types as T
from pyspark.sql import DataFrame, Column
from pyspark.sql.types import Row
import dlt

S3_PATH = 's3://datalake-lab/xxxx/'
S3_SCHEMA = 's3://datalake-lab/xxxx/schemas/'

@dlt.table
def test_raw():
    raw_df = (
        spark.readStream.format("cloudFiles")
        .option("cloudFiles.format", "parquet")
        .option("cloudFiles.schemaLocation", f"{S3_SCHEMA}")
        .option("cloudFiles.useNotifications", "true")
        .option("cloudFiles.region", "ap-northeast-1")
        .option("cloudFile.roleArn", "&amp;lt;Instance Profile ARN&amp;gt;")
        .option(
            "cloudFiles.queueUrl",
            "https://sqs.&amp;lt;region&amp;gt;.amazonaws.com/&amp;lt;account-id&amp;gt;/databricks-auto-ingest-demo",
        )
        .load(f"{S3_PATH}")  # &amp;lt;-- Specify the path to the gzip files here
        # .selectExpr("*", '_metadata.file_name as input_file_name', '_metadata.file_path as input_file_path')
    )

    return raw_df&lt;/LI-CODE&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;&lt;P&gt;&lt;SPAN&gt;com.amazonaws.services.sqs.model.AmazonSQSException: User: anonymous is not authorized to perform: sqs:receivemessage on resource: arn:aws:sqs:&amp;lt;region&amp;gt;:&amp;lt;account-id&amp;gt;:databricks-auto-ingest-demo because no resource-based policy allows the sqs:receivemessage action (Service: AmazonSQS; Status Code: 403;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What settings in AWS should I check?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 06:15:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/user-anonymous-is-not-authorized-to-perform-sqs-receivemessage/m-p/56912#M30687</guid>
      <dc:creator>rt-slowth</dc:creator>
      <dc:date>2024-01-11T06:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: User: anonymous is not authorized to perform: sqs:receivemessage on resource</title>
      <link>https://community.databricks.com/t5/data-engineering/user-anonymous-is-not-authorized-to-perform-sqs-receivemessage/m-p/57042#M30717</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This time I ran into a different error. The SQS service is not found.&lt;BR /&gt;Here's what I'm wondering&lt;/P&gt;&lt;P&gt;1. I set the IAM policy in the file notification mode guide in autoloader to the S3 instance profile, how should I write the policy for SQS?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 08:38:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/user-anonymous-is-not-authorized-to-perform-sqs-receivemessage/m-p/57042#M30717</guid>
      <dc:creator>rt-slowth</dc:creator>
      <dc:date>2024-01-12T08:38:25Z</dc:date>
    </item>
  </channel>
</rss>

