This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tables | |
import numpy as np | |
# Store "all_data" in a chunked array... | |
# from: http://stackoverflow.com/questions/8843062/python-how-to-store-a-numpy-multidimensional-array-in-pytables | |
f = tables.openFile('all_data.hdf', 'w') | |
atom = tables.Atom.from_dtype(all_data.dtype) | |
filters = tables.Filters(complib='blosc', complevel=5) | |
ds = f.createCArray(f.root, 'all_data', atom, all_data.shape, filters=filters) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is your Lambda function | |
import json | |
import boto3 | |
def save_to_bucket(event, context): | |
AWS_BUCKET_NAME = 'my-bucket-name' | |
s3 = boto3.resource('s3') | |
bucket = s3.Bucket(AWS_BUCKET_NAME) | |
path = 'my-path-name.txt' |