Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to get the queue before creating it to avoid the AccessDenied error #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dvazar
Copy link
Contributor

@dvazar dvazar commented Jul 24, 2023

There are situations in which clients are limited in the rights to create queues, i.e. queues are created manually on the DevOps side, and clients are given only read-write permissions to these queues.
The previous implementation of queue registration leads to an error:
An error occurred (AccessDenied) when calling the CreateQueue operation: User: arn:aws:sts::*** is not authorized to perform: sqs:createqueue on resource: arn:aws:sqs:us-west-2:*** because no identity-based policy allows the sqs:createqueue action
To avoid this error, it is suggested to first try to get this queue and if it does not exist, create it.

Related issue #14

…eate queues, i.e. queues are created manually on the DevOps side, and clients are given only read-write permissions to these queues.

The previous implementation of queue registration leads to an error:
```
An error occurred (AccessDenied) when calling the CreateQueue operation: User: arn:aws:sts::*** is not authorized to perform: sqs:createqueue on resource: arn:aws:sqs:us-west-2:*** because no identity-based policy allows the sqs:createqueue action
```
To avoid this error, it is suggested to first try to get this queue and if it does not exist, create it.
@dvazar
Copy link
Contributor Author

dvazar commented Sep 1, 2023

@Bogdanp Could you please take a look on this pull-request? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant