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.
- Sign in to the EC2 instance using the credentials provided.
- Create your SQS queue using the
create_queue.py
script. - 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.
- Make sure you have already created the SQS queue and copied the queue URL to the
sqs_url.py
file. - Review the JSON data files in the EC2 instance.
- Remember to start up the
queue_status.py
script. - Run the Python3 producer scripts to send messages to the SQS queue.
- Run the Python3 consumer scripts to get, process, and delete messages in the SQS queue.
- If you need to start over at any point, you can start over with the
purge_queue.py
script.
- Make sure you have already created the SQS queue and copied the queue URL to the