bykka/dynamoit

localstack connection

Closed this issue · 4 comments

kewur commented

Hi,

would it be possible to support localstack? I need to specify an endpoint somehow and unfortunatley currently the profiles doesn't support giving an endpoint. aws/aws-cli#1270

I think if I can just enter credentials manually with an optional endpoint argument would be great

thanks

kewur commented

actually I've looked at your implementation, looks like you're using aws provided profileloader class to create dynamodb clients. It's possible to implement it but I think we'd need to change the client creation logic slightly. and set the endpoint manually if it's provided somehow. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GettingStarted.NET.01.html

bykka commented

Hi,

I guess better to make a proper UI dialog for creating a new DynamoDB connection and save it in the user's preferences.
If you are in a rush then add tiny modifications to the class ua.org.java.dynamoit.db.DynamoDBService

  • method getAvailableProfiles should return one more profile
  • getOrCreateDynamoDBClient should create a dynamodb client with endpoint configuration.

the line 65 should be something like this

if (profileName.equals("myLocalProfile")) {
    builder.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("http://localhost:8000", ""))
}
kewur commented

oh nice, thanks. I tried it out, doesnt seem to populate the table names so far but at least the exception isn't being thrown. I'll look further later

bykka commented

Local connection now is there