Courseiva
Monitoring and TroubleshootinghardMultiple ChoiceObjective-mapped

How to Avoid Duplicate Lambda Processing from DynamoDB Streams on Global Tables

A social media company runs a multi-region application on Amazon DynamoDB with global tables. The application is deployed in us-east-1 and eu-west-1. Recently, they enabled DynamoDB Streams on the table to trigger an AWS Lambda function for real-time analytics. The Lambda function runs in us-east-1. After enabling streams, they notice that the Lambda function is triggered multiple times for the same update, and the application's write latency in eu-west-1 has increased. The company has strict latency requirements. A database specialist is asked to resolve the issue. What should the database specialist recommend?

Quick Answer

The correct answer is to modify the Lambda function to check the 'awsRegion' attribute in the stream record and ignore records from other regions. This works because DynamoDB global tables replicate every write across all configured regions, and each regional replica independently generates its own stream record for the same update. Without filtering, the Lambda function in us-east-1 processes both the local write and the replicated write from eu-west-1, causing duplicate processing and increased write latency due to cross-region stream propagation. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your understanding of how global tables and DynamoDB Streams interact, with a common trap being to disable streams in other regions—which would break replication—or to increase concurrency, which does not address the root cause. Remember the key insight: each region’s stream is independent, so you must filter by the awsRegion attribute to avoid duplicates. A helpful memory tip is “Filter the region, not the stream.”

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Modify the Lambda function to check the 'awsRegion' attribute in the stream record and ignore records from other regions.

Global tables replicate writes across regions, and each write generates a stream record. The Lambda function should filter on the 'awsRegion' attribute in the stream record to avoid processing the same update from different regions. Option A is wrong because increasing Lambda concurrency doesn't prevent duplicate processing. Option B is wrong because using a dedicated stream for each region is not supported. Option D is wrong because disabling streams in eu-west-1 would break the replication.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Increase the Lambda function's reserved concurrency to handle duplicate events faster.

    Why it's wrong here

    Increasing Lambda reserved concurrency does not address the duplicate event processing issue; it might even exacerbate resource usage without filtering duplicates.

  • Create a separate Lambda function in eu-west-1 and use a local stream.

    Why it's wrong here

    Global tables replicate writes; each region's stream captures local writes only, but the same write appears in each region's stream.

  • Modify the Lambda function to check the 'awsRegion' attribute in the stream record and ignore records from other regions.

    Why this is correct

    This prevents duplicate processing of the same write event.

  • Disable DynamoDB Streams on the eu-west-1 replica table.

    Why it's wrong here

    Disabling DynamoDB Streams on the eu-west-1 replica table would break cross-region replication, which is not recommended because global tables require streams for replication to work.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

Quick reference

Cloud Service Model Comparison

ModelYou ManageProvider ManagesExamples
IaaSOS, runtime, apps, dataHardware, hypervisor, networkingEC2, Azure VMs, GCP Compute Engine
PaaSApps and dataOS, runtime, middleware, hardwareElastic Beanstalk, Azure App Service
SaaSData and settings onlyEverything elseMicrosoft 365, Salesforce, Workday
FaaS / ServerlessFunction code onlyInfra, scaling, runtimeLambda, Azure Functions, Cloud Run
CaaSContainers and appsKubernetes, OS, hardwareEKS, AKS, GKE

About these practice questions

One of 1,663 original DBS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DBS-C01

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A company is using Amazon DynamoDB and has enabled DynamoDB Streams. The application needs to process stream records in real-time. Which AWS service can be used to invoke a Lambda function automatically for each stream record?

easy
  • A.Amazon Kinesis Data Firehose
  • B.Amazon Simple Queue Service (SQS)
  • C.AWS Step Functions
  • D.AWS Lambda

Why D: DynamoDB Streams can be directly integrated with AWS Lambda, enabling automatic invocation of a Lambda function for each stream record in near real-time. This is the natural choice for processing stream records without additional services. Option A (Amazon Kinesis Data Firehose) is used to load streaming data into data stores, not to invoke Lambda. Option B (Amazon SQS) is a message queue service; DynamoDB Streams does not directly integrate with SQS, and Lambda would still be needed to poll or process. Option C (AWS Step Functions) orchestrates workflows but does not directly trigger from DynamoDB Streams without Lambda.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This DBS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DBS-C01 exam.