Using Amazon API Gateway as a proxy for DynamoDB

preview_player
Показать описание
This video explains the technique to get the data from Dynamo DB table without using Lambda service or without writing any piece of code in Lambda
Let’s find a solution of Direct Integration…!!!

Prerequisite:
---------------------
Building a near real-time data warehouse using AWS technologies & Apache Velocity

Documentation Link:
------------------------------

DynamoDB Table Creation:
---------------------------------
Table Schema:
Tbale Name:
Table Schema:class_name(string),roll_name(Number),name_data

Insert Data in DynamoDB Table:
---------------------------------------------------
INSERT INTO "class_info" value {'class_name' : '1','roll_name' : 2, 'name_data': 'Sattu' }
INSERT INTO "class_info" value {'class_name' : '1','roll_name' : 3, 'name_data': 'Ranjith' }
INSERT INTO "class_info" value {'class_name' : '1','roll_name' : 4, 'name_data': 'Soham' }
INSERT INTO "class_info" value {'class_name' : '2','roll_name' : 5, 'name_data': 'Ria' }
INSERT INTO "class_info" value {'class_name' : '2','roll_name' : 6, 'name_data': 'Bina' }
INSERT INTO "class_info" value {'class_name' : '3','roll_name' : 7, 'name_data': 'Hola' }


Apache Velocity Template :
----------------------------------
Mapping templates are available in the comment section

Check this playlist for more Data Engineering related videos:

Snowflake Complete Course from scratch with End-to-End Project with in-depth explanation--

🙏🙏🙏🙏🙏🙏🙏🙏
YOU JUST NEED TO DO
3 THINGS to support my channel
LIKE
SHARE
&
SUBSCRIBE
TO MY YOUTUBE CHANNEL
Рекомендации по теме
Комментарии
Автор

Apache Velocity Template with only one Condition:


= "DynamoDB_20120810.Query")
= "application/x-amz-json-1.0")
{
"TableName": "class_info",
"ConsistentRead": true,
"ProjectionExpression": "class_name, roll_name, name_data",
"KeyConditionExpression": "class_name = :v1",
"ExpressionAttributeValues": {
":v1": {"S": $input.json('$.class_name')}
},
"ReturnConsumedCapacity": "TOTAL"
}






Apache Velocity Template with Multiple Condition:



= "DynamoDB_20120810.Query")
= "application/x-amz-json-1.0")
{
"TableName": "class_info",
"ConsistentRead": true,
"ProjectionExpression": "class_name, roll_name, name_data",
"KeyConditionExpression": "class_name = :v1 AND roll_name > :v2",
"ExpressionAttributeValues": {
":v1": {"S": $input.json('$.class_name')},
":v2": {"N":
},
"ReturnConsumedCapacity": "TOTAL"
}


Processing the Output using Mapping Template:

#set($inputRoot = $input.path('$.Items'))
{
"Records": [
#foreach($elem in $inputRoot)

#if($foreach.hasNext), #end
#end
]
}

KnowledgeAmplifier
Автор

Unbelievable, these concepts are taught open-source ! How to use a rate limiter & next use a saga pattern for this Architecture?

SP-dbsh
Автор

Hello brother, suddenly some of your videos have become private. any specific reason for it. thanks in advance.

arunr