Dagweave catalog

Publish to an SNS topic

sns-publishv1.0.0updated 2026-10-181 version

Publish a message to an Amazon SNS topic, which fans it out to the topic's subscribers, and pass its message id to later steps.

Install v1.0.0

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/sns-publish/1.0.0/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/sns-publish/1.0.0/template.yaml

Facts

Category
Notifications
Tags
aws-cli notifications
Entrypoint
publish
Template SHA-256
1882ed1e31db7d23772c72189e2f9e238d1d51db4823b0fccd4d02d721f2b9f5
Source
sns-publish at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
amazon/aws-cli2.39.3sha256:d557b3524475d70dd3104cf44d96568ee3188897b73a6ece2b37aa50e1af362f

Parameters

NameDescriptionDefault
message required Text of the message.
Example checkout-api 1.42.0 is live
none
topic-arn required ARN of the topic.
Example arn:aws:sns:us-east-1:123456789012:deploys
none
aws-access-key-id-key Key in that Secret that holds the access key id. access-key-id
aws-secret-access-key-key Key in that Secret that holds the secret access key. secret-access-key
aws-secret-name Name of the Kubernetes Secret that holds the AWS credentials. aws-credentials
message-group-id Message group id. Required by FIFO topics, leave blank for standard ones. empty
region AWS region of the resource. us-east-1
subject Subject line, used by email subscribers. Leave blank for none. empty

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: sns-publish
  labels:
    dagweave.io/catalog-item: sns-publish
  annotations:
    dagweave.io/catalog-version: "1.0.0"
    dagweave.io/catalog-category: "Notifications"
spec:
  entrypoint: publish
  templates:
    - name: publish
      inputs:
        parameters:
          - name: topic-arn
          - name: message
          - name: subject
            default: ""
          - name: message-group-id
            default: ""
          - name: region
            default: "us-east-1"
          - name: aws-secret-name
            default: "aws-credentials"
          - name: aws-access-key-id-key
            default: "access-key-id"
          - name: aws-secret-access-key-key
            default: "secret-access-key"
      outputs:
        parameters:
          # Id SNS gave the message.
          - name: message-id
            valueFrom:
              path: /tmp/message-id
      retryStrategy:
        limit: "2"
        retryPolicy: OnError
        backoff:
          duration: 10s
          factor: "2"
          maxDuration: 2m
      container:
        # amazon/aws-cli:2.39.3
        image: amazon/aws-cli@sha256:d557b3524475d70dd3104cf44d96568ee3188897b73a6ece2b37aa50e1af362f
        command: [sh, -c]
        args:
          - |
            set -eu
            set -- sns publish --topic-arn "${TOPIC_ARN}" --message "${MESSAGE}" --query MessageId --output text
            if [ -n "${SUBJECT}" ]; then set -- "$@" --subject "${SUBJECT}"; fi
            if [ -n "${MESSAGE_GROUP_ID}" ]; then set -- "$@" --message-group-id "${MESSAGE_GROUP_ID}"; fi
            aws "$@" | tee /tmp/message-id
        env:
          - name: TOPIC_ARN
            value: "{{inputs.parameters.topic-arn}}"
          - name: MESSAGE
            value: "{{inputs.parameters.message}}"
          - name: SUBJECT
            value: "{{inputs.parameters.subject}}"
          - name: MESSAGE_GROUP_ID
            value: "{{inputs.parameters.message-group-id}}"
          - name: AWS_DEFAULT_REGION
            value: "{{inputs.parameters.region}}"
          - name: AWS_ACCESS_KEY_ID
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.aws-secret-name}}"
                key: "{{inputs.parameters.aws-access-key-id-key}}"
          - name: AWS_SECRET_ACCESS_KEY
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.aws-secret-name}}"
                key: "{{inputs.parameters.aws-secret-access-key-key}}"
        resources:
          requests:
            cpu: 50m
            memory: 64Mi
          limits:
            memory: 256Mi

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.0 latest 2026-10-18

    Initial release.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/sns-publish/1.0.0/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/sns-publish/1.0.0/template.yaml

    version document, template.yaml

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/sns-publish \
  -p message='checkout-api 1.42.0 is live' \
  -p topic-arn=arn:aws:sns:us-east-1:123456789012:deploys

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: sns-publish-
spec:
  workflowTemplateRef:
    name: sns-publish
  arguments:
    parameters:
      - name: message
        value: "checkout-api 1.42.0 is live"
      - name: topic-arn
        value: "arn:aws:sns:us-east-1:123456789012:deploys"

As a step of a larger workflow

steps:
  - - name: sns-publish
      templateRef:
        name: sns-publish
        template: publish