Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8920797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:22:07+00:00 2026-06-15T06:22:07+00:00

Is there an option to scan & update a record in a DynamoDB table

  • 0

Is there an option to scan & update a record in a DynamoDB table using a single API. Consider I have list of items in a Items table, with the fields (ItemID, ItemName, ItemAssigned). ItemID is the Hash key of the table. Items IDs are named like , Item1, Item2, Item3 etc., The users will not know what are the items are in the table. So, in the app, if a user taps “Get an item” button, then a random item will be fetched and assigned to him. Then ItemAssigned is set to YES. The Items tabe Then the item will not be assigned to any other user. This is what happens.

Steps:
1. Taps “Get an item”
2. Scan the first item from the Items table, where ItemAssigned = NO
3. Show the item in the home screen
4. Update the item in the Items table to set ItemAssigned = YES

This works good, if one user is trying to get the item at a time. The problem occurs when two users A & B are trying to get an item at the same time, and the same item is assigned to both the users.

So first A fetches the item. Before the Items table is updated to set ItemAssigned = YES, B also fetches the same item. Now both A & B’s home screens show the same item. This is wrong.

The only way is to Scan & Update the Items table using a single API. Is there any possibility to do this in Amazon DynamoDB?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:22:08+00:00Added an answer on June 15, 2026 at 6:22 am

    Unfortunately there is no API that scans and updates in a single operation. You may want to look into conditional PUT item as this will allow you to implement a checkout like feature such that you can set “ItemAssigned = YES” only if “ItemAssigned = NO”.

    Your application code will need to handle the exception gracefully when dealing with a scan result, but will allow for the workflow you’re requesting of only allowing one user to see the item.

    API docs for PUT item

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using django comments framework http://docs.djangoproject.com/en/dev/ref/contrib/comments/ Not sure is there option, to make all comments
Is there an option to show the full command when using an alias? Example:
Using PHP, I scan a directory and list all of the .xml files. Each
UPDATE: Setting foreign_key_checks to 1 does not trigger a scan of the existing table
In Eclipse (HELIOS) there is an option to scan all source code and search
I have arrival column of type timestamp in table reservations ( I'm using postgres
Is there any option to tell gs to convert strokes to fills? Something similar
Is there an option for the curl command to show only a percentage output
is there an option how to disable that #if, #endif and other directives are
Is there any option to clear the console screen in Java as clrscr() in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.