Azure

Azure Functions vs AWS Lambda: what one trigger per function changes

Apps on Azure Blog singh_abhi
Azure

In Azure a function takes exactly one trigger, while a single Lambda handler can be wired to several event sources. Using an order-processing example, the post compares what that difference means for code reuse and event handling design.

Key points

  • In Azure each function takes exactly one trigger; the rule applies per function, not to the whole Function App.
  • A single Function App can host HTTP, queue and timer triggered functions side by side.
  • In Lambda one handler can be invoked by several sources such as API Gateway, SQS and a scheduled event.
  • Multiple triggers do not merge: every source calls the function independently and the handler routes on the event.
  • SQS uses an event source mapping that polls the queue and invokes the function with batches.
  • Both platforms allow shared business logic; the difference is only in how entry points are organised.

Why it matters

Teams migrating an existing Lambda codebase usually bring their event-routing switch statement along, and that is exactly where Azure's model pushes back: the platform already separates entry points, so a router inside one function rebuilds what Function App gives you for free. The practical work is mostly mechanical, splitting the handler per trigger, moving the branching into an application service and registering that service with dependency injection in the host.

Before committing, look at how your hosting plan shares resources and settings across functions in the same app, because that shared boundary replaces the per-function configuration isolation you had on Lambda.

Real-world use

  • An order-processing application that receives orders over HTTP, a queue and a scheduled job.
  • Different event contracts reaching the same Lambda handler from API Gateway, SQS and a scheduled invocation.
  • Running a scheduled order-reconciliation run as its own timer function.

This summary was generated by the agent from the original post on Apps on Azure Blog. The full text and all rights belong to its author and publisher. Go to original

Report this story

Is something wrong with the summary, or do you own this content? Your message comes straight to my inbox.

Type of message

Related stories

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message