Working with AWS SQS Standard Queues

1 hour
  • 2 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you will learn how to create and interact with SQS standard queues. You will send messages to an SQS queue that you create and learn how to take advantage of SQS queues to use multiple SQS consumers to process queue data at the same time! By the end of this AWS learning activity, you should feel comfortable interacting with the SQS service via the Boto3 SDK for Python. You will also gain an understanding of how to send messages to standard queues, set queue attributes, and consume messages from the queues we create.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a Standard SQS Queue

Use the EC2 instance provided to create an SQS queue.

  1. Sign in to the EC2 instance using the credentials provided.
  2. Create your SQS queue using the create_queue.py script.
  3. Make sure you copy the queue URL inside the sqs_url.py file.
Interact with the New SQS Queue

Use the AWS CLI and the Python3 scripts inside of the EC2 instance provided to send and receive messages.

  1. Make sure you have already created the SQS queue and copied the queue URL to the sqs_url.py file.
  2. Review the JSON data files in the EC2 instance.
  3. Remember to start up the queue_status.py script.
  4. Run the Python3 producer scripts to send messages to the SQS queue.
  5. Run the Python3 consumer scripts to get, process, and delete messages in the SQS queue.
  6. If you need to start over at any point, you can start over with the purge_queue.py script.

Additional Resources

Make sure to sign into the EC2 instance workspace provided with multiple different terminals. We'll be using 5 terminals at the same time during a part of this activity.

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?