Skip to content
Menu
Cloud Gal 42
  • Home
    • Affiliate Disclosure
    • Privacy Policy
  • Solution Selling Tutorial
  • AI-SGAP
    • Beta Partners
    • Investors
  • 4022 Reader Updates
Cloud Gal 42

QuickGuide: Amazon Kinesis Setup

May 15, 2021May 29, 2021 by admin

Previous guide in series – Amazon CloudWatch Setup

Step 1 – Download and extract Oracle JDK

Download Link -> Download Linux x64 Compressed Archive

Alternatively, you can download from here – https://demos3gl.s3.us-east-2.amazonaws.com/jdk-8u281-linux-x64.tar.gz

Use WinSCP or a similar tool to transfer to the Ubuntu EC2 instance (/opt)

cd /opt
ls -al
tar -zxvf jdk-8u281-linux-x64.tar.gz

Grab directory – /opt/jdk1.8.0_281

Step 2 – Download and extract Kinesis Agent

Download Link -> Click on Code -> Download zip

Alternatively, you can download from here – https://demos3gl.s3.us-east-2.amazonaws.com/amazon-kinesis-agent-master.zip

Use WinSCP or a similar tool to transfer to the Ubuntu EC2 instance (/opt/software)

cd /opt/software
sudo apt install zip -y
unzip amazon-kinesis-agent-master.zip
ls –al
cd amazon-kinesis-agent-master

Step 3 – Switch user to root and install Kinesis Agent

sudo su
export JAVA_HOME=/opt/jdk1.8.0_281
export PATH=/opt/jdk1.8.0_281/bin:$PATH
java -version
ls -al
./setup --install
Config file: /etc/aws-kinesis/agent.json
Command: service aws-kinesis-agent status

Step 4 – Switch user to ubuntu and create dummy log

su - ubuntu
cd /opt
mkdir applogs
cd applogs
vi myapp.log, press i to start inserting dummy lines, when done press Esc and use :wq! to save and exit

Step 5 – Create Data Stream

  • Navigate to Amazon Kinesis, click on Create Data Stream
  • Use demodatastream as the name
  • Enter 1 for Shard value
  • Click on Create data stream

Step 6 – Create Delivery Stream

  • Click on Delivery Streams on the left menu
  • Click on Create delivery stream
  • Use demodeliverystream as the name
  • Select source as Kinesis Data Stream and choose the data stream you created in Step 1
  • Click Next, leave everything as is, Click Next
  • Select S3 as the destination
  • Choose an existing bucket or create new
  • Click Next
  • Choose Create or update IAM role
  • Click Next Review and click on Create delivery stream

Step 7 – Configure Kinesis Agent to read dummy log

sudo vi /etc/aws-kinesis/agent.json
update kinesis.endpoint (https://docs.aws.amazon.com/general/latest/gr/ak.html)
update firehose.endpoint (https://docs.aws.amazon.com/general/latest/gr/fh.html)
update filePattern to /opt/applogs/myapp.log*
update kinesisStream to demodatastream
update filePattern to /opt/applogs/myapp.log*
update deliveryStream to demodeliverystream

Step 8 – Start Kinesis Agent and monitor Agent log

Attach Kinesis and Firehose full access and S3 full access roles to EC2 IAM Role

sudo service aws-kinesis-agent start
sudo tail -f /var/log/aws-kinesis-agent/aws-kinesis-agent.log

Step 9 – Open new SSH session to the same Ubuntu Instance

cd /opt/applogs
vi myapp.log, press i to start inserting dummy lines for kinesis agent, when done press Esc and use :wq! to save and exit

Switch window to see if Agent log shows parsed records

Step 10 – Verify Kinesis Agent is working

  • Navigate to Amazon S3 dashboard
  • Click on the bucket used as the destination for Firehose
  • Dummy lines from myapp.log should show up here

Related

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Building a Local Knowledge Wiki Part 2 Runtime Isolation and Graph Validation
  • Building a Local Knowledge Wiki Part 1 Architecture and the First Memory Failures
  • Selling AI Security Like Life Insurance
  • What We Mean by “Harness” in AI
  • Same Container, Different Findings: What Trivy and Grype Taught Us

Recent Comments

  • Rafael on Installing Debian on OCI
  • Jorge on Installing Debian on OCI
  • admin on Installing Debian on OCI
  • Andreas on Installing Debian on OCI
  • admin on Installing Debian on OCI

Archives

  • November 2026
  • October 2026
  • December 2022
  • February 2022
  • September 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • February 2021
  • January 2021
  • November 2020
  • October 2020

Categories

  • aws
  • bcdr
  • cloud
  • cloudsecurity
  • compliance
  • informationsecurity
  • oracle
  • pci
  • QuickGuide
  • security
  • Uncategorized
©2026 Cloud Gal 42 | Powered by WordPress and Superb Themes!