Varun Mehta
Varun Mehta

Reputation: 111

SNS notification scheduling

Is it possible to schedule our push notification through SNS (to send it at a particular time of the day) which we are able to parse or moengage?

Upvotes: 2

Views: 10599

Answers (2)

Ihor Konovalenko
Ihor Konovalenko

Reputation: 1407

AWS contain EventBridge service that we can use to send a message to an Amazon SNS topic on a schedule. Amazon EventBridge is a serverless event bus service that makes it easy to connect your applications with data from a variety of sources. According to AWS docs, Amazon EventBridge is the preferred way to manage your events. CloudWatch Events and EventBridge are the same underlying service and API, but EventBridge provides more features.

You can configure the following AWS resources as targets for EventBridge:

  • List item
  • Lambda functions
  • Amazon EC2 instances
  • Streams in Amazon Kinesis Data Streams
  • Delivery streams in Amazon Kinesis Data Firehose
  • Log groups in Amazon CloudWatch Logs
  • Amazon ECS tasks
  • Systems Manager Run Command
  • Systems Manager Automation
  • AWS Batch jobs
  • AWS Step Functions state machines
  • Pipelines in AWS CodePipeline
  • AWS CodeBuild projects
  • Amazon Inspector assessment templates
  • Amazon SNS topics
  • Amazon SQS queues
  • Systems Manager OpsItems
  • Built-in targets: EC2 CreateSnapshot API call, EC2 RebootInstances API call, EC2 StopInstances API call, and EC2 TerminateInstances API call
  • The default event bus of another AWS account
  • Amazon API Gateway REST API endpoints
  • Amazon Redshift clusters (Data API statement execution)

Upvotes: 1

John Rotenstein
John Rotenstein

Reputation: 269370

You can use CloudWatch Events to send a message to an Amazon SNS topic on a schedule. (Note: CloudWatch Events is not available in every region.)

CloudWatch Events can be triggered by:

  • A schedule (eg every hour, or with a cron expression)
  • An API call (eg whenever an EC2 instance is launched)
  • Auto Scaling (eg an instance is removed)
  • An EC2 instance changes state (eg terminates)

CloudWatch Events can trigger:

  • A message to an Amazon SQS queue
  • A message to an Amazon SNS topic
  • A message to an Amazon Kinesis stream
  • An AWS Lambda function
  • The start/stop/termination of an Amazon EC2 instance
  • Creation of an Amazon EBS snapshot

See documentation: Using CloudWatch Events

Upvotes: 8

Related Questions