|
| 1 | +--- |
| 2 | +title: Auto Managed Service on AWS |
| 3 | +description: Deploy Ant Media Server Auto Managed Service on AWS |
| 4 | +keywords: [Auto Managed Service, Pay As You Go, Ant Media Server Documentation, Ant Media Server Tutorials] |
| 5 | +sidebar_position: 1 |
| 6 | +--- |
| 7 | + |
| 8 | +# Auto-Managed Service: Live Streaming, Simplified |
| 9 | +Live streaming is powerful — but managing it is not. Scaling infrastructure, handling peak traffic, ensuring low latency, and paying for idle servers can quickly become overwhelming. Many teams spend more time managing infrastructure than building their product. |
| 10 | + |
| 11 | +**Ant Media’s Auto‑Managed Live Streaming Service** solves these challenges. It provides a fully managed, scalable, pay-only-when-you-use platform on **AWS** that gives you complete control over your content — without the operational overhead. |
| 12 | + |
| 13 | +Whether you are a developer, a product team, or a streaming company, this service allows you to focus on what matters: delivering seamless, real-time streaming experiences to your users. |
| 14 | + |
| 15 | +## Why Auto‑Managed Live Streaming Service Matters |
| 16 | +Modern live streaming faces three main pain points: |
| 17 | + |
| 18 | +1. **Operational Complexity** |
| 19 | + Scaling servers, handling failures, and managing clusters is time-consuming and error-prone. |
| 20 | + |
| 21 | +2. **Hidden Costs** |
| 22 | + Traditional platforms bill continuously, even when streams are idle, leading to wasted resources. |
| 23 | + |
| 24 | +3. **Limited Control & Flexibility** |
| 25 | + Many solutions lock your data or restrict how you can build custom workflows, analytics, or integrations. |
| 26 | + |
| 27 | +Auto‑Managed Live Streaming Service addresses all three: it **automatically scales**, **charges only for active usage**, and provides **full ownership and flexibility** over your streaming workflows. |
| 28 | + |
| 29 | +## Why Use Auto-Managed Service |
| 30 | + |
| 31 | +| Feature | Why It Matters | |
| 32 | +| --------------------------- | ---------------------------------------------------------------- | |
| 33 | +| **Automatic Scaling** | Spin up resources on demand; no manual server setup required. | |
| 34 | +| **Usage-Based Billing** | Idle periods cost nothing; you pay only when streaming. | |
| 35 | +| **Full Content Ownership** | Streams are encrypted and fully under your control. | |
| 36 | +| **SDKs & APIs** | Easy integration with web and mobile apps. | |
| 37 | +| **Custom Workflow Support** | Add AI, analytics, recording, or moderation pipelines as needed. | |
| 38 | +| **24/7 Developer Support** | Help is always available for implementation or troubleshooting. | |
| 39 | + |
| 40 | +**Result**: Teams can achieve up to **5× cost savings** compared to always-on setups, without sacrificing quality or control. |
| 41 | + |
| 42 | +## How It Works: Step-by-Step |
| 43 | +Here’s a clear path to enable and use the Auto‑Managed Live Streaming Service. |
| 44 | + |
| 45 | +### Step 1: Subscribe Ant Media Server via AWS Marketplace |
| 46 | +- Visit the [Ant Media Server listing](https://aws.amazon.com/marketplace/pp/prodview-464ritgzkzod6) in **AWS Marketplace** and click `View purchase options`. |
| 47 | + |
| 48 | +  |
| 49 | + |
| 50 | +- Click `Subscribe` — no charges are incurred until usage begins. |
| 51 | + |
| 52 | +  |
| 53 | + |
| 54 | +- Wait for confirmation that your subscription is active. |
| 55 | + |
| 56 | +### Step 2: Deploy with CloudFormation |
| 57 | +- Download the [CloudFormation template](https://auto-managed-ant-media-lambda-bucket-us-east-1.s3.us-east-1.amazonaws.com/Auto-Managed-Ant-Media-Server-Stack-latest.json) from Ant Media. |
| 58 | + |
| 59 | +- In the AWS Console, go to **AWS CloudFormation > Stacks**. |
| 60 | + |
| 61 | +- Click `Create Stack` with `New Resources` option. |
| 62 | + |
| 63 | +- Focus on `Specify Template` and choose `Upload a Template File` and Upload the CloudFormation Template you have just downloaded. Then click `Next`. |
| 64 | + |
| 65 | +  |
| 66 | + |
| 67 | +- Fill in required parameters (`Stack name`, Web Panel `Email`, `Password`, etc.) and click `Next`. |
| 68 | + |
| 69 | +Note: The `Period` value specifies the time after which the `instance` will `stop/terminate` if there is no stream on the server. |
| 70 | + For example, the default value is 3, which implies that if there is no stream for 3 minutes, the server would stop/terminate. |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | +- click `Next` for the other pages, and `Submit`. |
| 75 | + |
| 76 | +- Deployment takes ~5 minutes. |
| 77 | + |
| 78 | +- Copy the **Lambda URL endpoint** from the **stack outputs**. |
| 79 | + |
| 80 | +  |
| 81 | + |
| 82 | +- Visiting this URL triggers a backend instance (first spin-up **~60 seconds**; subsequent **~20 seconds**). |
| 83 | + |
| 84 | +  |
| 85 | + |
| 86 | +- Congratulations, your backend is ready! Log in to the Web Panel to confirm everything is ready. |
| 87 | + |
| 88 | +### Step 3: Start Streaming with Auto-Managed Service |
| 89 | + |
| 90 | +#### Option 1: Using JavaScript SDK |
| 91 | + |
| 92 | +Integrate the Lambda URL into your WebRTC or JS SDK: |
| 93 | + |
| 94 | +```js |
| 95 | +var webRTCAdaptor = new WebRTCAdaptor({ |
| 96 | + httpEndpointUrl: "<REPLACE_WITH_LAMBDA_URL>", |
| 97 | + localVideoElement: document.getElementById("localVideo"), |
| 98 | + callback: (info, obj) => { |
| 99 | + console.log("callback info: " + info); |
| 100 | + if (info == "initialized") |
| 101 | + { |
| 102 | + webRTCAdaptor.publish("myStream") |
| 103 | + } |
| 104 | + else if (info == "publish_started") { |
| 105 | + console.log("publish started"); |
| 106 | + } |
| 107 | + else if (info == "publish_finished") { |
| 108 | + console.log("publish finished") |
| 109 | + } |
| 110 | + } |
| 111 | +} |
| 112 | +``` |
| 113 | +
|
| 114 | +Check out the AMS [Javascript SDK](https://docs.antmedia.io/category/javascript-sdk/) guide for the integration. |
| 115 | +
|
| 116 | +#### Option 2: Direct URL (Browser) |
| 117 | +
|
| 118 | +Open the Lambda URL in a browser to access the Web Panel and start streaming. |
| 119 | +
|
| 120 | +Check out the [stream publishing section](https://docs.antmedia.io/category/publish-live-stream/) to publish streams using different protocols and ways. |
| 121 | +
|
| 122 | +### Step 4: Configure Persistence & Recording |
| 123 | +
|
| 124 | +- **Data Persistence**: Metadata and settings are stored in ElastiCache; they survive instance spin-ups. |
| 125 | +- **Recording**: Enable [S3 recording](https://antmedia.io/docs/category/s3-recording-and-integration/) to ensure your streams are saved even if instances terminate. Local disk recording may be lost when instances spin down. |
| 126 | +
|
| 127 | +### Step 5: Stop or Terminate Instances |
| 128 | +
|
| 129 | +- **Stop**: Preserves Elastic IP and EBS volumes; minimal storage cost; fast spin-ups. |
| 130 | +- **Terminate**: Deletes the instance completely; no idle cost; slower spin-ups. |
| 131 | +- Use CloudFormation to delete stacks when no longer needed. |
| 132 | +
|
| 133 | +## Best Practices & Tips |
| 134 | +- Set a sensible **idle timeout** (~3 minutes recommended). |
| 135 | +- Prefer **S3-based recording** for important streams. |
| 136 | +- Monitor usage regularly to optimize cost and performance. |
| 137 | +- Combine Auto‑Managed instances with your existing pipelines for AI moderation, analytics, or custom workflows. |
| 138 | +
|
| 139 | +## Real Impact: Before vs After |
| 140 | +
|
| 141 | +| Problem | Traditional Approach | Auto‑Managed Streaming | |
| 142 | +| ------------------ | ----------------------------------- | -------------------------------------- | |
| 143 | +| Scaling | Manual, slow, error-prone | Automatic, fast, hands-free | |
| 144 | +| Costs | Always-on servers, wasted resources | Pay only when streaming | |
| 145 | +| Content Control | Limited, vendor-controlled | Full ownership & encryption | |
| 146 | +| Flexibility | Locked workflows | Customizable SDKs, APIs, and pipelines | |
| 147 | +| Operational Burden | High | Minimal, backend fully managed | |
0 commit comments