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.
- Visit the following link and Click the
View purchase options

- Scroll to the end of the page and click the
Subscribebutton

- Wait until your subscription is finalized and you see the success message.
Step 2:
- Download the Cloudformation Template from S3 Bucket
- Log in to AWS Console and go to AWS CloudFormation > Stacks
- Click
Create StackwithNew Resourcesoption - Focus on
Specify Templateand chooseUpload a Template Fileand Upload the CloudFormation Template you have just downloaded. Then clickNextbutton

- Give a
nameto your Stack and Enter Web PanelEmailandPasswordas shown in the image, and click theNextbutton
Note:The period value specifies the time at which the instance will stop/terminate if there is no stream on the server.For example, the default value is 3, which implies that if there is no stream for 3 minutes, the server would stop/terminate.

- Just scroll down and click the
Nextfor the other pages until you come toSubmitpage - Click the
Submitpage and it will deploy the Stack into your AWS Account. It takes about 5 minutes to make the installation. - After it’s done. Go to the Outputs section and find the Lambda URL endpoint as follows

- 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.

- Tadaaa, your backend is ready and you can log in to the web panel with your
EmailandPasswordas you specified earlier

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.