Skip to content

Instantly share code, notes, and snippets.

@swinton
Last active August 29, 2015 14:13
Show Gist options
  • Save swinton/cc70729441a7b54c62ec to your computer and use it in GitHub Desktop.
Save swinton/cc70729441a7b54c62ec to your computer and use it in GitHub Desktop.
Notes on using the samples supplied with the Amazon Kinesis Client Library for Python

Host

git clone https://github.com/awslabs/amazon-kinesis-client-python.git
cd amazon-kinesis-client-python/
mkdir vm
cd vm
vagrant init ubuntu/trusty64
# Include in Vagrantfile:
#   config.vm.synced_folder "..", "/home/vagrant/existence",
#       owner: "vagrant", group: "vagrant"
vagrant up
vagrant ssh

VM

sudo apt-get update
sudo apt-get install openjdk-7-jre
sudo apt-get install python-setuptools
python setup.py download_jars
sudo python setup.py install
mkdir ~/.aws
cd ~/.aws
cat > credentials
# Paste in aws credentials
# i.e.
# [default]
# aws_access_key_id = AWS_ACCESS_KEY_ID
# aws_secret_access_key = AWS_SECRET_ACCESS_KEY
# ctrl-d
cd -
chmod 700 ~/.aws
python samples/sample_kinesis_wordputter.py --stream winton -w steve -w harrison -w melinda -w chris -p 5
# Edit sample.properties:
# executableName = /home/vagrant/existence/samples/sample_kclpy_app.py
# streamName = winton
chmod +x /home/vagrant/existence/samples/sample_kclpy_app.py
`python samples/amazon_kclpy_helper.py --print_command \
    --java /usr/bin/java --properties samples/sample.properties`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment