Name: amazon-kinesis-socket-server-sample
Owner: AWS Samples
Description: Sample Java application that uses the Amazon Kinesis Client Library to read a Kinesis Data Stream and output data records to connected clients over a TCP socket.
Created: 2018-04-24 18:15:09.0
Updated: 2018-05-10 14:53:41.0
Pushed: 2018-04-27 20:30:07.0
Homepage: null
Size: 15
Language: Java
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Sample Java application that uses the Amazon Kinesis Client Library to read a Kinesis Data Stream and output data records to connected clients over a TCP socket.
This sample application uses the Amazon Kinesis Client Library (KCL) example application described here as a starting point. The application implements the V2 KCL interface.
Data records are sent to connected clients as UTF8 encoded JSON strings.
This application requires Maven to download dependancies and build. The application can be built by
package
This application uses AWS IAM programatic access credentials stored in a file calls Credentials
in a directory within user's home directory ~/.aws/
. The file must contain the following lines.
ault]
access_key_id = <your access key id>
secret_access_key = <your secret key>
The IAM user credentials stored in the Credentials file must have the following permissions.
sis:GetShardIterator
sis:DescribeStream
sis:ListTagsForStream
sis:GetRecords
(specific to Kinesis Data Stream that is being read as the target resource)
modb:BatchGetItem
modb:BatchWriteItem
modb:PutItem
modb:DeleteItem
modb:Scan
modb:Query
modb:UpdateItem
modb:DeleteTable
modb:CreateTable
modb:DescribeTable
modb:GetItem
modb:UpdateTable
modb:GetRecords
(specify all tables as the target resource)
Edit the ServerBootstrap.java class to include the name of your Kinesis Data Stream in the SAMPLE_APPLICATION_STREAM_NAME
variable
Edit the ServerBootstrap.java class to include a name for the application in the the SAMPLE_APPLICATION_NAME
variable.
Build the project
This sample code is made available under a modified MIT license. See the LICENSE file.