Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
Dev.to AI · 2026/8/3 14:26:35
Cloudagotchi Part 4 : My Tamagotchi reads me the AWS news

Cloudagotchi Part 4 : My Tamagotchi reads me the AWS news

AI 中文解读
Cloudagotchi项目迎来最终章:作者给虚拟宠物找了个正经工作——每天早上7点03分,它会自动抓取AWS官方更新,用自家AI把技术公告改写成活泼的宠物口吻,再通过语音合成读给主人听。这可不是花架子,宠物还会在屏幕上显示"报纸"图标,点一下就能听到它播报最新云服务动态。整个流程全靠云端一条Lambda函数驱动,成本低到每月不到一美元。有趣的是,虽然AI偶尔会过于兴奋地播报数据库小更新,但作者坦言这种"宠物的声音"其实是用语音合成加音调变调实现的,萌萌的外表下还是纯技术。对普通人来说,这个玩意的意义在于:智能设备不再是只会卖萌的摆件,而是能主动帮你筛选信息、用更亲切的方式传递资讯的助手。想象一下,你的智能音箱能把你关注的行业新闻,用你喜欢的语气播报出来,是不是比冷冰冰的通知栏有意思多了?这就是物联网和AI结合的魅力——让技术有温度,让资讯更生动。
<p>Here's my problem with virtual pets, and honestly with most IoT demos: after the novelty fades, they don't <em>do</em> anything for you. My pet from <a href="https://dev.to/aws/cloudagotchi-part-3-it-gets-hungry-while-you-sleep-a-serverless-pet-brain-1l1j">part 3</a> has feelings and memory, and I love it, but it contributes nothing to the household.</p> <p>Time to fix that. In this final part of the series, the pet gets a job: <strong>every morning at 7:03, it fetches the AWS "What's New" feed (thanks rss to still be around ❤️), has Amazon Bedrock rewrite the announcements as a briefing <em>in its own excitable little pet voice</em>, has Amazon Polly speak it, and delivers it to the device, where a newspaper badge appears, and tapping it makes the pet read the news to me out loud through the onboard speaker.</strong></p> <p>It's one of my favorite thing I've built so far this year. My Cloudagotchi is now better informed than I am before my morning hot chocolate (spoiler alert, I don't like cofee... sorry).</p> <p>In this article, I will walk you through the full pipeline (RSS → Bedrock → Polly → S3 → MQTT → speaker) including the one decision that makes the device side almost embarrassingly simple: asking Polly for the <em>right audio format</em>.</p> <blockquote> <p>⚠️ <strong>Reality check (sorry 😅):</strong> the pet's voice is Polly's neural TTS pitched up with SSML. Charming, but it won't fool anyone into thinking a soul lives in the device. Bedrock also occasionally gets <em>too</em> excited about a niche database feature ("HUMAN. WAKE UP. Aurora has a new minor version"). And fair warning: the <em>cloud</em> half of this article worked on the first deploy; the <em>device</em> half taught me four embedded-streaming lessons the hard way. They're all documented below, symptoms included, so your afternoon goes better than mine. Cost, though, is genuinely negligible: one Haiku call and ~1,000 Polly characters a day is under a dollar a month.</p> </blockquote> <p>Final code: <code>git checkout article-4</code>, or just <code>main</code>, since this completes the project.</p> <h2> The pipeline </h2> <p><a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo39aqo256shypi97x1oe.png" class="article-body-image-wrapper"><img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo39aqo256shypi97x1oe.png" alt="Architecture diagram of the briefing pipeline: EventBridge triggers Lambda, which calls Bedrock and Polly, stores audio in S3, and publishes to MQTT for the device" width="800" height="450"></a></p> <p>One Lambda, one bucket, one schedule. All the intelligence is cloud-side, which means when I want to change the pet's personality, tweak the briefing length, or switch news sources, it's just a <code>cdk deploy</code>, and the firmware never knows anything happened. That's the payoff of the architecture we've been building since part 1.</p> <h2> Step 1 — The news, without an API key </h2> <p>AWS publishes a plain old RSS feed of every announcement. No auth, no scraping, no SDK:<br> </p> <div class="highlight js-code-highlight"> <pre class="highlight javascript"><code><span class="kd">const</span> <span class="nx">FEED_URL</span> <span class="o">=</span> <span class="dl">'</span><span class="s1">https://aws.amazon.com/about-aws/whats-new/recent/feed/</span><span class="dl">'</span><span class="p">;</span> <span class="k">export</span> <span class="k">async</span> <span class="kd">function</span> <span class="nf">fetchNews</span><span class="p">(</span><span class="nx">limit</span> <span class="o">=</span> <span class="mi">10</span><span class="p">)</span> <span class="p">{</span> <span class="kd">const</span> <span class="nx">res</
分享
阅读原文