Created
September 8, 2015 09:45
-
-
Save mjgp2/81a82512aaba08a6ddee to your computer and use it in GitHub Desktop.
Revisions
-
mjgp2 created this gist
Sep 8, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ # (1) set up the client # where to get the access/secret key # see http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html AWSCredentialsProvider credentialsProvider = new DefaultAWSCredentialsProviderChain(); ClientConfiguration clientConfig = new ClientConfiguration(); AmazonKinesis kinesis = new AmazonKinesisClient(credentialsProvider, clientConfig); # what region you are in kinesis.setRegion(Region.getRegion(Regions.EU_WEST_1)); # (2) send a put record PutRecordRequest putRecord = new PutRecordRequest(); putRecord.setStreamName(streamName); putRecord.setPartitionKey(partitionKeyString); putRecord.setData(byteBuffer); kinesis.putRecord(putRecord);