I followed this tutorial in the snowflake documentation (Option 2) and I have a couple of questions I am hoping someone can help me with.
- When I try to create a pipe with the following command
create pipe <pipe> auto_ingest=true aws_sns_topic='<sns topic arn>.fifo' as copy into <table> FROM (SELECT $1:"id", $1:"name", $1:"contact", CURRENT_TIMESTAMP::TIMESTAMP_NTZ, $1:"active" FROM @<stage>) FILE_FORMAT = <previously defined form which is json>
I get this error: Pipe Notifications bind failure "Invalid parameter: Invalid parameter: Endpoint Reason: Please use FIFO SQS queue (Service: Sns, Status Code: 400, Request ID: <request id>, Extended Request ID: null)"
Can anyone tell me where I am going wrong or guide me on how I can troubleshoot this error? I am new to Snowflake.
- Another thing I did notice about the tutorial which confused me was in Option 2 - Step 1: Subscribe the Snowflake SQS Queue to the SNS Topic.
This seemed to indicate that you should use the sns topic arn in this command
select system$get_aws_sns_iam_policy('<sns_topic_arn>');
...but then when they expand on their example then use the bucket arn
select system$get_aws_sns_iam_policy('arn:aws:sns:us-west-2:001234567890:s3_mybucket');
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| SYSTEM$GET_AWS_SNS_IAM_POLICY('ARN:AWS:SNS:US-WEST-2:001234567890:S3_MYBUCKET') |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {"Version":"2012-10-17","Statement":[{"Sid":"1","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789001:user/vj4g-a-abcd1234"},"Action":["sns:Subscribe"],"Resource":["arn:aws:sns:us-west-2:001234567890:s3_mybucket"]}]}
Which should I use for this step?
Thanks!