Skip to content

Instantly share code, notes, and snippets.

@em-shea
em-shea / dynamodb-data-to-s3.py
Last active July 22, 2022 16:35
A Lambda function that scans a given DynamoDB table and writes the data to S3
import os
import json
import boto3
from datetime import datetime
# Import resources using AWS Python SDK (boto3) and specify the DynamoDB table to scan and S3 bucket to write file to
# Table and bucket name are passed as environment variables in SAM template
s3 = boto3.resource('s3')
bucket = s3.Bucket(os.environ['BUCKET_NAME'])
table = boto3.resource('dynamodb').Table(os.environ['TABLE_NAME'])
@em-shea
em-shea / quicksight-manifest.json
Created April 15, 2020 02:28
An example manifest for QuickSight
{
"fileLocations": [
{
"URIPrefixes": [
"s3://my-bucket-name"
]
}
],
"globalUploadSettings": {
"format": "JSON"