Categories:

System Functions (System Information)

SYSTEM$CONVERT_PIPES_SQS_TO_SNS

Convert pipes using Amazon SQS (Simple Queue Service) notifications to the Amazon Simple Notification Service (SNS) service for an S3 bucket.

For more information, see Automating Snowpipe for Amazon S3.

Syntax

SYSTEM$CONVERT_PIPES_SQS_TO_SNS( '<bucket_name>, '<sns_topic_arn>' )
Copy

Arguments

bucket_name

Name of the S3 bucket.

sns_topic_arn

ARN of Amazon SNS topic.

Access Control Requirements

Only account administrators can execute this function.

Usage Notes

  • Before you call this function, update the access policy for your topic with the following permissions:

    • Allow the Snowflake IAM user to subscribe the SQS queue that is in your target account to your topic.

    • Allow Amazon S3 to publish event notifications from your bucket to the SNS topic.

    For instructions, see Step 1: Subscribe the Snowflake SQS Queue to the SNS Topic.

  • Call this function before you update your S3 bucket to send notifications to the SNS topic.

  • To prevent any data loss, Snowpipe will continue to consume messages from the SQS queue.

  • The S3 bucket and SNS topic must be in the same AWS region.

Examples

Convert all notifications from bucket my_s3_bucket:

SELECT SYSTEM$CONVERT_PIPES_SQS_TO_SNS(
   'my_s3_bucket', 'arn:aws:sns:us-east-2:111122223333:sns_topic');
Copy