Skip to content

Instantly share code, notes, and snippets.

@bitsmuggler
Last active August 29, 2015 14:25
Show Gist options
  • Save bitsmuggler/5bf68faea30f7a3ff34f to your computer and use it in GitHub Desktop.
Save bitsmuggler/5bf68faea30f7a3ff34f to your computer and use it in GitHub Desktop.
Initialize AmazonSNSClient
//Change to your credentials
private final String AwsAccessKeyid = "<<your aws accesskey>>";
private final String AwsSecretKey = "<<your aws secretkey>>";
// Change to your sns-endpoint
private final String SnsEndpoint = "https://sns.eu-west-1.amazonaws.com";
private AmazonSNS sns = null;
//Initializing AmazonSNSClient
this.sns = new AmazonSNSClient(new AWSCredentials() {
public String getAWSAccessKeyId() {
return AwsAccessKeyid;
}
public String getAWSSecretKey() {
return AwsSecretKey;
}
});
this.sns.setEndpoint(SnsEndpoint);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment