This code example briefly describes how to store data to and retrieve data from DynamoDB using two AWS Lambdas. In this example we assume a DynamoDB tale test-can-learn
with String key user_uuid
in region eu-west-1
. As a bonus, we show how to make the read access available as RESTful resource with AWS' API Gateway.
Skip Lambda templates and craete the Lambdas custom. Then assign the Basic with DynamoDB
role to the Lambda.
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB({
region: 'eu-west-1'