creates the Streams client and sets the endpoint information for the client.
This overload of setEndpoint also includes the service name and region.
Set serviceName to kinesis.
client = new AmazonKinesisClient();
client.setEndpoint(endpoint, serviceName, regionId);
Amazon API Gateway
| Region Name | Region | Endpoint | Protocol |
|---|---|---|---|
| US East (N. Virginia) | us-east-1 | apigateway.us-east-1.amazonaws.com | HTTPS
|
Amazon Kinesis Streams
| Region Name | Region | Endpoint | Protocol |
|---|---|---|---|
| US East (N. Virginia) | us-east-1 | kinesis.us-east-1.amazonaws.com | HTTPS |
Create the Stream
Now that you have created your Streams client, you can create a stream to work with, which you can accomplish with the Streams console, or programmatically. To create a stream programmatically, instantiate a CreateStreamRequest object and specify a name for the stream and the number of shards for the stream to use.
CreateStreamRequest createStreamRequest = new CreateStreamRequest();
createStreamRequest.setStreamName( myStreamName );
createStreamRequest.setShardCount( myStreamSize );