Module 08 · Lesson 3 of 12Detailed study · about 15 min

AWS: S3 events through SQS, SNS or EventBridge

S3 arrival events reach a Snowflake-managed SQS queue. Direct notifications, SNS fan-out and EventBridge routing provide different delivery paths.

Understand the idea

For the direct lab, create the pipe, read its queue ARN, then add an S3 ObjectCreated notification filtered to incoming/m8/ and the .json suffix. Use the returned ARN, not a fabricated queue. Configure the same region-compatible bucket/event resources and check for overlapping notification rules.

Key ideas in simple English
ConceptWhat it means
S3 → SQSSimple isolated prefix.
S3 → SNS → SQSFan-out when multiple consumers need events.
S3 → EventBridge → SNS → SQSEvent rules route events through SNS.

A concrete example

A dedicated learning prefix sends ObjectCreated events to the notification_channel returned for its pipe.

Remember: Configure one delivery path. Preserve existing bucket notifications and subscriptions.

Explain it step by step · full theory

Setup and reasoning

For the direct lab, create the pipe, read its queue ARN, then add an S3 ObjectCreated notification filtered to incoming/m8/ and the .json suffix. Use the returned ARN, not a fabricated queue. Configure the same region-compatible bucket/event resources and check for overlapping notification rules.

For SNS, configure the topic policy so S3 can publish and Snowflake can subscribe using the official SYSTEM$GET_AWS_SNS_IAM_POLICY function described in the linked guide, then create the pipe with AWS_SNS_TOPIC. For EventBridge, enable bucket events, route Object Created events for this prefix to SNS and authorize events.amazonaws.com to publish. Keep Snowflake’s subscription intact.

Words used in this lesson
S3 → SQS
Simple isolated prefix.
S3 → SNS → SQS
Fan-out when multiple consumers need events.
S3 → EventBridge → SNS → SQS
Event rules route events through SNS.

See how it works

Choose a step to explore the idea at your own pace.

Open the interactive explanation
Interactive explainer1 / 3

AWS: S3 events through SQS, SNS or EventBridge

S3 → SQS
S3 → SNS → SQS

Identify the input

S3 arrival events reach a Snowflake-managed SQS queue. Direct notifications, SNS fan-out and EventBridge routing provide different delivery paths.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Identify the input

    S3 arrival events reach a Snowflake-managed SQS queue. Direct notifications, SNS fan-out and EventBridge routing provide different delivery paths.

  2. Follow delivery

    A dedicated learning prefix sends ObjectCreated events to the notification_channel returned for its pipe.

  3. Verify and recover

    Configure one delivery path. Preserve existing bucket notifications and subscriptions.

Try the SQL or command

Read → predict → run in your learning environment → compare. You can also learn by reading without an account.

New to SQL? Where to run it and how to read it

A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.

  1. No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
  2. For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
  3. Read the entire example, including comments beginning with --. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor.
  4. Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
SELECT / FROM
Choose the values to return / identify their input.
VALUES / COLUMN1
VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
AS / WITH
AS gives a result a readable name. WITH names a temporary query step within one statement.
NULL / ::
NULL means missing or unknown. The :: notation converts a value to a named data type.
Session
One connection and its settings. Keep related transaction steps in the same session.
Database.schema.table
A full address for stored data. It is separate from the warehouse that processes queries.

Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →

Help with common practice errors
  • No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
  • Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
  • Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
  • Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.

Before running this lesson

Manual examples only. Complete Modules 05–07 and the first lesson’s M8_LAB setup. Select L2_OBJECTS_LAB.M8_LAB in each SQL session. Replace every placeholder and choose exactly one cloud provider. Cloud IAM/notifications require authorized setup; streaming protocol outlines are explicitly non-executable. No credentials belong in this website.

Direct SQS path: create then inspect

SQL · example
CREATE PIPE M8_AUTO_PIPE AUTO_INGEST=TRUE AS
 COPY INTO L2_OBJECTS_LAB.M8_LAB.M8_FILE_EVENTS
 FROM @L2_OBJECTS_LAB.M8_LAB.M8_SOURCE
 FILE_FORMAT=(FORMAT_NAME='L2_OBJECTS_LAB.M8_LAB.M8_JSON');
SHOW PIPES LIKE 'M8_AUTO_PIPE' IN SCHEMA L2_OBJECTS_LAB.M8_LAB;

What to expect and why

Copy notification_channel into the S3 notification destination. Complete AWS configuration before uploading the lab fixture.

Alternative SNS path — instead of the direct pipe

SQL · example
CREATE PIPE M8_SNS_PIPE AUTO_INGEST=TRUE
 AWS_SNS_TOPIC='arn:aws:sns:<region>:<account-id>:<topic>' AS
 COPY INTO L2_OBJECTS_LAB.M8_LAB.M8_FILE_EVENTS
 FROM @L2_OBJECTS_LAB.M8_LAB.M8_SOURCE
 FILE_FORMAT=(FORMAT_NAME='L2_OBJECTS_LAB.M8_LAB.M8_JSON');

What to expect and why

Template only. Use this instead of the direct pipe after topic policies are configured; do not run both against the same source/target. EventBridge uses this same SNS-backed pipe.

Check your understanding

Choose an answer, then check your reasoning. This is practice, not a scored test.

Which component does EventBridge target in the documented pattern?

Try it yourself

Other applications already consume this prefix’s S3 notifications. What should you review?

Compare your reasoning

Review SNS fan-out or the existing EventBridge route instead of adding a conflicting direct bucket notification.

Official sources and curriculum

Module 08 · See module scope