11
The approach here will not scale, however! With multiple users executing the state machine concurrently, calls
to “aws sqs receive-message” are not client specific. All of the results from the state machine are posted to the
same queue. It is possible to tag messages with a “GroupId” or a “DeduplicationId” for this purpose. This allows
filtering of messages. If sharing a queue with many users, it may be necessary to pull batches of messages, filter
them, and only consume and delete the client’s specific message. For these reasons, S3 may be preferable
method for returning a single state machine result to a client as it can be tagged by the client through the
workflow. Message queues are more ideally suited for distributed systems to orchestrate multiple nodes
consuming and operating on shared data.
Now, test your callstepfunction.sh BASH client and check out how well SQS works as an alternative to
polling the aws stepfunctions describe-execution API.
Tutorial 9 is optional and offered as extra credit in fall 2022.
To submit this tutorial
To submit tutorial #9, a Zoom recording should be made demonstrating that Tutorial 9 is working properly. Mp4
recordings can be made using Zoom. Create a personal Zoom session. Share the screen. Record your video to
the cloud. While demonstrating operation of the script, feel free to speak and describe what is happening. After
recording the video, upload the mp4 to Google Drive. Set the file so the course grader and instructor have read
submission for tutorial 9.
To submit your tutorial, upload each of the following to Canvas:
1. VIDEO LINK: IF YOU WERE UNABLE TO PRESENT A WORKING SCRIPT OVER A LIVE ZOOM SESSION: please
provide an mp4 video recording, or a PDF file with a URL to the recording made using Zoom. Videos can
alternatively be hosted on Google Drive, a personal web server, or on YouTube. Please include a publicly
accessible URL for the video to receive credit.
2. callstatemachine.sh Bash script
3. <OPTIONAL> screen captures can optionally be provided as a BACKUP in addition to the video recording
For the demonstration, be sure to start with an empty queue.
SQS messages can be purged using the GUI.
Then demonstrate calling the state machine by calling it twice with two different JSON messages.
Message 1: encode-→ decode “this is a unique message”
Message 2: encode → decode “second message of the demo”
The strings must be different.
The demo must show where in the callservice.sh BASH script the JSON object is created.
Alternatively, the BASH script can echo to the screen the message text before processing with Encode.