---
title: "How to Handle Numbers Represented as Strings in the Input to a .NET AWS Lambda Function"
url: https://daily.dev/posts/how-to-handle-numbers-represented-as-strings-in-the-input-to-a-net-aws-lambda-function-5frucq1gd
source_url: https://nodogmablog.bryanhogan.net/2023/03/how-to-handle-numbers-represented-as-strings-in-the-input-to-a-net-aws-lambda-function
type: article
source: "No Dogma Blog (Bryan Hogan)"
published: 2026-05-31T07:47:13.895Z
updated: 2026-05-31T08:51:07.628Z
tags: [".net", "serverless", "aws-lambda"]
reading_time: 3
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Handle Numbers Represented as Strings in the Input to a .NET AWS Lambda Function

**[No Dogma Blog \(Bryan Hogan\)](https://daily.dev/sources/bryanhogan)** · 3 min read · 0 upvotes · 0 comments

## Summary

When invoking a .NET AWS Lambda function with JSON payloads where numbers are represented as strings, the DefaultLambdaJsonSerializer fails with a JsonSerializerException. Two workarounds are presented: (1) subclassing DefaultLambdaJsonSerializer to set JsonNumberHandling.AllowReadingFromString in the serializer options, and (2) accepting a Stream as the function handler input and performing manual deserialization with custom JsonSerializerOptions.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nodogmablog.bryanhogan.net/2023/03/how-to-handle-numbers-represented-as-strings-in-the-input-to-a-net-aws-lambda-function>

---

Tags: [#.net](https://daily.dev/tags/.net), [#serverless](https://daily.dev/tags/serverless), [#aws-lambda](https://daily.dev/tags/aws-lambda)

[View this post on daily.dev](https://daily.dev/posts/how-to-handle-numbers-represented-as-strings-in-the-input-to-a-net-aws-lambda-function-5frucq1gd)
