raol / amazon-sqs-net-extended-client-lib

Extension to Amazon SQS that adds support for sending and receiving messages greater than 256K
Apache License 2.0
39 stars 33 forks source link

AWS SQS : The remote server returned an error: (403) Forbidden #12

Closed yuvayuvips closed 4 years ago

yuvayuvips commented 6 years ago

Hi, we are using DLL in an external application to create/delete messages in AWS SQS queue. But for few cases we are getting error message as follows, we have verified that no issues with AWS policy/access because its getting failed for few cases and those are getting processed during retries sometime later.

Retry Attempt--5--Message --Access to the resource https://sqs.eu-west-1.amazonaws.com/719848509458/techservices-automation-kofax-out-prd is denied.Inner Exce--Amazon.Runtime.Internal.HttpErrorResponseException: The remote server returned an error: (403) Forbidden. ---> System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.HttpWebRequest.GetResponse() at Amazon.Runtime.Internal.HttpRequest.GetResponse() --- End of inner exception stack trace --- at Amazon.Runtime.Internal.HttpRequest.GetResponse() at Amazon.Runtime.Internal.HttpHandler`1.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.Unmarshaller.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.SQS.Internal.ValidationResponseHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.ErrorHandler.InvokeSync(IExecutionContext executionContext)

raol commented 5 years ago

Hi, do you have any stable way to reproduce the issue? And if you're still experiencing the problem, it would be helpful to have the whole response from the SQS, not just a stacktrace. Also, since you claim that error responses are kind of rare, it may be ThrottlingException, AWS replies with 403 on throttling errors. More details here https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/CommonErrors.html