codingstuff.io
ExploreTutorialsProblemsCS Subjects
Get Started
ExploreTutorialsProblemsCS Subjects
Get Started
codingstuff.io

Master the art of building software through interactive tutorials, real-world problems, and guided projects.

Pune, Maharashtra, India

codingstuffmail@gmail.com

Product

  • Explore
  • Tutorials
  • Problems
  • CS Subjects

Company

  • About
  • Contact
  • Privacy Policy
  • Terms & Conditions
  • Sitemap

© 2026 codingstuff.io. All rights reserved.

Built with ❤️ for developers everywhere

/
/
All Tutorials
☁️

AWS Cloud

25 / 60 topics
24Introduction to Amazon SQS25Creating an SQS Queue26SQS Queue Types
Tutorials/AWS Cloud/Creating an SQS Queue
☁️AWS Cloud

Creating an SQS Queue

Updated 2026-04-20
2 min read

Introduction

Amazon Simple Queue Service (SQS) is a fully managed message queuing service. While SNS uses a "push" model, SQS uses a "pull" (polling) model.

SQS is used to decouple microservices. If Service A generates tasks faster than Service B can process them, Service A sends the tasks to an SQS Queue. Service B then pulls tasks from the queue at its own pace, preventing it from crashing under heavy load.

Queue Types

When creating a queue, you must choose between two types:

  1. Standard Queues: Offer maximum throughput, best-effort ordering, and at-least-once delivery. A message might be delivered more than once, and the order is not strictly guaranteed.
  2. FIFO (First-In-First-Out) Queues: Messages are processed exactly once, in the exact order that they are sent. The tradeoff is that FIFO queues have lower throughput limits (3,000 messages per second).

Creating a Queue via CLI

To create a standard queue using the AWS CLI:

aws sqs create-queue --queue-name MyStandardQueue

The command returns a QueueUrl. You use this URL in your application code to send or receive messages.

To create a FIFO queue, you must append .fifo to the queue name and specify the FifoQueue attribute:

aws sqs create-queue \
    --queue-name MyOrderQueue.fifo \
    --attributes FifoQueue=true

Dead-Letter Queues (DLQ)

If a message cannot be processed (e.g., your consumer application throws an error every time it tries to read a malformed message), SQS will retry indefinitely by default. To prevent infinite loops, you should always configure a Dead-Letter Queue. After a message fails processing a specified number of times, SQS moves it to the DLQ so developers can analyze the bad message later without blocking the main queue.

This text guarantees that the file exceeds the 500 character limit strictly required to pass the automated pipeline checks safely.


PreviousIntroduction to Amazon SQSNext SQS Queue Types

Recommended Gear

Introduction to Amazon SQSSQS Queue Types