I am working with AWS SNS services and completed the initial setup as the AWS documentation. I just needed to test it using aws-cli. So I used the following command to publish a test message to SNS topic from my local PC.
aws sns publish --topic-arn "arn:aws:sns:us-east-1:xxxxxxxxxxx:test-notification-service" --message "Hello, from SNS"
However, I got stuck on the following generic error. It just says Invalid Parameter. I have configured the ~/.aws/credentials as needed.
An error occurred (InvalidParameter) when calling the Publish operation: Invalid parameter: TopicArn
aws configure get region
to see your default region set in AWS CLI – Aatish Sai