dotnet

Bloom Filters Demystified

A Bloom filter is a space-efficient probabilistic data structure used to test whether an element is a member of a set. It allows for fast lookups with a small memory footprint but comes with a trade-off: it can produce false positives (saying an element is in the set when it isn’t) but never false negatives (if it says an element isn’t in the set, it definitely isn’t). Bloom filters are ideal for scenarios where memory efficiency and speed are critical, and a small false-positive rate is acceptable.

Read more...

Create Visual Studio project template

In this comprehensive guide, you'll learn how to create Visual Studio project template for AWS Lambda applications. We'll cover setting up dependency injection, configuring AWS X-Ray, and sharing your template through NuGet. This tutorial is perfect for .NET developers who want to streamline their Lambda project creation process.

Read more...

Extract text from images using Amazon Bedrock & .NET

In today's digital age, vast amounts of information are exchanged in various formats, including images. However, the text embedded within images is often inaccessible for search engines, text analysis tools, and other digital applications. This limitation has given rise to the need for extracting text from images, a process that involves identifying and recognizing the textual content present within an image file.

Read more...

Handling Partial Batch Failure When Processing SQS Messages with a Lambda Function

Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. One common use case for SQS is to process messages from a queue as a batch using a Lambda function. However, in some cases, you may encounter partial batch failure, where some messages in the batch are processed successfully, while others fail. In this case, you need to handle the partial batch failure to ensure that the messages that failed to process are retried, while the messages that succeeded are not processed again.

Read more...

How to Deserialize DynamoDb stream JSON to Object in .NET Lambda?

Whenever an application creates, updates, or deletes items in the table, DynamoDB Streams writes a stream record with the primary key attributes of the items that were modified. You can configure the stream so that the stream records capture additional information, such as the "before" and "after" images of modified items.

Read more...

Run .NET Lambda Function Locally Using LocalStack

AWS Toolkit for Visual Studio makes it easier for developers to develop and debug Lambda functions locally but for actual Lambda integration test, we need to deploy Lambda function in AWS account.

Read more...

Amazon SQS local development using LocalStack

Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel between applications or microservices. Amazon SQS moves data between distributed application components and helps you decouple these components. That means to test your application you will need to connect to the Amazon SQS service each time. For development and testing purposes, you’ll likely want to test locally.

Read more...

Amazon S3 local development using LocalStack

It's always a good practice, before moving your code into cloud, do integration test from local dev environment. Let's say if you don't have AWS account access from your development machine Or you don't want to create resources in AWS account just for integration testing purpose in that situation LocalStack is best choice.

Read more...

Reducing complexity and enhance readability of C# unit tests using AutoFixture

Unit tests allows developers to verify their code to make sure that the code works as expected and to identify and fix bugs at early stage. The goal of unit test is to isolate each part of the program and test them individually. When we write Unit Tests for individual code, we mock all external dependencies. The purpose of mocking is to isolate the code being tested without affecting the behavior or state of external dependencies.

Read more...

Load Testing APIs with .NET NBomber

NBomber is an open-source load testing framework designed to assist .NET developers in evaluating their applications under various workloads. It’s lightweight, versatile, and supports testing a wide range of systems, including HTTP, WebSockets, GraphQL, gRPC, SQL databases, MongoDB, Redis, and more. With NBomber, you can simulate real-world production scenarios to ensure your application performs reliably under stress.

Read more...