我想为 Amazon Kinesis 创建一个 POC。
在这篇文章http://seroter.wordpress.com/2014/01/09/data-stream-processing-with-amazon-kinesis-and-net-applications/的帮助下,我在 AWS 上创建了一个流和一些代码
using (MemoryStream ms = new MemoryStream(oByte))
{
AmazonKinesisConfig config = new AmazonKinesisConfig();
config.RegionEndpoint = Amazon.RegionEndpoint.USEast1;
AmazonKinesisClient client = new AmazonKinesisClient(config);
PutRecordRequest requestRecord = new PutRecordRequest();
requestRecord.StreamName = "POC";
requestRecord.PartitionKey = "weborder";
requestRecord.Data = ms;
try
{
var responseRecord = client.PutRecord(requestRecord);
}
catch (Exception ex)
{
var t = ex.Message;
}
lblShardId.Text = "Shard ID: " + responseRecord.ShardId;
lblSequence.Text = "Sequence #:" + responseRecord.SequenceNumber;
}
我收到异常 Amazon.Kinesis.Model.ResourceNotFoundException: Stream POC under account 111111111111 not found。