all InfoSec news
[20 Days of DynamoDB] Day 17 - BatchGetItem operation
Feb. 5, 2024, 3:16 a.m. | Abhishek Gupta
DEV Community dev.to
Posted: 5/Feb/2024
You can club multiple (up to 100) GetItem requests in a single BatchGetItem operation - this can be done across multiple tables.
Here is an example that fetches includes four GetItem calls across two different tables:
resp, err := client.BatchGetItem(context.Background(), &dynamodb.BatchGetItemInput{
RequestItems: map[string]types.KeysAndAttributes{
"customer": types.KeysAndAttributes{
Keys: []map[string]types.AttributeValue{
{
"email": &types.AttributeValueMemberS{Value: "c1@foo.com"},
},
{
"email": &types.AttributeValueMemberS{Value: "c2@foo.com"},
},
},
},
"Thread": types.KeysAndAttributes{
Keys: []map[string]types.AttributeValue{
{
"ForumName": &types.AttributeValueMemberS{Value: "Amazon DynamoDB"},
"Subject": &types.AttributeValueMemberS{Value: "DynamoDB Thread 1"},
},
{
"ForumName": &types.AttributeValueMemberS{Value: "Amazon …
amp can client cloud club context customer database dynamodb email keys map requests serverless single tables types
More from dev.to / DEV Community
Jobs in InfoSec / Cybersecurity
Social Engineer For Reverse Engineering Exploit Study
@ Independent study | Remote
Senior Software Engineer, Security
@ Niantic | Zürich, Switzerland
Consultant expert en sécurité des systèmes industriels (H/F)
@ Devoteam | Levallois-Perret, France
Cybersecurity Analyst
@ Bally's | Providence, Rhode Island, United States
Digital Trust Cyber Defense Executive
@ KPMG India | Gurgaon, Haryana, India
Program Manager - Cybersecurity Assessment Services
@ TestPros | Remote (and DMV), DC