Using Amazon Kinesis Agent
Install Amazon Kinesis Agent
sudo yum update -y
sudo yum install -y aws-kinesis-agent
/etc/aws-kinesis/agent.json |
---|
| {
"cloudwatch.emitMetrics": true,
"cloudwatch.endpoint": "monitoring.us-east-1.amazonaws.com",
"kinesis.endpoint": "kinesis.us-east-1.amazonaws.com",
"firehose.endpoint": "firehose.us-east-1.amazonaws.com",
"sts.endpoint": "https://sts.amazonaws.com",
"flows": [
{
"filePattern": "/tmp/app.log*",
"kinesisStream": "yourkinesisstream",
"partitionKeyOption": "RANDOM"
},
{
"filePattern": "/tmp/app.log*",
"deliveryStream": "yourdeliverystream"
}
]
}
|
AWS Documentation (Streams)
AWS Documentation (Firehose)
Start Agent
sudo systemctl start aws-kinesis-agent
sudo systemctl enable aws-kinesis-agent
sudo systemctl start aws-kinesis-agent