{"id":820,"date":"2026-10-29T13:33:43","date_gmt":"2026-10-29T13:33:43","guid":{"rendered":"https:\/\/vectalk.com.br\/blog\/whatsapp-webhook-aws-lambda-serverless\/"},"modified":"2026-10-29T13:33:47","modified_gmt":"2026-10-29T13:33:47","slug":"whatsapp-webhook-aws-lambda-serverless","status":"publish","type":"post","link":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/","title":{"rendered":"Serverless WhatsApp webhook on AWS Lambda, Cloudflare Workers and Vercel"},"content":{"rendered":"\n<p><em>Updated on October 29, 2026<\/em><\/p>\n\n\n\n<p>You can run the WhatsApp Business API webhook on serverless functions such as AWS Lambda, and for many projects it is the cheapest and simplest option to maintain. The rule is the same on every platform: validate the <code>X-Hub-Signature-256<\/code> signature, write the event to a queue and return <code>200<\/code> right away, leaving the processing to another function. This guide covers the pros and cons and shows a short example for Cloudflare Workers, AWS Lambda and Vercel.<\/p>\n\n\n\n<p>The examples use JavaScript, since all three platforms run it. The verification and signature logic is the same one explained in our tutorials on <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-bot-nodejs-express\/\">building a bot with Node.js<\/a> and <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-signature-validation\/\">validating the webhook signature<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Serverless for webhooks: pros and cons<\/h2>\n\n\n\n<p>A WhatsApp webhook receives traffic in bursts: nothing overnight, spikes after a campaign. That profile fits serverless well, but there are pitfalls.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Aspect<\/th><th>Pro<\/th><th>Con<\/th><\/tr><\/thead><tbody><tr><td>Cost<\/td><td>You pay per invocation; low traffic costs little<\/td><td>At high, steady volume, a server may be cheaper<\/td><\/tr><tr><td>Scaling<\/td><td>Campaign spikes are absorbed with no configuration<\/td><td>Many concurrent instances can exceed your database&#8217;s connection limit<\/td><\/tr><tr><td>Cold start<\/td><td>Workers uses isolates, with fast startup<\/td><td>On Lambda and Vercel, the first request after idle time is slower<\/td><\/tr><tr><td>Execution time<\/td><td>Enough to validate and enqueue<\/td><td>Each platform has a limit; background tasks after the response are limited or cancelled<\/td><\/tr><tr><td>State<\/td><td>Nothing to manage<\/td><td>There is no shared memory: deduplication needs external storage<\/td><\/tr><tr><td>HTTPS<\/td><td>Valid certificate included<\/td><td>The URL can change between environments; pin a custom domain<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Execution time is the factor that matters most. Meta&#8217;s documentation says that deliveries without a <code>200<\/code> are retried immediately and then a few more times, with decreasing frequency, for up to 7 days. It does not set a maximum response time, but a slow webhook increases the chance of a retry. If the function calls an AI model, a database and the send API before responding, it becomes slow and expensive. If it responds first and tries to keep going in the background, the platform may kill the work halfway through.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The pattern: validate, enqueue, respond<\/h2>\n\n\n\n<p>The design that works on all three platforms has two functions:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Receiver (HTTP).<\/strong> Answers the verification <code>GET<\/code>. On <code>POST<\/code>, reads the raw body, validates the HMAC, sends the event to a queue and returns <code>200<\/code>.<\/li>\n\n\n<li><strong>Consumer (queue).<\/strong> Reads the events, discards the ones already processed, decides on the reply and calls the messages API.<\/li>\n\n<\/ol>\n\n\n\n<p>The receiver does very little and finishes in milliseconds. The consumer can take its time, fail and be re-run by the queue without Meta noticing. Since Meta may resend the same event, the consumer must be <strong>idempotent<\/strong>: store the <code>id<\/code> of each message (the <code>wamid<\/code>) in storage that supports conditional writes and ignore repeats.<\/p>\n\n\n\n<p>Three details apply to every example:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Raw body.<\/strong> The HMAC is computed over the bytes received. Read the body as text or a buffer before any <code>JSON.parse<\/code>.<\/li>\n\n\n<li><strong>Safe comparison.<\/strong> Use a constant-time comparison function (<code>crypto.subtle.verify<\/code> or <code>timingSafeEqual<\/code>).<\/li>\n\n\n<li><strong>Batches.<\/strong> Meta may group up to 1,000 updates into a single <code>POST<\/code>, with no guarantee of grouping. Your code must handle an <code>entry<\/code> with several <code>changes<\/code> and several <code>messages<\/code>.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Cloudflare Workers + Queues<\/h2>\n\n\n\n<p>In Workers, the handler receives a standard <code>Request<\/code>. The Web Crypto API is available, and <code>crypto.subtle.verify<\/code> already compares in constant time. The producer sends to a Queue and the consumer is the <code>queue<\/code> function of the same Worker (or another one).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-js\">export default {\n  async fetch(request, env) {\n    const url = new URL(request.url);\n\n    if (request.method === \"GET\") {\n      const p = url.searchParams;\n      if (p.get(\"hub.mode\") === \"subscribe\" &amp;&amp; p.get(\"hub.verify_token\") === env.VERIFY_TOKEN) {\n        return new Response(p.get(\"hub.challenge\"), { status: 200 });\n      }\n      return new Response(\"forbidden\", { status: 403 });\n    }\n\n    const body = await request.arrayBuffer();\n    if (!(await validSignature(env.APP_SECRET, body, request.headers.get(\"x-hub-signature-256\")))) {\n      return new Response(\"invalid signature\", { status: 401 });\n    }\n    await env.WHATSAPP_QUEUE.send(JSON.parse(new TextDecoder().decode(body)));\n    return new Response(\"ok\", { status: 200 });\n  },\n\n  async queue(batch, env) {\n    for (const msg of batch.messages) {\n      try {\n        await handleEvent(msg.body, env); \/\/ your logic: dedupe + reply\n        msg.ack();\n      } catch (err) {\n        console.error(err);\n        msg.retry({ delaySeconds: 30 });\n      }\n    }\n  },\n};\n\nasync function validSignature(secret, body, header) {\n  if (!header?.startsWith(\"sha256=\")) return false;\n  const hex = header.slice(7);\n  if (!\/^[0-9a-f]{64}$\/i.test(hex)) return false;\n  const sig = new Uint8Array(hex.match(\/..\/g).map((h) =&gt; parseInt(h, 16)));\n  const key = await crypto.subtle.importKey(\n    \"raw\", new TextEncoder().encode(secret),\n    { name: \"HMAC\", hash: \"SHA-256\" }, false, [\"verify\"]\n  );\n  return crypto.subtle.verify(\"HMAC\", key, sig, body);\n}<\/code><\/pre>\n\n\n\n<p>The <code>wrangler.jsonc<\/code> configuration binds the queue as both producer and consumer:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-json\">{\n  \"name\": \"whatsapp-webhook\",\n  \"main\": \"src\/index.js\",\n  \"queues\": {\n    \"producers\": [{ \"queue\": \"whatsapp-events\", \"binding\": \"WHATSAPP_QUEUE\" }],\n    \"consumers\": [{ \"queue\": \"whatsapp-events\", \"max_batch_size\": 10, \"max_retries\": 5, \"dead_letter_queue\": \"whatsapp-events-dlq\" }]\n  }\n}<\/code><\/pre>\n\n\n\n<p>Secrets go in with <code>wrangler secret put APP_SECRET<\/code> (and the same for <code>VERIFY_TOKEN<\/code> and the API token). Limits to know, according to Cloudflare&#8217;s documentation:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Each Queue message must be smaller than 128 KB. A <code>POST<\/code> carrying a large batch from Meta can exceed that; in that case, enqueue each <code>change<\/code> separately with <code>sendBatch<\/code>.<\/li>\n\n\n<li><code>ctx.waitUntil()<\/code> keeps the Worker alive for at most 30 seconds after the response. It is meant for logs and metrics, not for processing the conversation.<\/li>\n\n\n<li>Without <code>max_retries<\/code>, a failing message is retried up to 3 times and then deleted from the queue. With a <code>dead_letter_queue<\/code>, messages that ran out of attempts go there instead of disappearing.<\/li>\n\n<\/ul>\n\n\n\n<p>For deduplication, Workers KV does not offer conditional writes; a Durable Object or a D1 database with a unique key on the <code>wamid<\/code> works better.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">AWS Lambda + SQS<\/h2>\n\n\n\n<p>On AWS, the shortest path is a function URL (no API Gateway) for the receiver and an SQS queue wired to the consumer. The function URL event follows the API Gateway payload format 2.0: <code>queryStringParameters<\/code>, <code>headers<\/code>, <code>body<\/code> and <code>isBase64Encoded<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-js\">\/\/ receiver.mjs (Node.js 22)\nimport { createHmac, timingSafeEqual } from \"node:crypto\";\nimport { SQSClient, SendMessageCommand } from \"@aws-sdk\/client-sqs\";\n\nconst sqs = new SQSClient({});\n\nexport const handler = async (event) =&gt; {\n  const method = event.requestContext.http.method;\n  const q = event.queryStringParameters ?? {};\n\n  if (method === \"GET\") {\n    const ok = q[\"hub.mode\"] === \"subscribe\" &amp;&amp; q[\"hub.verify_token\"] === process.env.VERIFY_TOKEN;\n    return ok\n      ? { statusCode: 200, headers: { \"content-type\": \"text\/plain\" }, body: q[\"hub.challenge\"] }\n      : { statusCode: 403, body: \"forbidden\" };\n  }\n\n  const raw = Buffer.from(event.body ?? \"\", event.isBase64Encoded ? \"base64\" : \"utf8\");\n  const header = headerValue(event.headers, \"x-hub-signature-256\");\n  if (!validSignature(raw, header)) return { statusCode: 401, body: \"invalid signature\" };\n\n  await sqs.send(new SendMessageCommand({\n    QueueUrl: process.env.QUEUE_URL,\n    MessageBody: raw.toString(\"utf8\"),\n  }));\n  return { statusCode: 200, body: \"ok\" };\n};\n\nfunction headerValue(headers = {}, name) {\n  const key = Object.keys(headers).find((k) =&gt; k.toLowerCase() === name);\n  return key ? headers[key] : undefined;\n}\n\nfunction validSignature(raw, header) {\n  if (!header?.startsWith(\"sha256=\")) return false;\n  const expected = Buffer.from(\n    \"sha256=\" + createHmac(\"sha256\", process.env.APP_SECRET).update(raw).digest(\"hex\")\n  );\n  const received = Buffer.from(header);\n  return expected.length === received.length &amp;&amp; timingSafeEqual(expected, received);\n}<\/code><\/pre>\n\n\n\n<p>The consumer receives the SQS records and returns only the ones that failed, so that only those go back to the queue:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-js\">\/\/ consumer.mjs\nexport const handler = async (event) =&gt; {\n  const batchItemFailures = [];\n  for (const record of event.Records) {\n    try {\n      await handleEvent(JSON.parse(record.body)); \/\/ your logic: dedupe + reply\n    } catch (err) {\n      console.error(err);\n      batchItemFailures.push({ itemIdentifier: record.messageId });\n    }\n  }\n  return { batchItemFailures };\n};<\/code><\/pre>\n\n\n\n<p>Configuration points:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Partial batch responses.<\/strong> Returning <code>batchItemFailures<\/code> only works if the SQS event source mapping has <code>ReportBatchItemFailures<\/code> enabled. Without it, a single failure sends the whole batch back to the queue.<\/li>\n\n\n<li><strong>Visibility timeout.<\/strong> On the queue, it must be greater than the consumer&#8217;s timeout, or the same message is delivered again while it is still being processed.<\/li>\n\n\n<li><strong>Dead-letter queue.<\/strong> Configure a DLQ with a maximum receive count so you don&#8217;t reprocess a broken event forever.<\/li>\n\n\n<li><strong>Deduplication.<\/strong> A DynamoDB <code>PutItem<\/code> with <code>ConditionExpression: \"attribute_not_exists(pk)\"<\/code> writes the <code>wamid<\/code> only once; if the condition fails, the event has already been handled.<\/li>\n\n\n<li><strong>Cold start.<\/strong> The receiver has little code and one dependency; keep it that way. If first-call latency bothers you, AWS offers provisioned concurrency, billed separately.<\/li>\n\n<\/ul>\n\n\n\n<p>The function URL must use auth type <code>NONE<\/code>, since Meta does not sign requests with SigV4. Protection comes from the HMAC validation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Vercel Functions<\/h2>\n\n\n\n<p>On Vercel, a function at <code>api\/webhook.js<\/code> can export a handler in the standard Web format. The <code>waitUntil<\/code> from the <code>@vercel\/functions<\/code> package lets a promise finish after the response, but the documentation is clear: those promises share the function&#8217;s timeout and are cancelled if it is exceeded. Use it to enqueue or log, not to talk to the AI.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"language-js\">\/\/ api\/webhook.js\nimport { waitUntil } from \"@vercel\/functions\";\n\nexport default {\n  async fetch(request) {\n    const url = new URL(request.url);\n\n    if (request.method === \"GET\") {\n      const p = url.searchParams;\n      return p.get(\"hub.mode\") === \"subscribe\" &amp;&amp; p.get(\"hub.verify_token\") === process.env.VERIFY_TOKEN\n        ? new Response(p.get(\"hub.challenge\"))\n        : new Response(\"forbidden\", { status: 403 });\n    }\n\n    const body = await request.arrayBuffer();\n    if (!(await validSignature(process.env.APP_SECRET, body, request.headers.get(\"x-hub-signature-256\")))) {\n      return new Response(\"invalid signature\", { status: 401 });\n    }\n    waitUntil(enqueue(new TextDecoder().decode(body)));\n    return new Response(\"ok\");\n  },\n};\n\nasync function enqueue(rawJson) {\n  \/\/ Publish to an external queue: SQS, an HTTP queue service or a Redis list.\n  \/\/ E.g.: await fetch(process.env.QUEUE_ENDPOINT, { method: \"POST\", body: rawJson, headers: { ... } });\n}\n\n\/\/ validSignature: the same crypto.subtle function from the Cloudflare Workers example<\/code><\/pre>\n\n\n\n<p>If the project uses Next.js 15.1 or later, Vercel recommends <code>after()<\/code> from <code>next\/server<\/code> instead of <code>waitUntil<\/code>, with the same idea. The function duration limit is configurable (<code>maxDuration<\/code>) within your plan&#8217;s ceiling; check the function duration page in Vercel&#8217;s documentation.<\/p>\n\n\n\n<p>A note about <code>waitUntil<\/code> in this example: if the external queue is down, the event is lost after the <code>200<\/code>. When that is unacceptable, switch to <code>await enqueue(...)<\/code> before responding. The response gets a few milliseconds slower, but Meta only receives <code>200<\/code> once the event is safe.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Which one to choose<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Platform<\/th><th>Best when<\/th><th>Natural queue<\/th><\/tr><\/thead><tbody><tr><td>Cloudflare Workers<\/td><td>You want low latency and everything in one place<\/td><td>Cloudflare Queues<\/td><\/tr><tr><td>AWS Lambda<\/td><td>The rest of your system already runs on AWS<\/td><td>SQS (with DLQ)<\/td><\/tr><tr><td>Vercel<\/td><td>The product is a Next.js app on Vercel<\/td><td>External queue service<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>In every case, the consumer does the heavy lifting: it calls the messages API, respects sending limits and stores state. To understand what arrives with each event type, see the <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-payload-examples\/\">webhook payload reference<\/a>. If events aren&#8217;t arriving, the <a href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-not-working\/\">checklist for a webhook that isn&#8217;t working<\/a> covers the common causes, such as the certificate and field subscriptions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to do it with Vectalk<\/h2>\n\n\n\n<p>Vectalk is a proxy for the <a href=\"https:\/\/vectalk.com.br\/blog\/en\/official-whatsapp-api\/\">official WhatsApp API<\/a> and delivers to your URLs the same payload Meta sends. What changes in a serverless setup:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>No verification <code>GET<\/code>.<\/strong> You register the URL with <code>POST https:\/\/apis.vectalk.com.br\/api\/webhooks<\/code>, passing <code>instance_id<\/code>, <code>url<\/code> and <code>name<\/code>. You can register several URLs per instance, for example one function for production and another for staging.<\/li>\n\n\n<li><strong>Protection via a secret in the URL.<\/strong> <a href=\"https:\/\/docs.vectalk.com.br\/concepts\/webhooks\">Vectalk&#8217;s webhook documentation<\/a> does not describe a signature header. Register the URL with a secret parameter (<code>?key=LONG_RANDOM_VALUE<\/code>) and reject requests without it, in place of HMAC validation.<\/li>\n\n\n<li><strong>20-second deadline.<\/strong> Vectalk expects a <code>200<\/code> in under 20 seconds and retries if it doesn&#8217;t get one. The validate-enqueue-respond pattern meets that with plenty of room, and deduplication in the consumer absorbs the retries.<\/li>\n\n\n<li><strong>Sending.<\/strong> The consumer calls <code>POST https:\/\/apis.vectalk.com.br\/api\/messages<\/code> with an instance token, without needing the <code>phone_number_id<\/code>.<\/li>\n\n<\/ul>\n\n\n\n<p>Create your account at <a href=\"https:\/\/apps.vectalk.com.br\/register\">apps.vectalk.com.br\/register<\/a> and check the endpoints in the <a href=\"https:\/\/docs.vectalk.com.br\">documentation<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently asked questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Can I process the message directly in the function, without a queue?<\/h3>\n\n\n\n<p>Yes, if the reply is fast and occasionally losing an event is acceptable. For AI bots or slow integrations, the queue prevents late responses to the webhook, retries and work cancelled halfway by the execution limit.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Does cold start get in the way of webhook verification?<\/h3>\n\n\n\n<p>Verification is a one-off request, and a slower startup usually doesn&#8217;t prevent the response. For events, occasional extra latency is tolerated, since Meta resends whatever didn&#8217;t get a <code>200<\/code>. Keep the receiver small to reduce the effect.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I avoid replying twice to the same customer?<\/h3>\n\n\n\n<p>Store the <code>id<\/code> of each incoming message in storage with conditional writes (DynamoDB, D1, Postgres with a unique key, Redis with <code>SET NX<\/code>). If the write fails because the <code>id<\/code> already exists, ignore the event.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do I need to validate the signature even with a secret URL?<\/h3>\n\n\n\n<p>With Meta, yes: the signature is the documented way to know the event came from Meta. URLs end up showing in logs and dashboards. A secret in the URL is the alternative when the sender doesn&#8217;t sign, as with Vectalk.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>Official sources consulted on October 29, 2026:<\/strong> <a href=\"https:\/\/developers.facebook.com\/documentation\/business-messaging\/whatsapp\/webhooks\/create-webhook-endpoint\" target=\"_blank\" rel=\"noreferrer noopener\">Create a webhook endpoint (Meta)<\/a>, <a href=\"https:\/\/developers.cloudflare.com\/workers\/runtime-apis\/context\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudflare Workers: Context (waitUntil)<\/a>, <a href=\"https:\/\/developers.cloudflare.com\/queues\/configuration\/javascript-apis\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudflare Queues: JavaScript APIs<\/a>, <a href=\"https:\/\/developers.cloudflare.com\/queues\/configuration\/configure-queues\/\" target=\"_blank\" rel=\"noreferrer noopener\">Cloudflare Queues: configure queues<\/a>, <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/urls-invocation.html\" target=\"_blank\" rel=\"noreferrer noopener\">AWS Lambda: invoking function URLs<\/a>, <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/services-sqs-errorhandling.html\" target=\"_blank\" rel=\"noreferrer noopener\">AWS Lambda: error handling for SQS<\/a>, <a href=\"https:\/\/vercel.com\/docs\/functions\/functions-api-reference\/vercel-functions-package\" target=\"_blank\" rel=\"noreferrer noopener\">Vercel: @vercel\/functions<\/a>, <a href=\"https:\/\/docs.vectalk.com.br\/concepts\/webhooks\">Vectalk: webhooks<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to run the WhatsApp Business API webhook on AWS Lambda, Cloudflare Workers or Vercel: verification, HMAC signature, fast response, idempotency and queues.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-820","post","type-post","status-publish","format-standard","hentry","category-blog"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WhatsApp Webhook on AWS Lambda, Workers and Vercel<\/title>\n<meta name=\"description\" content=\"WhatsApp webhook on AWS Lambda, Cloudflare Workers or Vercel: pros and cons, verification, HMAC signature checks and where to queue events.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WhatsApp Webhook on AWS Lambda, Workers and Vercel\" \/>\n<meta property=\"og:description\" content=\"WhatsApp webhook on AWS Lambda, Cloudflare Workers or Vercel: pros and cons, verification, HMAC signature checks and where to queue events.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Vectalk\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-29T13:33:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-29T13:33:47+00:00\" \/>\n<meta name=\"author\" content=\"wanderleyfcunha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"wanderleyfcunha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-aws-lambda-serverless\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-aws-lambda-serverless\\\/\"},\"author\":{\"name\":\"wanderleyfcunha\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\"},\"headline\":\"Serverless WhatsApp webhook on AWS Lambda, Cloudflare Workers and Vercel\",\"datePublished\":\"2026-10-29T13:33:43+00:00\",\"dateModified\":\"2026-10-29T13:33:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-aws-lambda-serverless\\\/\"},\"wordCount\":1508,\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-aws-lambda-serverless\\\/\",\"url\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-aws-lambda-serverless\\\/\",\"name\":\"WhatsApp Webhook on AWS Lambda, Workers and Vercel\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#website\"},\"datePublished\":\"2026-10-29T13:33:43+00:00\",\"dateModified\":\"2026-10-29T13:33:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\"},\"description\":\"WhatsApp webhook on AWS Lambda, Cloudflare Workers or Vercel: pros and cons, verification, HMAC signature checks and where to queue events.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-aws-lambda-serverless\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-aws-lambda-serverless\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/en\\\/whatsapp-webhook-aws-lambda-serverless\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Serverless WhatsApp webhook on AWS Lambda, Cloudflare Workers and Vercel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/\",\"name\":\"Blog Vectalk\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/vectalk.com.br\\\/blog\\\/#\\\/schema\\\/person\\\/ff36ecd9d8257856f227f8e5d639db2b\",\"name\":\"wanderleyfcunha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g\",\"caption\":\"wanderleyfcunha\"},\"sameAs\":[\"https:\\\/\\\/vectalk.com.br\\\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WhatsApp Webhook on AWS Lambda, Workers and Vercel","description":"WhatsApp webhook on AWS Lambda, Cloudflare Workers or Vercel: pros and cons, verification, HMAC signature checks and where to queue events.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/","og_locale":"en_US","og_type":"article","og_title":"WhatsApp Webhook on AWS Lambda, Workers and Vercel","og_description":"WhatsApp webhook on AWS Lambda, Cloudflare Workers or Vercel: pros and cons, verification, HMAC signature checks and where to queue events.","og_url":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/","og_site_name":"Blog Vectalk","article_published_time":"2026-10-29T13:33:43+00:00","article_modified_time":"2026-10-29T13:33:47+00:00","author":"wanderleyfcunha","twitter_card":"summary_large_image","twitter_misc":{"Written by":"wanderleyfcunha","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/#article","isPartOf":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/"},"author":{"name":"wanderleyfcunha","@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b"},"headline":"Serverless WhatsApp webhook on AWS Lambda, Cloudflare Workers and Vercel","datePublished":"2026-10-29T13:33:43+00:00","dateModified":"2026-10-29T13:33:47+00:00","mainEntityOfPage":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/"},"wordCount":1508,"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/","url":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/","name":"WhatsApp Webhook on AWS Lambda, Workers and Vercel","isPartOf":{"@id":"https:\/\/vectalk.com.br\/blog\/#website"},"datePublished":"2026-10-29T13:33:43+00:00","dateModified":"2026-10-29T13:33:47+00:00","author":{"@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b"},"description":"WhatsApp webhook on AWS Lambda, Cloudflare Workers or Vercel: pros and cons, verification, HMAC signature checks and where to queue events.","breadcrumb":{"@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vectalk.com.br\/blog\/en\/whatsapp-webhook-aws-lambda-serverless\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vectalk.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"Serverless WhatsApp webhook on AWS Lambda, Cloudflare Workers and Vercel"}]},{"@type":"WebSite","@id":"https:\/\/vectalk.com.br\/blog\/#website","url":"https:\/\/vectalk.com.br\/blog\/","name":"Blog Vectalk","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vectalk.com.br\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/vectalk.com.br\/blog\/#\/schema\/person\/ff36ecd9d8257856f227f8e5d639db2b","name":"wanderleyfcunha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21c37077f1731eb558973f27a7b647d55f72fde5200a843ac5f5345b247ea725?s=96&d=mm&r=g","caption":"wanderleyfcunha"},"sameAs":["https:\/\/vectalk.com.br\/blog"]}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/comments?post=820"}],"version-history":[{"count":1,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/820\/revisions"}],"predecessor-version":[{"id":823,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/posts\/820\/revisions\/823"}],"wp:attachment":[{"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/media?parent=820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/categories?post=820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vectalk.com.br\/blog\/wp-json\/wp\/v2\/tags?post=820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}