Create Topic

In this article

Overview

You can use this Snap to create a topic, a logical access point that acts as a communication channel in Amazon Simple Notification Service (Amazon SNS). A topic lets you group multiple endpoints (such as AWS Lambda, Amazon SQS, HTTP/S, or an email address). You can create both Standard and  FIFO (first in, first out) topics to broadcast the messages of a message-producer system (for example, an e-commerce website) working with multiple services that require its messages.


Prerequisites

Valid AWS Account and SNS access.

Support for Ultra Pipelines

Works in Ultra Pipelines. 

Limitations and Known Issues

None.

Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min: 0

  • Max: 1

  • Mapper

  • File Reader

The region, name, attributes, tag attributes, and other details of the topic.

Output

Document

  • Min: 0

  • Max: 1

  • Copy

  • Head

  • Filter

  • Confirm Topic

  • Delete Topic

The created topic meets the required criteria.

Error

Error handling is to have a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that might arise while running the Pipeline by choosing one of the options from the When errors occur section under the Views tab.

The options available are:

  • Stop Pipeline Execution: Stops the current pipeline execution when an error arises.

  • Discard Error Data and Continue: Ignores an error completely, discard that record, and continue with the rest of the records.

  • Route Error Data to Error View: Routes the data to an error view of the Snap and then decides what to do with the error.

See Error View in Pipeline in examples to understand the Snap error view settings and error output. For more information on the error view and handling error output in a Pipeline, see Error handling in Pipelines.

Snap Settings

  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon (): Indicates that you can add fields in the field set.

  • Remove icon (): Indicates that you can remove fields from the field set.

Field Name

Field Type

Field Dependency

Description

Field Name

Field Type

Field Dependency

Description

Label*

 

Default Value: Create topic
Example: Create topic

String

None

Specify the unique name of the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.

Region

 

Default Value: N/A
Example: us-east-1, us-west-1

String/Suggestion

None

Specify the AWS region where an application is implemented. If the region field is empty, then the Snap evaluates the region in the following sequence:

  • The Topic Arn or Subscription ARN

  • The region of the EC2 instance.

It is a best practice to provide value for the Region field.

Topic Name*

 

Default Value: N/A
Example: Topic 1

String

None

Specify the name of the target topic.

 

Attributes

Use this field set to define attributes for the new entry.

Attribute Name

 

Default Value: N/A
Example: displayName

String/Suggestion

None

Choose the attribute name:

  • DeliveryPolicy: The policy that defines how Amazon SNS retries failed deliveries to HTTP/S endpoints.

  • Displayname: The display name to use for a topic with SMS subscriptions.

  • FifoTopic: When you select FifoTopic, the topic name should be with the extension .fifo and the Attribute value should be true.

  • Policy: The policy that defines the users who can access your topic. By default, only the topic owner can publish or subscribe to the topic.

  • KmsMasterkeyId: The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms. For more examples, see KeyId in the AWS Key Management Service API Reference.

  • ContentBasedDeduplication: Enables content-based deduplication for FIFO topics.

Attribute Value

 

Default Value: N/A
Example: $displayName

String

None

Specify a value for the attribute name.

 

Tag Attributes

Use this field set to define tag attributes for the new entry.

Tag Name

 

Default Value: N/A
Example: tag1

String

None

Specify a name for the tag attribute.

Value


Default Value: N/A
Example: tag_Name1

String

None

Specify a name for the tag value.

Snap Execution

 

 

Default Value: Execute only
Example: Validate & Execute

Dropdown list

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Troubleshooting

Error

Reason

Resolution

Error

Reason

Resolution

An error occurred while creating a topic with the given topic name in AWS SNS.

Valid information might be missing.

Check the input data, formats and try again

One or more Pipeline parameters are given in the account.

Validation is not applicable for Pipeline parameters.

Do not validate the account if Pipeline parameters are provided.

Examples

The following example Pipeline demonstrates how to create a topic with the attribute name, tag attributes, and other details.

In the following Mapper Snap, the topic name and other details are provided. A topic name and the topic details are given as inputs to the Delete Topic Snap. The Mapper Snap is configured with the following details and the output view is displayed is as follows. Delete Topic Snap is used before Create Topic to avoid overwriting the data in the topic.

Next, we configure Create Topic Snap with the following attributes and tag attributes.

The output view of the Snap is displayed as follows:

The topic is created with the given details.

Downloads

  File Modified

File AWS_SNS_Create topic.slp

Nov 12, 2021 by Shilpa

Snap Pack History

 


Related Content

Amazon SNS Snap Pack

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439233/Glossary

https://docs-snaplogic.atlassian.net/wiki/spaces/AP/pages/1438341

https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439233/Glossary

Â