创建 AWS-chime 会议时,凭据应限定在有效区域范围内
Credential should be scoped to a valid region when creating AWS-chime meeting
let meetingId = null;
let meeting = null;
let clientId = 2017;
meetingId = uuid();
var region = await getNearestMediaRegion();
const chime = new AWS.Chime({ region: region });
chime.endpoint = new AWS.Endpoint('https://service.chime.aws.amazon.com');
meeting = await chime.createMeeting({
ClientRequestToken: meetingId,
MediaRegion: region,
ExternalMeetingId: meetingId,
}).promise();
const attendee = await chime.createAttendee({
MeetingId: meeting.Meeting.MeetingId,
ExternalUserId: `${uuid().substring(0, 8)}#${clientId}`,
})
.promise();
let res = { meeting, attendee };
我在 Serverless 中使用 Amazon chime SDK 创建了会议,请参考以下示例
输出:
从您的代码中删除以下行:
chime.endpoint = new AWS.Endpoint('https://service.chime.aws.amazon.com');
let meetingId = null;
let meeting = null;
let clientId = 2017;
meetingId = uuid();
var region = await getNearestMediaRegion();
const chime = new AWS.Chime({ region: region });
chime.endpoint = new AWS.Endpoint('https://service.chime.aws.amazon.com');
meeting = await chime.createMeeting({
ClientRequestToken: meetingId,
MediaRegion: region,
ExternalMeetingId: meetingId,
}).promise();
const attendee = await chime.createAttendee({
MeetingId: meeting.Meeting.MeetingId,
ExternalUserId: `${uuid().substring(0, 8)}#${clientId}`,
})
.promise();
let res = { meeting, attendee };
我在 Serverless 中使用 Amazon chime SDK 创建了会议,请参考以下示例
输出:
从您的代码中删除以下行:
chime.endpoint = new AWS.Endpoint('https://service.chime.aws.amazon.com');