Skip to content

Instantly share code, notes, and snippets.

@chrisorlandodev
chrisorlandodev / dynamodb-query-iterator.ts
Last active August 26, 2018 19:24
Generator function to iterator over a DynamoDB Query/Scan
import * as AWS from 'aws-sdk'
import {DocumentClient} from "aws-sdk/lib/dynamodb/document_client";
import QueryOutput = DocumentClient.QueryOutput;
import QueryInput = DocumentClient.QueryInput;
import ScanInput = DocumentClient.ScanInput;
import ScanOutput = DocumentClient.ScanOutput;
const dynamodb = new AWS.DynamoDB.DocumentClient();
// polyfill
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm