Setup Online Meeting Recording With AWS Chime SDK

AWS Chime is video call platform which allow developer to build their own solution on top of Chime SDK, in this tutorial I’ll show you step-by-step on how to setup recording application for video conference and save the output media into S3 bucket.

disclaimer: I’m using demo applications from AWS it self, the reason why I’m writing this because I have to make little changes to the code to make it work. My computer environment are MacOS Sierra, nodejs v12.7.0 and NPM 6.14.4

Deploy Serverless Meeting Demo

git clone .
cd amazon-chime-sdk-js/demos/serverless

Install dependecies then deploy, in my scenario I’ll deploy it in region ap-southeast-1 with bucket name mychime-artefact (you may need to enable transfer acceleration). This demo uses CloudFormation so I’ve to pass parameter stack name.

npm install
npm run deploy -- -r ap-southeast-1 -b mychime-artefact -s chime-meeting -a meeting

Once deployment succeed you can see in terminal a URL that can be opened in a browser. Go to that url and start a meeting, the url might look like this:

join screen

To simulate a meeting you can open it in multiple browser, please remember to use the same Meeting ID.

meeting dashboard

at this step you will have these resources created: CloudFormation stack, S3 bucket, Lambda and API Gateway.

Deploy Recording Demo Application

Error in Cloud9 console

Create Amazon ECR repository from CLI:

aws ecr create-repository --repository-name <repository-name>

Clone the github repository then build and push docker image to your repository:

git clone
cd amazon-chime-sdk-recording-demo
make ECR_REPO_URI=<repositoryUri>

Repository URL can be found in Amazon ECR dashboard

ECR dashboard

When I run deployment command with default CloudFormation template it’s always return error so I have to do little modification to file RecordingDemoCloudformationTemplate.yaml, change value of BucketName to a unique name (recording media will be saved into this bucket) and change InstanceType to t2.2xlarge (somehow t3.xlarge always crash and return CPU error every time start recording endpoint being called).

change bucket name
change instance type

Run deployment script and change required parameter to respective values:

node ./deploy.js -b <my-bucket> -s <my-stack> -i <docker-image-uri> -r <region>

the second bucket name is to put deployment artefacts, you can use the same bucket which be used to store output media. Docker image uri can be found inside ECR, just click on repository name.

Docker image URI

After deployment success you’ll see Amazon API Gateway invoke URL in the output.

deployment success

Now let’s see how it works completely, start a meeting and invite multiple attendees to join. Start recording by invoking recording URL from postman or any other tool, remember to select select “AWS Signature” and add your AccessKey, SecretKey &AWS Region in the Authorization tab.

hint: if you don’t remember AccessKey or SecretKey, you can find them in file ~/.aws/credentials

AWS credentials file

Send HTTP POST request and passed the recordingAction as "start" and a url encoded meetingURL query parameters to API Gateway. Add “v2” to meeting url, for example if your meeting url is then use the v2 url:

meeting url
request and response in Postman

At this point the entire web page is captured by FFmpeg at 1280 X 720 fidelity and automatically transcoded and uploaded to Amazon S3. The file created in Amazon S3 will remain hidden until the capture is complete. Our demo application has been modified to suppress prompts for input device permissions and display customized UI for the recording bot.

To stop recording, pass the task ARN as taskId that was received in the API response to start the recording in addition to the recordingAction denoting "stop".

stop recording endpoint

All done! recording media can be found in S3 bucket.



enterprise architect. tech enthusiast. coffee addict.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store