0

I have created SNS topic, event in S3 and Snowpipe creation has been done successfully. But when I upload any new file in AWS S3, my snowpipe is not triggering automatically. I guess my SNS is not handing event triggring. Is there any dependency to create these items i.e. snowpipe, sns topic and event in S3?

Below is code for Snowpipe:

Create or Replace pipe ALTIMUS_BILL_pipe auto_ingest=true aws_sns_topic='arn:aws:sns:ap-south-1:123456654321:snowpipe_sns_test' as copy into src.tbl_ALTIMUS_BILL from @my_stage_tbl_ALTIMUS_BILL;

Below is the Policy I have used in SNS

{.., "Statement": [{"Sid": "__default_statement_ID","Effect": "Allow", "Principal": {"AWS": ""}, "Action": [ "SNS:Publish", ... ], "Resource": "arn:aws:sns:XXX:snowpipe_sns_test", "Condition": {"StringEquals": {"AWS:SourceOwner": "XXX"}} }, { "Sid": "__console_pub_0", "Effect": "Allow", "Principal": { "AWS": "" }, "Action": "SNS:Publish", "Resource": "arn:aws:sns:XXX:snowpipe_sns_test" }, { "Sid": "__console_sub_0", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": [ "SNS:Subscribe", "SNS:Receive" ], "Resource": "arn:aws:sns:XXX:snowpipe_sns_test" } ] } 
  • 4
    Why did you add your code in the comments? Just edit your question. That way it's much easier for us to help you. – THess Feb 10 '20 at 15:23

1 Answers1

1

I got the Answer. To work properly there is a order need to follow while create all this setup. First required to created SNS Topic (Publisher), then Snowpipe (Subscriber) and finally need to register with S3 bucket event creation. Now all set and everything working fine for me. Thanks...