Introduction to SES and SQS

Introduction to SES and SQS

SES(Simple Email Service)

  • AWS SES is stands for simple email service.
  • Sending email with AWS SES is really easy and straightforward.
  • By default, AWS SES only provides us a sandbox environment in order to prevent spamming.
  • In sandbox, you will only be able to send and receive emails from verified email addresses.
  • You can verify email address from here Simple Email Service (SES) >> Email Addresses

SES(Simple Email Service)


SES (Simple Email Service)

  • You can send two types of email like simple text email and email with template.
  • Here we are using AWS SDK for NODE(node-ses).


  • npm install node-ses

Small example

var ses = require(‘node-ses’)  , client = ses.createClient({ key: ‘key’, secret: ‘secret’ });// Give SES the details and let it construct the message for you.


to: ‘’

, from: ‘’

, cc: ‘’

, bcc: [‘’, ‘’]

, subject: ‘greetings’

, message: ‘your <b>message</b> goes here’

, altText: ‘plain text’

}, function (err, data, res) {


//OR use sendRawEmail


, from: ‘’

, rawMessage: rawMessage

}, function (err, data, res) {

// …


Send Email Params description

  • `from` – email address from which to send (required)
  • `subject` – string (required). Must be encoded as UTF-8
  • `message` – can be html (required). Must be encoded as UTF-8.
  • `altText` – plain text version of message. Must be encoded as UTF-8.
  • `to` – email address or array of addresses
  • `cc` – email address or array of addresses
  • `bcc` – email address or array of addresses
  • `replyTo` – email address

ToAddresses: This param should contains array of email address where you want to send an email.

Body.Html.Data: This param should contains  HTML message template. All the styles have to be inline

Body.Subject.Data: This param should contains subject of the email

Source: This param should contains an email address of the sender

ConfigurationSetName: Configuration Set name of SNS (Simple Notification Service) topic (Ignore if you don’t want to receive any notifications)

SQS(Simple Queue Service)

  • SQS stands for Simple Queue Service.
  • Using SQS, you can send, store, and receive messages between software components at any volume, without losing messages or requiring other services to be available.
  • Queuing service enables you to decouple and scale distributed systems, microservices and serverless applications.



Types of que

  • Standard Queue
  • FIFO Queue

Standard Queue

  • Unlimited Throughput:Standard queues support a nearly unlimited number of transactions per second (TPS) per API action.
  • At-Least-Once Delivery:A message is delivered at least once, but occasionally more than one copy of a message is delivered.
  • Best-Effort Ordering:Occasionally, messages might be delivered in an order different from which they were sent.

SQS (Simple Queue Service)Send data between applications when the throughput is important, for example:

  • Decouple live user requests from intensive background work: let users upload media while resizing or encoding it.
  • Allocate tasks to multiple worker nodes: process a high number of credit card validation requests.
  • Batch messages for future processing: schedule multiple entries to be added to a database.

FIFO Queue

  • High Throughput:FIFO queues support up to 300 messages per second (300 send, receive, or delete operations per second). When you batch 10 messages per operation (maximum), FIFO queues can support up to 3,000 messages per second. To request a limit increase, file a support request.
  • First-ln-First-out Delivery:The order in which messages are sent and received is strictly preserved.
  • Exactly-Once Processing:A message is delivered once and remains available until a consumer processes and deletes it. Duplicates are not introduced into the queue.

SQS (Simple Queue Service)

  • Send data between applications when the order of events is important, for example:
    • Ensure that user-entered commands are executed in the right order.
    • Display the correct product price by sending price modifications in the right order.
    • Prevent a student from enrolling in a course before registering for an account.


SQS (Simple Queue Service)SQS (Simple Queue Service)

The following two tabs change content below.
Viren Dave

Viren Dave

Sr. Software Developer (PHP) at Dev Information Technology Ltd.
I am a software developer since 6+ years. I am passionate for learning latest technologies also I would like to share my knowledge. My expertise is in building application in PHP, NodeJS, ReactJS, AngularJS
Viren Dave

Latest posts by Viren Dave (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>