---
title: "Hack Day: Bridging the Gap - Building Synchronous IoT APIs with AWS Durable Lambda"
description: Discover how to build synchronous IoT APIs using AWS Durable Lambda. See how base2 achieved sub-second latency without polling workarounds in this HackDay
image: https://blog.base2services.com/hubfs/Hackday%20IoT_Durable_%20Lambda-600-350px.png
---

[![base2Services - The Cloud Services People](https://www.base2services.com/images/base2.svg)](https://www.base2services.com/)

- [Solutions](https://www.base2services.com/services/) 
    - Get Started Here
    - [KickOff](https://www.base2services.com/products/kickoff/)
    - [Secure Compass](https://www.base2services.com/products/securecompass/)
    - [Focused AWS Review](https://www.base2services.com/consulting/services/discovery-and-review/)
    - Managed Services
    - [Cloud Management](https://www.base2services.com/cloudmanagement/)
    - [Platform Engineering](https://www.base2services.com/platform-engineering/)
    - [Compliance & Risk](https://www.base2services.com/security/)
    - Bundled Engagement
    - [DevOps as a Service](https://www.base2services.com/devops/)
    - Specialist Engagements
    - [Migration](https://www.base2services.com/consulting/services/cloud-migration/)
    - [AI Factory](https://www.base2services.com/artificialintelligence/aifactory/)
    - [Generative AI](https://www.base2services.com/artificialintelligence/generativeai/)
    - [SaaS CTO](https://www.base2services.com/consulting/services/saas-cto/)
- [Industries](https://www.base2services.com/industries/) 
    - [SaaS & ISVs](https://www.base2services.com/industries/saas-and-isvs/)
    - [Financial Services](https://www.base2services.com/industries/financial-services/)
    - [Healthcare & Life Sciences](https://www.base2services.com/industries/healthcare-and-life-sciences/)
    - [Government & Enterprise](https://www.base2services.com/industries/government-and-enterprise/)
    - [Media](https://www.base2services.com/industries/media/)
    - [Education](https://www.base2services.com/industries/education/)
- [AWS Advanced Partner](https://www.base2services.com/partners/partner-pages/aws.html) 
    - [AWS DevOps Competency](https://www.base2services.com/partners/partner-pages/aws.html)
    - [AWS SaaS Competency](https://www.base2services.com/aws-saas-solutions/index.html)
    - [Enablement Tools](https://www.base2services.com/partners/)
- [Explore](https://www.base2services.com/community/) 
    - [Blog](https://blog.base2services.com)
    - [Videos](https://www.base2services.com/community/videos/)
    - Toolkit
    - [Cloud Monitoring](https://www.base2services.com/products/cloud-monitoring-aws/)
    - [Start/Stop](https://www.base2services.com/products/start-stop-aws/)
    - [Safe Test Data](https://www.base2services.com/products/safe-test-data/)
    - [App Configuration](https://www.base2services.com/products/application-config/)
    - [Secure Access](https://www.base2services.com/products/secure-access-aws/)
    - [Ask about AWS](https://www.base2services.com/products/ai-access-aws/)
    - [Resource Documenter](https://www.base2services.com/products/resource-documenter/)
- [Talk to Us](https://www.base2services.com/contact/)
- [About](https://www.base2services.com/about/) 
    - [About Us](https://www.base2services.com/about/)
    - [Why Choose Us](https://www.base2services.com/how-we-work/why-choose-us/)
    - [How We Work](https://www.base2services.com/how-we-work/)
    - [Case Studies](https://www.base2services.com/customers/)

<https://blog.base2services.com/hackday-bridging-the-gap-building-synchronous-iot-apis-with-aws-durable-lambda#mobile-nav>

- [Solutions](https://www.base2services.com/services/)
  
  ##### Get Started Here
  
    - [KickOff](https://www.base2services.com/products/kickoff/)
    - [Secure Compass](https://www.base2services.com/products/securecompass/)
    - [Focused AWS Review](https://www.base2services.com/consulting/services/discovery-and-review/)

  ##### Managed Services
  
    - [Cloud Management](https://www.base2services.com/cloudmanagement/)
    - [Platform Engineering](https://www.base2services.com/platform-engineering/)
    - [Compliance & Risk](https://www.base2services.com/security/)

  ##### Bundled Engagement
  
    - [DevOps as a Service](https://www.base2services.com/devops/)

  ##### Specialist Engagements
  
    - [Migration](https://www.base2services.com/consulting/services/cloud-migration/)
    - [AI Factory](https://www.base2services.com/artificialintelligence/aifactory/)
    - [Generative AI](https://www.base2services.com/artificialintelligence/generativeai/)
    - [SaaS CTO](https://www.base2services.com/consulting/services/saas-cto/)
- [Industries](https://www.base2services.com/industries/) 
    - [SaaS & ISVs](https://www.base2services.com/industries/saas-and-isvs/)
    - [Financial Services](https://www.base2services.com/industries/financial-services/)
    - [Healthcare & Life Sciences](https://www.base2services.com/industries/healthcare-and-life-sciences/)
    - [Government & Enterprise](https://www.base2services.com/industries/government-and-enterprise/)
    - [Media](https://www.base2services.com/industries/media/)
    - [Education](https://www.base2services.com/industries/education/)
- More 
    - [AWS Advanced Partner](https://www.base2services.com/partners/partner-pages/aws.html)
    - [Explore](https://www.base2services.com/community/)
    - [About Us](https://www.base2services.com/about/)
    - [Case Studies](https://www.base2services.com/customers/)
- [AWS Advanced Partner](https://www.base2services.com/partners/partner-pages/aws.html) 
    - [AWS DevOps Competency](https://www.base2services.com/partners/partner-pages/aws.html)
    - [AWS SaaS Competency](https://www.base2services.com/aws-saas-solutions/index.html)
    - [Amazon Foundational Technical Review](https://www.base2services.com/consulting/amazon-foundational-technical-review-ftr/index.html)
    - [Other partners](https://www.base2services.com/partners/)
- [Explore](https://www.base2services.com/community/) 
    - [Blog](https://blog.base2services.com)
    - [Videos](https://www.base2services.com/community/videos/)
    - Toolkit
    - [Cloud Monitoring](https://www.base2services.com/products/cloud-monitoring-aws/)
    - [Start/Stop](https://www.base2services.com/products/start-stop-aws/)
    - [Safe Test Data](https://www.base2services.com/products/safe-test-data/)
    - [App Configuration](https://www.base2services.com/products/application-config/)
    - [Secure Access](https://www.base2services.com/products/secure-access-aws/)
    - [Ask about AWS](https://www.base2services.com/products/ai-access-aws/)
    - [Resource Documenter](https://www.base2services.com/products/resource-documenter/)
- [About](https://www.base2services.com/about/) 
    - [About Us](https://www.base2services.com/about/)
    - [Why Choose Us](https://www.base2services.com/how-we-work/why-choose-us/)
    - [How We Work](https://www.base2services.com/how-we-work/)
    - [Case Studies](https://www.base2services.com/customers/)
- <https://www.base2services.com/search.html> 
    - [Search](https://www.base2services.com/search.html)
- [Talk to Us](https://www.base2services.com/contact/)

[1300 713 559](tel:1300713559) [646 586 9485](tel:3474670942)

[← Blogs](https://blog.base2services.com/)

[AWS](https://blog.base2services.com/tag/aws) [Serverless](https://blog.base2services.com/tag/serverless)

# Hack Day: Bridging the Gap - Building Synchronous IoT APIs with AWS Durable Lambda

![Jared Brook](https://blog.base2services.com/hs-fs/hubfs/Headshots/jared@2x.jpg?width=100) Jared Brook ·  3 Minute Read

Share [in](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fblog.base2services.com%2Fhackday-bridging-the-gap-building-synchronous-iot-apis-with-aws-durable-lambda) [X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fblog.base2services.com%2Fhackday-bridging-the-gap-building-synchronous-iot-apis-with-aws-durable-lambda&text=%3Cspan+id%3D%22hs_cos_wrapper_name%22+class%3D%22hs_cos_wrapper+hs_cos_wrapper_meta_field+hs_cos_wrapper_type_text%22+style%3D%22%22+data-hs-cos-general-type%3D%22meta_field%22+data-hs-cos-type%3D%22text%22+%3EHack+Day%3A+Bridging+the+Gap+-+Building+Synchronous+IoT+APIs+with+AWS+Durable+Lambda%3C%2Fspan%3E) [f](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fblog.base2services.com%2Fhackday-bridging-the-gap-building-synchronous-iot-apis-with-aws-durable-lambda) [↗](mailto:?subject=%3Cspan+id%3D%22hs_cos_wrapper_name%22+class%3D%22hs_cos_wrapper+hs_cos_wrapper_meta_field+hs_cos_wrapper_type_text%22+style%3D%22%22+data-hs-cos-general-type%3D%22meta_field%22+data-hs-cos-type%3D%22text%22+%3EHack+Day%3A+Bridging+the+Gap+-+Building+Synchronous+IoT+APIs+with+AWS+Durable+Lambda%3C%2Fspan%3E&body=https%3A%2F%2Fblog.base2services.com%2Fhackday-bridging-the-gap-building-synchronous-iot-apis-with-aws-durable-lambda)

At base2Services, we live and breathe cloud infrastructure. While our daily operations focus on stability and scalability, our Hack Days are the perfect excuse to push boundaries and get our hands dirty with the very latest AWS releases. For our most recent session, we set our sights on a challenge that has frustrated developers for years: building a truly synchronous API on top of an asynchronous, event-driven architecture.

Our tool of choice? The recently released AWS Durable Lambda functions.

## The Challenge: Sync vs. Async

In the world of IoT, communication is almost exclusively asynchronous. You send a command to a device via MQTT, and eventually, the device reports back. However, modern web applications often demand a synchronous RESTful experience -  the user clicks a button, waits a moment, and expects an immediate confirmation that the action was completed on the device.

Historically, bridging this gap involved complex workarounds:

- **Polling:** The client keeps asking, "Is it done yet?" (Inefficient and slow).
- **WebSockets:** Great for real-time, but heavy to implement for simple request-response cycles.
- **Step Functions:** Powerful, but can introduce latency and cost overhead for high-volume, low-latency transactions.

We wanted to see if the new AWS Durable Lambda  feature could solve this architecture problem without the polling overhead.

## The Experiment: "Pause and Resume"

Our goal was to create a solution where an Amazon API Gateway request could trigger a process that communicates with a physical device and returns a response in a single HTTP transaction - without the Lambda function spinning idly or polling a database.

We built a Proof of Concept (PoC) leveraging AWS IoT Core and the new AWS Durable Lambda capabilities. Here is the flow we designed:

1. **The Trigger:** A user invokes an Amazon API Gateway HTTP endpoint.
2. **The Pause:** Amazon API Gateway triggers an **AWS Durable Lambda**. This function publishes a message to an IoT device via MQTT using AWS IoT Core. Crucially, instead of finishing, the Lambda **pauses execution** and creates a callback token.
3. **The Action:** The IoT device (located in Melbourne) receives the message, runs a local query, and publishes the result back to a response topic in AWS IoT Core.
4. **The Resume:** AWS IoT Core triggers a secondary "Callback Lambda." This function takes the device response and uses the token to **resume** the original AWS Durable Lambda.
5. **The Response:** The original AWS Durable Lambda wakes up exactly where it left off and returns the device's data as a standard HTTP response to the Amazon API Gateway.

## The Results: Sub-Second Latency

The theory was sound, but we were sceptical about the performance. Could a request travel from a user to the cloud, to a physical device, and back through a paused function fast enough for a web API?

The results were impressive.

Testing a round trip from a user in Melbourne, connecting to our API in Sydney, which communicated with a device back in Melbourne, we achieved latency of less than 1 second.

Key Takeaway: We achieved a fully event-driven architecture with zero polling. The Lambda only runs when it is processing or resuming, making it highly cost-effective, while the user gets the instant feedback of a synchronous web request.

## What We Learned

This Hack Day proved that AWS Durable Lambdas are a game-changer for "Device-in-the-loop" or "Human-in-the-loop" workflows.

By abstracting away the state management that usually requires Amazon DynamoDB or Step Functions, we were able to write code that *looks* synchronous but *behaves* asynchronously. This significantly reduces the complexity of IoT APIs and opens up new possibilities for real-time device interaction.

We validated that you can indeed have the best of both worlds: the reliability of event-driven architecture and the simplicity of RESTful APIs.

[Contact us](https://www.base2services.com/contact/) today to discuss modernising your cloud infrastructure with the latest AWS serverless capabilities.

#### Stay in the loop

### DevOps & AI insights, straight to your inbox

Our best content, services and events. Roughly every second month.

### Keep reading

#### [devops AWS · Cloud-Native Hack Day: Supabase, Vercel, and Where PaaS Fits with AWS](https://blog.base2services.com/hack-day-supabase-vercel-and-where-paas-fits-with-aws)

#### [devops SaaS · AWS · Cloud AMS Advanced Is Being Retired, Here Are Your Options Before June 2027](https://blog.base2services.com/ams-advanced-is-being-retired-here-are-your-options-before-june-2027)

#### [devops AWS · Cloud · Tech · AI Unlocking Enterprise Knowledge with Amazon Kendra and AI](https://blog.base2services.com/unlocking-enterprise-knowledge-with-amazon-kendra-and-ai)

#### [devops AWS · AI Hack Day: Teaching Our Tools to Think for Themselves](https://blog.base2services.com/hack-day-teaching-our-tools-to-think-for-themselves)

## Send an enquiry

Tell us about your environment, a project in flight or a problem you are trying to solve.

- For regulated, SaaS and product teams on AWS
- No pitch deck, a practical conversation first

Or book a time that suits you

[Book a 30-minute chat](https://info.base2services.com/meetings/m-shelton/contact-us)

[![base2Services](https://www.base2services.com/images/base2_white.svg)](https://www.base2services.com/)

<https://www.linkedin.com/company/base2services> <https://x.com/base2Services> <https://www.facebook.com/pages/base2Services/91506069748> <https://www.youtube.com/c/Base2services>

base2Services is an ISO 27001:2022 certified AWS managed services partner, running platform engineering, cloud operations, AI operations and compliance for SaaS companies, ISVs and regulated software teams since 2005.

### Get Started Here

- [KickOff](https://www.base2services.com/products/kickoff/)
- [Secure Compass](https://www.base2services.com/products/securecompass/)
- [Focused AWS Review](https://www.base2services.com/consulting/services/discovery-and-review/)

### Managed Services

- [Cloud Management](https://www.base2services.com/cloudmanagement/)
- [Platform Engineering](https://www.base2services.com/platform-engineering/)
- [Compliance & Risk](https://www.base2services.com/security/)
- [DevOps as a Service](https://www.base2services.com/devops/)

### Specialist Engagements

- [Migration](https://www.base2services.com/consulting/services/cloud-migration/)
- [AI Factory](https://www.base2services.com/artificialintelligence/aifactory/)
- [Generative AI](https://www.base2services.com/artificialintelligence/generativeai/)
- [SaaS CTO](https://www.base2services.com/consulting/services/saas-cto/)

### Toolkit

- [Cloud Monitoring](https://www.base2services.com/products/cloud-monitoring-aws/)
- [Start/Stop](https://www.base2services.com/products/start-stop-aws/)
- [Safe Test Data](https://www.base2services.com/products/safe-test-data/)
- [App Configuration](https://www.base2services.com/products/application-config/)
- [Secure Access](https://www.base2services.com/products/secure-access-aws/)
- [Ask about AWS](https://www.base2services.com/products/ai-access-aws/)
- [Resource Documenter](https://www.base2services.com/products/resource-documenter/)

### Company

- [About Us](https://www.base2services.com/about/)
- [Customers](https://www.base2services.com/customers/)
- [How We Work](https://www.base2services.com/how-we-work/)
- [Why Choose Us](https://www.base2services.com/how-we-work/why-choose-us/)
- [Explore](https://www.base2services.com/community/)
- [Blog](https://blog.base2services.com/)
- [Videos](https://www.base2services.com/community/videos/)

![ISO 27001 Certified](https://www.base2services.com/images/ISO-27001-certified_white.svg) [![JASANZ Certified](https://www.base2services.com/images/jasanz.svg)](https://register.jas-anz.org/certified-organisations)

 © base2Services | [Terms & Conditions](https://www.base2services.com/community/terms.html) | [Privacy](https://www.base2services.com/community/privacy.html)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Jared Brook",
    "url" : "https://blog.base2services.com/author/jared-brook"
  },
  "dateModified" : "2026-03-31T14:35:57.802Z",
  "datePublished" : "2026-02-11T18:14:59.000Z",
  "headline" : "Hack Day: Bridging the Gap - Building Synchronous IoT APIs with AWS Durable Lambda",
  "image" : [ "https://blog.base2services.com/hubfs/Hackday%20IoT_Durable_%20Lambda-600-350px.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.base2services.com/hackday-bridging-the-gap-building-synchronous-iot-apis-with-aws-durable-lambda",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.base2services.com/hubfs/B2S_logo_600x400px.png"
    },
    "name" : "base2Services"
  }
}
```