// prepare the credentials
String accessKey = Constants.ACCESS_KEY;
String secretKey = Constants.SECRET_KEY;
// create the SQS service
AmazonSQS sqsService = new AmazonSQSClient(
new BasicAWSCredentials(accessKey, secretKey));
// XXX SET TO THE PREFERRED REGION
// set the endpoint for us-east-1 region
sqsService.setEndpoint("https://sqs.us-east-1.amazonaws.com");
new SQSExamples().run(sqsService);
}