amazon web services - AWS IAM policy for SQS -


i trying add policy existing iam user can perform crud on 2 s3 buckets here working policy

{   "version": "2012-10-17",   "statement": [     {       "sid": "devcontrol",       "effect": "allow",       "action": [         "s3:get*",         "s3:put*",         "s3:deleteobject",         "s3:deleteobjectversion"       ],       "resource": [         "arn:aws:s3:::blahimages/*",         "arn:aws:s3:::blahvideos/*"       ]     }   ] } 

an example policy documents sqs

{    "version": "2012-10-17",    "statement":[{       "effect":"allow",       "action":"sqs:*",       "resource":"arn:aws:sqs:*:123456789012:bob_queue*"       }    ] } 

so tried this

{   "version": "2012-10-17",   "statement": [     {       "sid": "devcontrol",       "effect": "allow",       "action": [         "s3:get*",         "s3:put*",         "s3:deleteobject",         "s3:deleteobjectversion"        ],        "resource": [          "arn:aws:s3:::blahimages/*",          "arn:aws:s3:::blahvideos/*"         ]      },      {        "effect":"allow",        "action":"sqs:*",        "resource":"arn:aws:sqs:*:myarn"       }     ]   } 

i did not parse errors simulator still returning denied sqs queue

also want user able add messages queue, receive them , delete them whereas above policy add actions believe

your sqs arn invalid : "arn:aws:sqs:*:myarn".

you should use arn:aws:sqs:<region name>:<account id>:<queue name> instead. (you're missing <account id>).

the region name might replaced * if want policy valid in multiple regions. account id mandatory queue names unique within aws master account , region only.

see http://docs.aws.amazon.com/awssimplequeueservice/latest/sqsdeveloperguide/sqsexamples.html example of valid sqs policies.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -