Boto3: Errorneous SNS publish error message when wrong region selected

Created on 19 May 2016  路  1Comment  路  Source: boto/boto3

When a session is started with eu-central-1:

self.aws_session = boto3.session.Session(
            aws_access_key_id=payload['aws_access_key_id'],
            aws_secret_access_key=payload['aws_secret_access_key'],
            region_name=self.region_name
)
self.sns = self.aws_session.client('sns')

and we call self.sns.publish with a TopicArn in us-east-1, it gives the following error:

botocore.exceptions.ClientError: An error occurred (InvalidParameter) when calling the Publish operation: Invalid parameter: TopicArn

This is not self-explanatory. I couldn't realize I was using a Topic in a wrong region.

api-documentation

Most helpful comment

ClientErrors are what the service sends back, so you should let the service team know on their forum that their error message is not very helpful. I'm gonna close out this issue, but feel free to update when you get a response!

>All comments

ClientErrors are what the service sends back, so you should let the service team know on their forum that their error message is not very helpful. I'm gonna close out this issue, but feel free to update when you get a response!

Was this page helpful?
0 / 5 - 0 ratings