Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Update KCL to 1.9.0. Add cross-account w/ STSAssumeRoleCredentialsPro… #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amcp
Copy link
Contributor

@amcp amcp commented Jan 10, 2019

…vider

Issue #, if available: #54

Description of changes:
Updates KCL to 1.9.0 and adds cross-account support with optional roles for the source table/stream, KCL and destination table.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Fodoj
Copy link

Fodoj commented Nov 18, 2020

I am not sure if this is ever going to be merged, but I feel this code is still very useful for cross-account replication.

The current implementation does not pass AwsCredentials to DDBEmitter, thus replication will always fail. You can remove all constructors and leave the single one looking like this:

    public DynamoDBReplicationEmitter(final DynamoDBStreamsConnectorConfiguration configuration) {
        this.applicationName = configuration.APP_NAME;
        this.endpoint = configuration.DYNAMODB_ENDPOINT;
        this.region = configuration.REGION_NAME;
        this.tableName = configuration.DYNAMODB_DATA_TABLE_NAME;

        AmazonDynamoDBAsync dynamoDBAsync = new AmazonDynamoDBAsyncClient(configuration.AWS_CREDENTIALS_PROVIDER,
                                                                          new ClientConfiguration().withMaxConnections(MAX_THREADS).withRetryPolicy(PredefinedRetryPolicies.DYNAMODB_DEFAULT),
                                                                          Executors.newFixedThreadPool(MAX_THREADS));

        final boolean setDynamoDB = DYNAMODB.compareAndSet(null, dynamoDBAsync);

        if (setDynamoDB && dynamoDBAsync != null) {
            DYNAMODB.get().setEndpoint(endpoint);
        }

        skipErrors = false; // TODO make configurable
    }

Also lombok needs to be updated to 1.18.2 or higher to make the build pass.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants