mardi 31 mars 2015

Giving anonymous access to AWS SQS queue using the Java SDK

I am trying to provide anonymous access to an SQS queue by providing * as principal but the API rejects it. I am using the AWS Java SDK.



List<String> principal = new ArrayList<String>();
principal.add("*");

List<String> actions = new ArrayList<String>();
actions.add("*");


sqsClient.addPermission(queueUrl,"realtimeEvents",principal,actions);


This throws the following exception:



Error Message: Value [*] for parameter PrincipalId is invalid. Reason: Unable to verify. (Service: AmazonSQS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: c749bd43-a485-508d-ba0d-f0d6dd92af7b)


'*' is a valid input while defining the policy file as well as using the UI to provide access. Any idea how to make this work.





Aucun commentaire:

Enregistrer un commentaire