policy.setId(publishPolicyKey);
policy.setStatements(Collections.singletonList(statement));
SetQueueAttributesRequest request = new SetQueueAttributesRequest();
request.setQueueUrl(queueUrl);
String policyJSON = (new JsonPolicyWriter())
.writePolicyToString(policy);
log.debug(policyJSON);
request.setAttributes(Collections
.singletonMap("Policy", policyJSON));