# Serverless Swift: Controlling Philips Hue bulbs by running Swift on AWS Lambda

**URL:** <https://forums.swift.org/t/serverless-swift-controlling-philips-hue-bulbs-by-running-swift-on-aws-lambda/78069>\
**Category:** Server\
**Tags:** swift, swift-nio, serverless, aws\
**Created:** [February 24, 2025, 7:32pm UTC](https://forums.swift.org/t/serverless-swift-controlling-philips-hue-bulbs-by-running-swift-on-aws-lambda/78069 "2025-02-24T19:32:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rtoken](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/rtoken/32/45563_2.png) [@rtoken](https://forums.swift.org/u/rtoken)\
**Post date:** [February 24, 2025, 7:32pm UTC](https://forums.swift.org/t/serverless-swift-controlling-philips-hue-bulbs-by-running-swift-on-aws-lambda/78069/1 "2025-02-24T19:32:23Z")

</div>

I built an event-driven serverless back end entirely in Swift that remotely flashes the Philips Hue bulbs in my house whenever my favorite sports teams score or win. It runs on AWS services including Lambda, DynamoDB, SQS, and EventBridge, and costs less than $0.20/month. It was a great use case for learning about Swift on Lambda.

You can view the full source code for this project on [GitHub](https://github.com/r-token/sports-home-automation-swift).

The Infrastructure as Code config and deployment is all handled by [Swift Cloud](https://github.com/swift-cloud/swift-cloud). Fantastic tool.

You can read my blog post about this, which gets into the technical weeds, [here](https://www.ryantoken.com/blog/serverless-swift). I had a blast working on the project and writing the post. The @SwiftLang account even picked it up on [X](https://x.com/SwiftLang/status/1894069413755629892), [Bluesky](https://bsky.app/profile/swift.org/post/3liwt5wlvek25), and [Mastodon](https://mastodon.social/@swiftlang/114059928231605765)!

Interested in your feedback! I haven't seen much content out there about serverless Swift, and I think the language fits really well in that environment. Hopefully the ecosystem around this continues to grow. I had so much fun with it.
