I'm a beginner with DynamoDB with a very basic understanding of partition and sort keys in DynamoDB.
My app is a music guessing app, where two online players join a lobby with the help of APIGateway websockets and play a quiz game where they have to guess a song played in under 5 seconds. For each two player lobby, I have to store the lobby's information in a DynamoDB table, in order to work with realtime websocket updates.
Each item in the table will contain info about a single lobby. Each lobby will have a channel_id and respective connection_ids that will relate to that channel_id. For now only two connection_id's will exist for a channel, but it may increase in the future. Each connection will have some attributes of it's own such as: current_score, last_guessed_time, song_number etc. These attributes will be different for each connection.
Types of access required:
Is there any way possible with which I can store 2 connections and their attributes in a single channel (item)?
Although I can use a simple setup such as channel_id as pk and connection_id as sk, that will require creating multiple items for a single lobby which I want to avoid.