Creating Messaging Sessions without the AWS SDK for JavaScript v2
See original GitHub issueCommunity Note
- Please vote for this issue by adding a 👍 reaction to the issue. This will help the community and maintainers from the Amazon Chime SDK team to prioritize this request.
- Please do not leave “+1” or “me too” comments, they generate extra noise for issue followers and do not help prioritize the request.
- Please go through the existing issues to see if your request has already been recommended.
- Please do not use this template for bugs or support. Each individual repository has a PR template, documentation and resources for troubleshooting.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Tell us about your request
What do you want us to build?
For the amazon-chime-sdk-js, the ability to create default Messaging Session Configurations and Messaging Sessions without the AWS SDK for JavaScript v2 client. This will enable an easier transition to the AWS SDK for JavaScript v3.
Tell us about the problem you are trying to solve and why is it hard?
Currently, the chime sdk js requires passing in the AWS SDK for JavaScript v2 client when creating a new MessagingSessionConfiguration and DefaultMessagingSession.
Full code snippet from the README:
import * as AWS from 'aws-sdk/global';
import * as Chime from 'aws-sdk/clients/chime';
import {
ConsoleLogger,
DefaultMessagingSession,
LogLevel,
MessagingSessionConfiguration,
} from 'amazon-chime-sdk-js';
const logger = new ConsoleLogger('SDK', LogLevel.INFO);
// You will need AWS credentials configured before calling AWS or Amazon Chime APIs.
const chime = new Chime({ region: 'us-east-1' });
const endpoint = await chime.getMessagingSessionEndpoint().promise();
const userArn = /* The userArn */;
const sessionId = /* The sessionId */;
const configuration = new MessagingSessionConfiguration(userArn, sessionId, endpoint.Endpoint.Url, chime, AWS);
const messagingSession = new DefaultMessagingSession(configuration, logger);
In the above code snippet, we import the aws-sdk v2 then pass it into the MessagingSessionConfiguration constructor. This seems to be required for the aws-sdk v2 crypto utilities, which are used in the DefaultSigV4.ts file.
How are you currently solving the problem?
Currently, I am using both the AWS SDK for JavaScript v2 and v3 as a workaround. I use the aws-sdk v2 to create the default chime messaging session, then use the aws-sdk v3 for interacting with chime after the session is created. This workaround is working well, but needing both sdk versions is not ideal. It looks like I can maybe create a custom SigV4 signing class and pass it in as a potential alternative workaround, however that seemed like an unnecessary complexity for this scenario.
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:14 (8 by maintainers)
Top GitHub Comments
@ryanbrown-rcd thanks for bringing this up. We’ll try to get to this as soon as we can.
We published the Chime SDK for JavaScript v3. You can now create a messaging session with the AWS SDK for v3.