How to use the MessageAttribute parameter in aws sqs

Hi,

I’m trying to add the humidity and temperature values that I read from the device as a MessageAttribute (along with other data that I send).
When I send the data without the MessageAttribute, it delivered fine. But when I add the MessageAttribute to the sendParams, the data is not transferred (probably I do not use it right).

This is how I try using it:
// SQS send message parameters
local sendParams = {
“QueueUrl” : “URL”,
“MessageGroupId” : format("%s",theDeviceID),
“MessageBody” : Data,
“MessageAttribute.1.Name” : “Temperature”,
“MessageAttribute.2.Name” : “Humidity”,
“MessageAttribute.1.Value” : Temperature,
“MessageAttribute.2.Value” : Humidity,
“MessageAttribute.1.Type” : “String”,
“MessageAttribute.2.Type” : “String”,
“MessageDeduplicationId” : id
};