aws / amazon-chime-sdk-js

A JavaScript client library for integrating multi-party communications powered by the Amazon Chime service.
Apache License 2.0
701 stars 473 forks source link

New Chime Meetings SDK is giving 429 Rate exceeded error #2743

Open dmoughabghab opened 1 year ago

dmoughabghab commented 1 year ago

Hi all,

After upgrading to the new @aws-sdk/client-chime-sdk-meetings package ( the old one is depreciated ) I get the following errors even when its my first call in a long time

'$metadata': { httpStatusCode: 429, requestId: '58ec9880-ea5a-4459-9368-94541cdf2c82', extendedRequestId: undefined, cfId: undefined, attempts: 1, totalRetryDelay: 0 },

I can't seem to get around it and it used to work in the older versions

My code is as follows


async createChimeMeeting(externalMeetingId: string): Promise<CreateMeetingCommandOutput | undefined> {
        const params: CreateMeetingCommandInput = {
            // ClientRequestToken: uuid(),
            MediaRegion: 'ap-southeast-2',
            ExternalMeetingId: externalMeetingId,
        };
        console.log('Chime Create Meeting Params', JSON.stringify(params))
        const command = new CreateMeetingCommand(params);

        try {
            const data = await this.client.send(command);
            console.log('Chime Create Meeting Data', JSON.stringify(data))
            return data
        } catch (error) {
            console.log("error", error)
        }
    }

Thanks for your help

fromcloud commented 11 months ago

same issue. serverless demo application has an issue at environment variable. If changing region variable to us-east-1 at chime-join lambda function, it works. Chime api endpoint doesn't support all region.