Hướng dẫn AWS DynamoDB Streams to Lambda Tutorial in Python

Written by Tommy
Posted on Tue, 02/02/2021 - 03:57
13 views

Share Everywhere

DynamoDB Streams are a powerful feature that allow applications to respond to change on your table's records. Combining this feature with Lambda functions creates a highly scalable and fault tolerant application that can easily respond to record modification. In this video, I show you how to create a Lambda function and define a handler function (in python) that will respond to DynamoDB change events. From there, I define a required IAM role and attach it to the Lambda Function. Afterwards, I create a DynamoDB table and hook up the Lambda trigger. I test the connectivity by making manual updates on my DynamoDB table and confirm the Lambda function is responding appropriately. 

MY RECOMMENDED READING LIST

Clean Code - https://geni.us/ghhJqs​

Clean Architecture - https://geni.us/FtLwm​ 

Code Complete - https://geni.us/CuSaX2​     

Head First Design Patterns - https://geni.us/t0p44Fx​    

The Pragmatic Programmer - https://geni.us/DTGO​     

Algorithms - https://geni.us/y1IZXX4​     

Domain Driver Design - https://geni.us/B90tw76​  

Working Effectively with Legacy Code - https://geni.us/3TMXON​     

Refactoring - https://geni.us/cRA93​ 

MY RECORDING EQUIPMENT

Shure SM58 Microphone - https://geni.us/xfjf21N​     

Behringer UM2 Audio Interface - https://geni.us/m6G1tC​    

XLR Cable - https://geni.us/xEQxQ​     

Desk Microphone Mount - https://geni.us/fHqj5ss​     

Logitech C920s Webcam - https://geni.us/Dl7WemP​  

Fujilm XS10 Camera - https://geni.us/bWy2​     

Fujifilm XF 35mm F2 Lens - https://geni.us/gPHo​     

Neewer 2 Piece Studio Lights - https://geni.us/tAMf​    

💻 MY DESKTOP EQUIPMENT 💻

Autonomous ErgoChair 2  - https://bit.ly/2YzomEm​

Autonomous SmartDesk 2 Standing Desk - https://bit.ly/2YzomEm​

MX Master 3 Productivity Mouse - https://geni.us/V6OyUIG​     

Das Keyboard  Prime 13 MX Brown - https://geni.us/ZpkQz​

Veikk A15 Drawing Tablet - https://geni.us/DFsa​     

📚 References / Resources:

Getting started with AWS: https://youtu.be/lTyqzyk86f8​

Lambda function code (python): https://gist.github.com/djg07/2bcf216..

☁Topics covered include:

- Lambda Function Creation

- Lambda handler using python

- Lambda DynamoDB Streams IAM role

- DynamoDB Table Setup

- DynamoDB Streams

- DynamoDB NewImage

- DynamoDB OldImage

- DynamoDB Stream "Change" Events

- Lambda Cloudwatch Monitoring

#DynamoDB​ ​ #Lambda​ #AWS​ #Serverless