signal-setup-guide icon indicating copy to clipboard operation
signal-setup-guide copied to clipboard

Table on DynamoDb

Open JonnyX11 opened this issue 4 years ago • 6 comments

How did you create tables on DynamoDb on docker yml file ?

keysDynamoDb: region: us-east-1 tableName: keys

messageDynamoDb: region: us-east-1 tableName: message

JonnyX11 avatar May 13 '21 06:05 JonnyX11

yeah I am having the same issue. When creating an account on the server it tries to run org.whispersystems.textsecuregcm.storage.MessagesDynamoDb.lambda$deleteAllMessagesForAccount$5(MessagesDynamoDb.java:197)

Which results in

ERROR [2021-05-16 21:59:38,542] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: 62166cfad0e60c45
! com.amazonaws.services.dynamodbv2.model.AmazonDynamoDBException: One or more parameter values were invalid: Condition parameter type does not match schema type (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException; Request ID: MNTK6APVAR3LICUAMRFO23PFSBVV4KQNSO5AEMVJF66Q9ASUAAJG; Proxy: null)

I know the relevant code is in https://github.com/signalapp/Signal-Server/blob/master/service/src/main/java/org/whispersystems/textsecuregcm/storage/MessagesDynamoDb.java

So I setup an AWS DynamoDB with

Primary partition key	H (String)
Primary sort key	S (String)

But clearly I am missing something in the DynamoDB config

jacob-pro avatar May 16 '21 22:05 jacob-pro

Did you create a tables ?

@madeindra what do you think ?

JonnyX11 avatar May 17 '21 06:05 JonnyX11

@jacob-pro hey,

How did you end point to the DynamoDB ?

https://github.com/madeindra/signal-setup-guide/issues/80

JonnyX11 avatar May 17 '21 06:05 JonnyX11

set the config file like

messageDynamoDb:
  region: REGION
  tableName: TABLE_NAME
  • attach an IAM role to the EC2 instance the server is running on
  • configure the IAM role with a permissions policy to access the DynamoDb

jacob-pro avatar May 18 '21 15:05 jacob-pro

Thanks @jacob-pro ,

Can you please explain this and give an examples?

attach an IAM role to the EC2 instance the server is running on configure the IAM role with a permissions policy to access the DynamoDb

JonnyX11 avatar May 19 '21 12:05 JonnyX11

I'm trying to run it on localhost... What need to change and where ?

Thanks in advanced.

JonnyX11 avatar May 19 '21 12:05 JonnyX11