All Collections
Schedules and Triggers
Using Amazon SNS to Trigger Actions
Using Amazon SNS to Trigger Actions
Matt Houser avatar
Written by Matt Houser
Updated over a week ago

Typically, actions are started based on a pre-defined schedule. For example, once a day. However, there are times where you may want an action to start based on an event that has occurred. An Amazon CloudWatch alert, for example.

Each action can be triggered using a unique URL specific to that action. To enable an action for triggering from SNS, please follow these steps.

In Skeddly

1. Edit the action you want to enable for SNS triggering.
2. Ensure the action is Enabled. If it should not execute by any schedule, you can set it's "Repeat Type" to "None".
3. Check the option called "Trigger by SNS".
4. Click the link "Endpoint" to display the SNS Endpoint to be used to start this action. Copy this URL.

In the Amazon AWS Management Console

1. Navigate to the Amazon SNS Dashboard in the Amazon AWS Management Console.
2. If you have not already done so, create a new SNS topic.
3. Create a new subscription. In the dialog that appears, select "HTTPS" for the Protocol, and use the above URL as the Endpoint.

4. Click "Subscribe".

At first, the SNS Dashboard will indicate that the subscription is "PendingConfirmation". During this time, Amazon SNS is sending a subscription request to us. If we receive a valid subscription request, we will confirm subscription automatically.

Executing Your Action

Once your SNS topic is configured, you can send an SNS messages to your SNS topic. AWS will notify Skeddly and your trigger will execute.

Using the AWS CLI, you can use the following command:

aws sns publish --topic-arn "arn:aws:sns:us-east-1:0123456789012:my-topic" --message "Any message"

The body of the message does not matter. Skeddly will execute the action simply when it receives a message.

Did this answer your question?