botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameter) when calling the Subscribe operation: Invalid parameter: Invalid protocol type: application #3407
Unanswered
sandeepks230
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @sandeepks230, thanks for reaching out. I tried to reproduce with your code and didn't get the same error. I would double check on the parameters' values you have in your code. Here's the docs on SNS If you're still having issue, please share the full debug logs by adding |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to subscribe an endpoint to a topic using boto3. But I am getting this error:
Traceback (most recent call last):
File "/home/st0096/PycharmProjects/pythonProject/notificationsnstest.py", line 22, in
response = sns_client.subscribe(
File "/home/st0096/.local/lib/python3.10/site-packages/botocore/client.py", line 514, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/st0096/.local/lib/python3.10/site-packages/botocore/client.py", line 934, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameter) when calling the Subscribe operation: Invalid parameter: Invalid protocol type: application
This is my code:
`sns_client = boto3.client(
service_name="sns", aws_access_key_id=SNS_ACCESS_KEY_ID,
aws_secret_access_key=SNS_SECRET_ACCESS_KEY,
region_name=SNS_REGION_NAME, use_ssl=True)
response = sns_client.subscribe(
TopicArn=topic,
Protocol='application',
Endpoint=endpoint,
ReturnSubscriptionArn=True
)`
Beta Was this translation helpful? Give feedback.
All reactions