Amazon AWS SQS
19 min
the amazon aws sqs connector facilitates the integration of aws's message queuing capabilities into swimlane's automated workflows, allowing for efficient message handling and queue management amazon aws sqs (simple queue service) is a highly scalable, reliable, and secure message queuing service that enables asynchronous message based communication between distributed software components the aws sqs connector for swimlane turbine allows users to create and manage sqs queues, send messages, and set queue attributes directly within security workflows by integrating with aws sqs, swimlane turbine users can enhance their automation capabilities, ensuring secure message handling and streamlined communication in complex security operations prerequisites to utilize the amazon aws sqs connector with swimlane turbine, ensure you have the following aws authentication credentials access key id your unique aws access key for api access secret key the secret key paired with your access key for secure api communication region name the aws region where your sqs resources are hosted getting started before you begin, ensure you meet the following prerequisites you must have valid aws access credentials (access key id and secret access key) associated with your aws account you must have a valid role arn (amazon resource name) which your user can assume you need to know the aws region where your sqs queue is located capabilities this connector has the following capabilities create queue send message set queue attributes key features the amazon sqs connector offers a robust capability aimed at improving the efficiency of your messaging operations send message to queue allows you to send a message to a specific sqs queue this requires the url of the sqs queue and the message body as inputs you may optionally specify additional attributes such as delay seconds, message attributes, or message system attributes please note that your ability to use this feature effectively may depend on the permissions and access rights tied to your aws account always ensure that your account has sufficient privileges for the operations you wish to carry out in particular, to be able to send a message to an sqs queue, the iam user or role should have the following permissions sqs\ sendmessage allows a user to send a message to a specific sqs queue it's essential to correctly set these permissions in the aws iam management console if you're using a role, remember that you need to have the sts\ assumerole permission and the role's trust policy should allow the user to assume the role additional notes for set queue attributes action, under the attributes parameter, please pass the required input fields are per this api docs shown here https //boto3 amazonaws com/v1/documentation/api/1 26 93/reference/services/sqs/client/set queue attributes html configurations aws sqs authenticates using aws credentials configuration parameters parameter description type required aws access key id a specific aws access key id string required aws secret access key a specific aws secret access key string required region name the aws region where you want to create new connections string required role arn arn role string optional actions create queue creates a new standard or fifo queue in amazon aws sqs with customizable attributes endpoint method get input argument name type required description queuename string required the name of the new queue attributes object optional parameter for create queue delayseconds number optional the length of time, in seconds, for which the delivery of all messages in the queue is delayed valid values are integer from 0 to 900 seconds (15 minutes) maximummessagesize number optional the limit of how many bytes a message can contain before amazon sqs rejects it valid values are integer from 1,024 bytes (1 kib) to 262,144 bytes (256 kib) messageretentionperiod number optional the length of time, in seconds, for which amazon sqs retains a message valid values are integer from 60 seconds (1 minute) to 1,209,600 seconds (14 days) default is 345,600 (4 days) policy string optional the queue’s policy a valid amazon web services policy receivemessagewaittimeseconds number optional the length of time, in seconds, for which a receivemessage action waits for a message to arrive valid values are integer from 0 to 20 (seconds) default is 0 redrivepolicy string optional the string that includes the parameters for the dead letter queue functionality of the source queue as a json object visibilitytimeout string optional the visibility timeout for the queue, in seconds valid values are integer from 0 to 43,200 (12 hours) default is 30 fifoqueue boolean optional designates a queue as fifo valid values are true and false if you don’t specify the fifoqueue attribute, amazon sqs creates a standard queue contentbaseddeduplication boolean optional enables content based deduplication valid values are true and false kmsmasterkeyid string optional the id of an amazon web services managed customer master key (cmk) for amazon sqs or a custom cmk kmsdatakeyreuseperiodseconds number optional the length of time, in seconds, for which amazon sqs can reuse a data key to encrypt or decrypt messages before calling kms again an integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours) default is 300 (5 minutes) deduplicationscope string optional specifies whether message deduplication occurs at the message group or queue level valid values are messagegroup and queue fifothroughputlimit string optional specifies whether the fifo queue throughput quota applies to the entire queue or per message group sqsmanagedsseenabled boolean optional enables server side queue encryption using sqs owned encryption keys tags object optional parameter for create queue team string optional parameter for create queue output parameter type description result object result of the operation queueurl string url endpoint for the request example \[ { "result" { "queueurl" "string" } } ] send message delivers a message to the specified amazon aws sqs queue using queueurl and messagebody endpoint method get input argument name type required description queueurl string required url endpoint for the request messagebody string required request body data delayseconds number optional parameter for send message messageattributes object optional response message messagesystemattributes object optional response message messagededuplicationid string optional unique identifier messagegroupid string optional unique identifier output parameter type description md5ofmessagebody string request body data md5ofmessageattributes string response message messageid string unique identifier responsemetadata object response data requestid string unique identifier httpstatuscode number status value httpheaders object http headers for the request x amzn requestid string unique identifier date string date value content type string type of the resource content length string response content retryattempts number output field retryattempts example \[ { "md5ofmessagebody" "fafb00f5732ab283681e124bf8747ed1", "md5ofmessageattributes" "640e62a86cc98826fe79f68e51611abe", "messageid" "da30c03c cfaf 4645 8c58 715c9ee8f4f4", "responsemetadata" { "requestid" "eef200f3 1d69 5b2c 9688 5c02dde25c21", "httpstatuscode" 200, "httpheaders" {}, "retryattempts" 0 } } ] set queue attributes set multiple attributes for a specified amazon aws sqs queue, such as permissions and policies endpoint method get input argument name type required description queueurl string required url endpoint for the request attributes object required parameter for set queue attributes delayseconds number optional the length of time, in seconds, for which the delivery of all messages in the queue is delayed maximummessagesize number optional the limit of how many bytes a message can contain before amazon sqs rejects it messageretentionperiod number optional the length of time, in seconds, for which amazon sqs retains a message policy string optional the queue's policy a valid amazon web services policy receivemessagewaittimeseconds number optional the length of time, in seconds, for which a receivemessage action waits for a message to arrive valid values are integer from 0 to 20 (seconds) redrivepolicy string optional the string that includes the parameters for the dead letter queue functionality of the source queue as a json object visibilitytimeout number optional the visibility timeout for the queue, in seconds valid values are integer from 0 to 43,200 (12 hours) fifoqueue boolean optional indicates whether the queue is fifo (first in first out) contentbaseddeduplication boolean optional enables content based deduplication for fifo queues kmsmasterkeyid string optional the id of an amazon web services managed customer master key (cmk) for amazon sqs or a custom cmk kmsdatakeyreuseperiodseconds number optional the length of time, in seconds, for which amazon sqs can reuse a data key to encrypt or decrypt messages before calling kms again deduplicationscope string optional specifies whether message deduplication occurs at the message group or queue level valid values are messagegroup and queue fifothroughputlimit string optional specifies whether the fifo queue throughput quota applies to the entire queue or per message group valid values are perqueue and permessagegroupid sqsmanagedsseenabled boolean optional enables server side queue encryption using sqs owned encryption keys only one server side encryption option is supported per queue (e g sse kms or sse sqs) output parameter type description result string result of the operation example \[ { "result" "queue attributes set successfully " } ]