If you want to send a message attributes using AWS SNS using CLI you can make use of the aws sns publish command and --message-attributes option.
Syntax:aws sns publish --topic-arn arn
--message "Testing AWS SNS with message attributes"
--message-attributes attribute_name={DataType=String,StringValue=value}
attribute_name={DataType=Number,StringValue=value}
Example:
aws sns publish
--topic-arn arn:aws:sns:us-east-1:13xx6xx9xx:smsTopic
--message "Important notification"
--message-attributes
Name={DataType=String,StringValue=Sam} Age={DataType=Number,StringValue=22}

-
Facing issues? Have Questions? Post them here! I am happy to answer!
More Posts related to AWS,
- Create S3 bucket and upload files using AWS Toolkit for Visual Studio Code
- Get the total size and number of objects of a AWS S3 bucket and folders
- Create an S3 bucket in a specific AWS region using CLI Command
- [Solution] AWS Java SDK S3 AmazonS3Exception InvalidAccessKeyId
- Fix AWS CLI 2 SignatureDoesNotMatch Error - Signature we calculated does not match
- 573 List of reserved keywords in AWS DynamoDB
- Quick way to setup AWS DynamoDB locally on macOS
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate
- Quick way to install AWS CLI for macOS Terminal
- Setting and Updating AWS CLI Configuration
- AWS S3 CLI BucketAlreadyExists when calling CreateBucket Error make_bucket failed
- How to install AWS Toolkit for Visual Studio Code
- Create S3 bucket using AWS CLI Command mb
- Fix: zsh: command not found: aws (Mac/macOS)
- How to install AWS CLI on Ubuntu
- Fix: Amazon Linux bash: sudo: command not found
- How to Setup AWS Credentials using Visual Studio Code
- AW3 CLI command to get list of all region names
- Most Essencial AWS CLI 2 S3 ls Command Options
- Install AWS CLI using Brew Command
More Posts:
- Android Launch! The connection to adb is down, and a severe error has occured - Android
- AWS SNS CLI Command Publish Message Attributes - AWS
- How to customize SharePoint Modern list form using JSON formatting - SharePoint
- Python: Pandas Merge Indicator (Left, Right and Both) Example - Python
- Duplicate id @+id/textView1, already defined earlier in this layout Android Error - Android
- Java get day of the week as an int using DayOfWeek - Java
- List of Java Keywords - Java
- [FIX] AndroidRuntime: FATAL EXCEPTION: main - java.lang.RuntimeException NullPointerException - Android