Reputation: 1619
I'm trying to publish a message to an endpoint using ruby's sdk for aws sns. The documentation suggests that I can add TTL to the message attributes. However, the following code gives an argument error exception:
# ArgumentError:
# unexpected option message_attributes
@client.publish(:target_arn => endpoint_arn,
:subject => title,
:message_structure => "json",
:message => get_message(title, message).to_json,
:message_attributes => {
"AWS.SNS.MOBILE.APNS.TTL" => {
:data_type => "String",
:string_value => TTL_SECONDS
}
}
Upvotes: 2
Views: 531
Reputation: 1619
This option isn't available in older versions of the api. Upgrading to the newest version (1.48.1) solved the problem.
Upvotes: 2