I'm building the back-end of a meeting app that will use AWS Chime Messaging SDK for JavaScript. The idea is that when a user enters a meeting, an AppInstanceUser is created and associated with the Channel of that meeting.
Creating the channel and associating the user with it looks quite simple with the JavaScript SDK, however I can't find a way to create the user other than through the CLI, which I don't think is the correct way, because I need to create a new AppInstanceUser for each new user.
How should I do this? Is there a method to create the AppInstanceUser using the SDK that I didn't find? Or is there a way to add the new user to the channel without creating a new AppInstanceUser?
AWS SDK provides a client for creating AppInstanceUser's. If you are using NodeJS, you can access it with
aws-sdk/clients/chime. After you initialize the client, you can callcreateAppInstanceUser, provide it yourAppInstanceArn,AppInstanceUserIdand create your users, associate them to channels withcreateChannelMembership, etc.Last note, you still have to save your
AppInstanceUserArnin your user data, then use the stored ARNs in your application, client or server (at least that is my experience).