amazon web services - Shorthand syntax for message-attributes in the send-message command in aws-cli for sqs -
when trying send message using aws cli sqs, cannot shorthand syntax --message-attributes
parameter work.
specifying json file works fine, , reference doesn't show example shorthand option.
here reference command specifies shorthand i'm trying use can't work: http://docs.aws.amazon.com/cli/latest/reference/sqs/send-message.html
here's command i've tried:
aws sqs send-message --queue-url https://sqs.us-east-1.amazonaws.com/0000000000/aa_queue_name --message-body "message body goes here" --message-attributes firstattribute={datatype=string,stringvalue="hello world"},secondattribute={datatype=string,stringvalue="goodbye world"}
i keep getting error messages:
parameter validation failed: invalid type parameter messageattributes.contenttype, value: stringvalue=snapshot, type: , valid types:
anyone ever managed sending attributes message using shorthand?
currently, documentation of short-hand syntax --message-attributes
option incorrect , short-hand syntax not work.
instead, can use json file (as mentioned). can use inline json:
aws sqs send-message --queue-url https://sqs.us-east-1.amazonaws.com/0000000000/aa_queue_name --message-body "message body goes here" --message-attributes '{ "firstattribute":{ "datatype":"string","stringvalue":"hello world" }, "secondattribute:{ "datatype":"string","stringvalue":"goodbye world" }'
Comments
Post a Comment