aws-scheduler
aws-scheduler copied to clipboard
Error "A provided account ID is not valid" when trying init output topic
When I try to run init_output_topic.py
I get error
$ python3 ./setup/init_output_topic.py dev public
Creating topic scheduler-output-v2-dev
Created topic scheduler-output-v2-dev with arn arn:aws:sns:us-east-1:829736848236:scheduler-output-v2-dev
Granting publish rights to scheduler-output-v2-dev topic for role public
Traceback (most recent call last):
File "./setup/init_output_topic.py", line 28, in <module>
permission_response = client.add_permission(
File "/home/apollon/.local/lib/python3.8/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/apollon/.local/lib/python3.8/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameter) when calling the AddPermission operation: Invalid parameter: A provided account ID is not valid
I see that you ran the command python3 ./setup/init_output_topic.py dev public
where the documentation (as far as I still remember/read it correctly) says you should only run python3 ./setup/init_output_topic.py dev
(without the public). If you haven't done that yet, please try it. If you added public
on purpose, could you elaborate why?
You could also try replacing public
with your account ID, as that one gets used in https://github.com/bahrmichael/aws-scheduler/blob/master/setup/init_output_topic.py#L31.
If I try without the public, I get an error
$ python3 ./setup/init_output_topic.py dev
Missing argument for stage and role
I tried to run the command with AWS AcounntId and the script seems to work correctly.