awslabs / amazon-kinesis-aggregators

Amazon Kinesis Aggregators provides a simple way to create real time aggregations of data on Amazon Kinesis.
Other
151 stars 35 forks source link

Dynamo tables created in wrong region. #12

Closed jolcese closed 8 years ago

jolcese commented 9 years ago

I have an EC2 instance running an aggregator app. It reads fine from a Kinesis Stream but the aggregated tables are generated in an incorrect region. How do I specify the region of the DynamoDB tables?

BTW, the KCL app is creating tables in the right region.

IanMeyers commented 9 years ago

Hello,

Which region have you set on the Aggregator process? And also which region is the stream in, vs where the KCL Lease Table is being created? Aggregators always puts the aggregation table in the same region as the stream, but this can be overridden by using a custom configuration where you supply a Dynamo Client to the DynamoDataStore.

Thx,

Ian

jolcese commented 9 years ago

Hi Ian, Ec2, Stream and lease tables are on us-west-2. Where do I specify the region for the agreggator process? Thanks Jose

On Sat, Sep 19, 2015, 12:17 IanMeyers notifications@github.com wrote:

Hello,

Which region have you set on the Aggregator process? And also which region is the stream in, vs where the KCL Lease Table is being created?

Thx,

Ian

— Reply to this email directly or view it on GitHub https://github.com/awslabs/amazon-kinesis-aggregators/issues/12#issuecomment-141700184 .

IanMeyers commented 9 years ago

You can use the 'region' system property. Set -Dregion=us-west-2 from the command line.

jolcese commented 9 years ago

Thanks Ian, Any way to pass that parameter thru configuration files?

On Mon, Sep 21, 2015, 00:49 IanMeyers notifications@github.com wrote:

You can use the 'region' system property. Set -Dregion=us-west-2 from the command line.

— Reply to this email directly or view it on GitHub https://github.com/awslabs/amazon-kinesis-aggregators/issues/12#issuecomment-141900589 .

IanMeyers commented 9 years ago

Yeah, this should be doable. I will add this to the backlog. How are you running the application today?

jolcese commented 9 years ago

I have a Chef script that deploys the application on EC2s on an autoscaling group. Chef writes the configuration file based on a template which gets as inputs the table names, provisioned capacity, etc.

Something like this:

[{
    "namespace": "<%= @table_prefix %>_timeseries_aggregation_events_app",
    "timeHorizons": [
        "HOUR",
        "DAY",
        "MONTH",
        "YEAR",
        "FOREVER"
    ],
    "type": "SUM",
    "dataExtractor": "JSON",
    "labelItems": [
        "deviceEventKey"
    ],
    "dateItem": "timestamp",
    "dateFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'",
    "summaryItems": [
        "sum(value.attr0) sum-attr0",
        "min(value.attr0) min-attr0",
        "max(value.attr0) max-attr0",
      ],
    "tableName": "<%= @table_prefix %>_timeseries_aggregated_event",
    "readIOPS": <%= @read_iops %>,
    "writeIOPS": <%= @write_iops %>
}]
IanMeyers commented 9 years ago

OK - that's quite nice. How does Chef then run the process, if at all? Or is an init.d or similar being used to run the aggregator process?

IanMeyers commented 8 years ago

Closing now and will open a feature req