amazon-archives / logstash-input-dynamodb

This input plugin for Logstash scans a specified DynamoDB table and then reads changes to a DynamoDB table from the associated DynamoDB Stream.This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline. This gem is not a stand-alone program.
Apache License 2.0
105 stars 27 forks source link

IAM role support #13

Closed PauloMigAlmeida closed 8 years ago

PauloMigAlmeida commented 8 years ago

Hi,

As far as I've looked up on internet I couldn't figure out a way to set this plugins to use IAM role of my EC2 instance.

This is an example configuration. You must replace and with your access key and secret key. If you have credentials saved in a credentials file, you can omit these configuration values. http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLogstash.html#Tools.DynamoDBLogstash.Prereqs

Have you guys thought about a way to do it?

Cheers

PauloMigAlmeida commented 8 years ago

I just found out that it uses the default provider chain in case you don't explicit tell which access key and secret key to use by enabling log stash's debug mode.

[ec2-user@ip-172-31-48-239 logstash]$ bin/logstash -e 'input { 
    dynamodb{endpoint => "dynamodb.us-east-1.amazonaws.com" 
    streams_endpoint => "streams.dynamodb.us-east-1.amazonaws.com" 
    view_type => "new_and_old_images"  
    table_name => "SourceTable"} } 
output {stdout {} }' -v --debug --verbose
Tablename: PROD-WORDSTOWATCH-VIDEOS {:level=>:info}
Using default provider chain {:level=>:info}
Checkpointer: logstash_input_dynamodb_cptr {:level=>:info}
com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient@4b9dfc64 {:level=>:info}
DynamoDB endpoint: dynamodb.us-east-1.amazonaws.com {:level=>:info}
WorkerId: 081b3e4d-acfb-4275-9ea4-9bf58ee4ab23 {:level=>:info}
DynamoDB Streams endpoint: streams.dynamodb.us-east-1.amazonaws.com {:level=>:info}

It'd be nice to have this information on here though.

Closing it