Advertisements
Skip to content

Set Message Attribute on SQS Message

Example on setting message attribute on SQS Message. Subscribers can perform actions based on the attributes.

 queue.send_message(MessageBody=json.dumps(instance),
                                               MessageAttributes={
                                                   'instance_id': {
                                                       'DataType': 'String',
                                                       'StringValue': instance['InstanceId']
                                                   }
                                               }
                                               )
Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: