Optimizing SQS Usage to Cut Costs

15 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Your organization noticed that costs for SQS went up and have asked your team to investigate. You found that message requests are high, but there is not an equivalent rise in user activity. There are several CloudWatch metrics that raise some concerns. The first is the `NumberOfEmptyReceives` metric. This metric supports the idea that roughly out of every 10 messages received, we have about 30 empty receives. That will surely raise our costs. The other CloudWatch metric, `SentMessageSize`, reports the size of the messages is 256 KB, but these messages can be reduced to plain text to lower the size to 64 KB, which will cut costs as well.

We will review current costs in SQS and the costs of the proposed changes before we move forward with those changes. Then, we will need to create an SQS queue that allows for long polling at 20 seconds to cut the number of empty receives and limit message size to 64 KB. Finally, we will test our SQS queue to ensure that it is able to send and receive messages.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Compare Costs

We will use the AWS Pricing Calculator to review current costs and costs of our proposed changes.

Create and Test SQS Queue

We will create our SQS queue to the specifications necessary and then test it 2 ways.

Additional Resources

Lab Setup

  • Compare Costs:
  • Create and Test SQS Queue:
    • For Create the SQS Queue and Test the SQS Queue Within the Console, log in to the AWS Management Console using the credentials provided on the lab instructions page. Make sure you're using the us-east-1 Region.
    • For Test the SQS Queue from the EC2 Instance, log in to the server using the credentials provided:
ssh cloud_user@<PUBLIC_IP_ADDRESS>

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?