I would like to set AWS.SNS.SMS.SenderID when sending SMS via Amazon SNS.
This code successfully send message, but sender ID wan not MySenderID and instead phone number is shown.
@sns_client ||= Aws::SNS::Client.new(region: "ap-northeast-1", credentials: credentials)
@sns_client.publish(
phone_number: "+81xxxxxxxxxx",
message: message,
message_attributes: {
"AWS.SNS.SMS.SMSType" => { data_type: "String", string_value: "Transactional" },
"AWS.SNS.SMS.SenderID" => { data_type: "String", string_value: "MySenderID" }
}
)
Since I can successfully set sender ID via web console, there should be a way to set it programaticcally in Ruby.
How can I set senderID?