Skip to content

Instantly share code, notes, and snippets.

@ejmv-rosario
ejmv-rosario / handler.py
Created April 24, 2020 01:13 — forked from tomfa/handler.py
AWS Lambda: Python store to S3
# 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'