How to Install

Step 1:

Subscribe to Ant Media Server in AWS Marketplace. Subscription to Ant Media Server is free of charge. It only charges when you use it.

  1. Visit the following link and Click the View purchase options
visit the website

  1. Scroll to the end of the page and click the Subscribe button
add the purchase detail

  1. Wait until your subscription is finalized and you see the success message.

Step 2:

  1. Download the Cloudformation Template from S3 Bucket
  2. Log in to AWS Console and go to AWS CloudFormation > Stacks
  3. Click Create Stack with New Resources option
  4. Focus on Specify Template and choose Upload a Template File and Upload the CloudFormation Template you have just downloaded. Then click Next button
create the stack

  1. Give a name to your Stack and Enter Web Panel Email and Password as shown in the image, and click the Next button
provide the stack name

  1. Just scroll down and click the Next for the other pages until you come to Submit page
  2. Click the Submit page and it will deploy the Stack into your AWS Account. It takes about 5 minutes to make the installation.
  3. After it’s done. Go to the Outputs section and find the Lambda URL endpoint as follows 
Automanaged paas

  1. Visit the Lambda URL. With this request, it will spin up a new instance and automatically forward to the new instance. The first spin up time takes about 60secs. Later requests takes about 20secs.
getting ready screen

  1. Tadaaa, your backend is ready and you can log in to the web panel with your Email and Password as you specified earlier
enter to log in

How to Use

There are two ways using the Auto-Managed Ant Media PaaS

1. Through SDK:

JavaScript SDK supports Lambda URL that the Auto-Managed PaaS CloudFormation Template generates. Just give the Lambda URL, and you can take advantage of JavaScript SDK fully. Initialize the JavaScript as follows to publish stream

var webRTCAdaptor = new WebRTCAdaptor({
  httpEndpointUrl: "<REPLACE_WITH_LAMBDA_URL>",
  localVideoElement: document.getElementById("localVideo"),
  callback: (info, obj) => {
   console.log("callback info: " + info);
   if (info == "initialized")
   {
      webRTCAdaptor.publish("myStream")
   }
   else if (info == "publish_started") {
      console.log("publish started");
   }
   else if (info == "publish_finished") {
      console.log("publish finished")
   }
  }
}

2. Through Direct URL

Fortunately, Auto-Managed Ant Media PaaS Lambda supports direct access from a web browser as shown at the end of the installation process. As shown in the installation section, just click the Lambda URL output, and it will be forwarded to the Ant Media Server web panel automatically.

FAQ

How is the charging?

It is mainly a pay-as-you-go model. If you have an active stream or streams, it is being charged per minute basis. If you don’t stream, it will not charge you.

How does it work?

There are 3 main components running in the AWS such as AMS Lamda, EventBridge, Elasticache. All these components are in pay-as-you-go model.

Are the settings, users, and live streams persistent?

Yes. All the text information related to settings, users, and streams is persistent, and all of them are stored in ElastiCache.

Are recordings persistent?

To make sure recordings are persistent, enable S3 recording because instances can be terminated, and local disk recordings can be lost.

How to delete?

Please go to the EC2 panel and delete the instance having the name ams-{IP-ADDR}.antmedia.cloud and also delete the Elastic IP that is being used in the instance {IP-ADDR}.

Go to AWS CloudFormation, select the Auto-Managed Ant Media PaaS stack and then Click the Delete button.

Is there any specific fixed charge?

If you make the deactivation policy stop which is default to spin up instances faster, AWS charges for Elastic IP, EBS storage and Lambda usage. It costs about $5-$10 per month. If you make the deactivation policy terminate, there will be no charge for Elastic IP and EBS storage. So the typical cost is about $0-$5 per month.