Topic on Extension talk:AWS

Internal error when using without configuring SQS

3
Summary by Edward Chernenko

archived, no longer actual: current version of extension (as of 10 Oct 2018) no longer provides SQS features (only S3 features)

Dantman (talkcontribs)

If I try using this extension without configuring the SQS job queue (ie: I don't even want to use it at all and I omit config for it) then I get this exception:

[b279a293] /help/Contents MWException from line 116 of {testwiki}/extensions/AWS/sqs/JobQueueAmazonSqs.php: Amazon SQS error: Access to the resource https://sqs.us-west-2.amazonaws.com/ is denied.

Backtrace:

#0 {testwiki}/extensions/AWS/sqs/JobQueueAmazonSqs.php(301): JobQueueAmazonSqs->connect()
#1 {testwiki}/extensions/AWS/sqs/JobQueueAmazonSqs.php(202): JobQueueAmazonSqs->getAttributes()
#2 {testwiki}/extensions/AWS/sqs/JobQueueAmazonSqs.php(208): JobQueueAmazonSqs->doGetSize()
#3 {testwiki}/includes/jobqueue/JobQueue.php(184): JobQueueAmazonSqs->doIsEmpty()
#4 {testwiki}/includes/jobqueue/JobQueueGroup.php(283): JobQueue->isEmpty()
#5 {testwiki}/includes/jobqueue/JobQueueGroup.php(259): JobQueueGroup->getQueuesWithJobs()
#6 {testwiki}/includes/MediaWiki.php(635): JobQueueGroup->queuesHaveJobs(integer)
#7 {testwiki}/includes/MediaWiki.php(425): MediaWiki->triggerJobs()
#8 {testwiki}/index.php(41): MediaWiki->run()
#9 {main}
Karlpietsch (talkcontribs)

You need to assign appropriate permissions to the user role for SQS

In AWS console go to "identity and Access Management" then "users" . then find the user you supplied aws credentials for and then click "attach policy"

find AmazonSQSFullAccess and add it.

then user can create and read the required queues.

184.69.132.46 (talkcontribs)

My friend,

If he doesn't "want to use it at all", we can assume he doesn't want to set any appropriate permission to the user role, don't you think?

I just had the same issue, and I don't want to set any appropriate permission to the user role, because I don't want to use SQS job queue at all (does it make sense?).

So, to anyone which would to remove the Exception, you need to unset the $wgJobTypeConf['sqs'] variable after loading the extension :

//$wgJobTypeConf['default']['class'] = 'JobQueueAmazonSqs'; => uncomment the day you want to use SQS job queue

unset($wgJobTypeConf['sqs']); => comment the day you want to use SQS job queue.